Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X
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
Solved! Go to Solution.
The errormessage is wrong and misleading.
You have to get rid of ALL units in the result vector to make it work.
The errormessage is wrong and misleading.
You have to get rid of ALL units in the result vector to make it work.
Thanks Werner, incredible I overlooked it.
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.
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.