Skip to main content
1-Visitor
May 18, 2011
Question

switched return

  • May 18, 2011
  • 3 replies
  • 2359 views

Hello,

before running to deep into the obvious wrong error message, allow me to ask wether is possible with mathcad 14:

if condition ==true

return vector of elements divided by their different units

else

return another vector with another size and other orininal units (also divided by them removing them)

thanks

gerfried

3 replies

23-Emerald V
May 18, 2011

Gerfried Cebrat wrote:

Hello,

before running to deep into the obvious wrong error message, allow me to ask wether is possible with mathcad 14:

if condition ==true

return vector of elements divided by their different units

else

return another vector with another size and other orininal units (also divided by them removing them)

thanks

gerfried

Yes ... provided I've understood the question. See attached for an example.

Stuart

23-Emerald I
May 18, 2011

Gerfried Cebrat wrote:

Hello,

before running to deep into the obvious wrong error message, allow me to ask wether is possible with mathcad 14:

if condition ==true

return vector of elements divided by their different units

else

return another vector with another size and other orininal units (also divided by them removing them)

thanks

gerfried

Before you get too far into this, look up the UnitsOf() function. While it can (and has) caused much anguish and many errors, x/(UnitsOf(x) will render a quantity that has no units and is numerically the correct value of x expressed in default units. Keeping track of what the units SHOULD be will still be problematic.

1-Visitor
May 19, 2011

Can you provide a worksheet indicating what your after, will save people guessing.

Mike