Programming and Units....
Programming and Units....
(OP)
All
I would appreciate any advice on how to solve the attached problem with units.
Before I tried to use units in this MathCAD sheet, I was able to evaluate the function, Vu(x) for the maximum and minimum as shown in the attached sheet. Now, having defined units for all the variables necessary to calculate Vu(x) I cannot get anything. The MathCAD sheet outlines the Vx:=Vu(x) as all red, meaning undefined.
I've tried a lot of things to no avail. I can see from the MathCAD website that units can be used in programming.
I appreciate any help.
Thanks,
Q
I would appreciate any advice on how to solve the attached problem with units.
Before I tried to use units in this MathCAD sheet, I was able to evaluate the function, Vu(x) for the maximum and minimum as shown in the attached sheet. Now, having defined units for all the variables necessary to calculate Vu(x) I cannot get anything. The MathCAD sheet outlines the Vx:=Vu(x) as all red, meaning undefined.
I've tried a lot of things to no avail. I can see from the MathCAD website that units can be used in programming.
I appreciate any help.
Thanks,
Q
Regards,
Qshake![[pipe] pipe](https://www.tipmaster.com/images/pipe.gif)
Eng-Tips Forums:Real Solutions for Real Problems Really Quick.





RE: Programming and Units....
RE: Programming and Units....
On the face of it, the only thing I can see at all is that your indexed x is actually defined as 0ft..48.75ft2, since you have Ltot*ft in the definition of x.
TTFN
FAQ731-376: Eng-Tips.com Forum Policies
RE: Programming and Units....
If I can back save to M11 I will repost tomorrow.
Thanks again.
Q
Regards,
![[pipe] pipe](https://www.tipmaster.com/images/pipe.gif)
Qshake
Eng-Tips Forums:Real Solutions for Real Problems Really Quick.
RE: Programming and Units....
And for my example, I see that there is an issue between pound-mass and pound-force. SO to read the correct values from the graphs I produced you have to divide Vu(x) by 32,200 to get an answer in kips.
I suppose somewhere in the beginning of my definitions for units I didn't distinguish between mass and force. But then I did try to rely on the MathCAD base units.....
I appreciate the tips.
Regards,
![[pipe] pipe](https://www.tipmaster.com/images/pipe.gif)
Qshake
Eng-Tips Forums:Real Solutions for Real Problems Really Quick.
RE: Programming and Units....
TTFN
FAQ731-376: Eng-Tips.com Forum Policies
RE: Programming and Units....
David
RE: Programming and Units....
Peter
RE: Programming and Units....
I owe you all an update (perhaps just to help you or others in the future).
Where I defined the range, x:=0..Ltot, I now know that when using units you must use the format, x:= 0ft, 1.0ft..Ltot, where Ltot has units of feet. In this case, the 1.0ft is the increment of the step. Once I found that out, the Ltot was then defined, x was defined and condequently Vu(x) was defined.
Then came the matter of what pstuckey notes. I had to divide the subscript, x in Vx by ft in order for it to be unitless. Once completed the whole set up works just as it did.
Whew! I love the program but like many programs wish there were more clear error messages.
Thanks to all for your help and directions.
Q
Regards,
![[pipe] pipe](https://www.tipmaster.com/images/pipe.gif)
Qshake
Eng-Tips Forums:Real Solutions for Real Problems Really Quick.
RE: Programming and Units....
Then define the vector x[n:=n*ft
RE: Programming and Units....