Skip to main content
13-Aquamarine
September 1, 2013
Solved

Problem with function

  • September 1, 2013
  • 1 reply
  • 2588 views

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

Best answer by Werner_E

The errormessage is wrong and misleading.

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

ShaSt1.png

1 reply

Werner_E25-Diamond IAnswer
25-Diamond I
September 1, 2013

The errormessage is wrong and misleading.

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

ShaSt1.png

FDS13-AquamarineAuthor
13-Aquamarine
September 1, 2013

Thanks Werner, incredible I overlooked it.

25-Diamond I
September 1, 2013

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.