Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Mismatched units

Status
Not open for further replies.

Bung

Electrical
Joined
Feb 10, 2002
Messages
428
Location
AU
This one is driving me bananas! I have a test in a program loop that goes like this:

while (Test<1)^(t1<tm)

etc. Test is unitless. t1, tm are in seconds,and the ^ is the AND symbol from the Boolean toolbar.

As a standalone line (Test<1)^(t1<tm)= it works fine.
But in the program segment mathcad insists that the units of the (Test<1)part do not match. It used to work fine in Mathcad 2000. I am now using Mathcad 11.

Has anybody got any suggestions?

Bung
Life is non-linear...
 
Yet again, using units has saved me from myself. There was a subtle bug elsewhere in the program that meant that "Test" was NOT unitless (as it should have been), so Mathcad acted quite properly in rejecting the comparison of Test and the (unitless) number 1.



Bung
Life is non-linear...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top