cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need help navigating or using the PTC Community? Contact the community team. X

Problem with function

FDS
12-Amethyst
12-Amethyst

Problem with function

I found the function ShahST(G) in an old book about energy transfer systems. However when I want to use it I get an error. For the moment I seem to be unable to detect the cause. Would anyone be willing to have a look at it? Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
Werner_E
24-Ruby V
(To:FDS)

The errormessage is wrong and misleading.

You have to get rid of ALL units in the result vector to make it work.

ShaSt1.png

View solution in original post

6 REPLIES 6
Werner_E
24-Ruby V
(To:FDS)

The errormessage is wrong and misleading.

You have to get rid of ALL units in the result vector to make it work.

ShaSt1.png

FDS
12-Amethyst
12-Amethyst
(To:Werner_E)

Thanks Werner, incredible I overlooked it.

Werner_E
24-Ruby V
(To:FDS)

desomer wrote:

Thanks Werner, incredible I overlooked it.

You are welcome. It was hard to spot as long as the routine was in the referenced file. After copying it to the worksheet the errormessage was more than misleading - "This function refers to itself inconsistently" and the whole body of the while loop being red. It took me quite some time, too, to realize that the error is not in the loop but the return vector below. Normally in case of the creation of a vector with different units Mathcad's error message is somewhat helpful. Not sure what happend here.

RichardJ
19-Tanzanite
(To:Werner_E)

Good catch

I spent a while looking at that myself. I figured out fairly soon that the error message had to be bogus, because the function didn't refer to itself at all, let alone inconsistently! I missed the units issue though.

Werner Exinger wrote:

Normally in case of the creation of a vector with different units Mathcad's error message is somewhat helpful. Not sure what happend here.

Mathcad Prime works with arrays with different dimensions.

Mathcad Prime works with arrays with different dimensions.

Sure, one of the very few advantages of Prime over Mathcad among the enormous amount of disadvantages.

But the desomer's question was for (real) Mathcad, not Prime.

Top Tags