Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X
Hi,
I'm trying to plot a function but I get an error and I'd like to ask:
Can I define a variable in a range between two other variables? and if not, how can I do it differently. Please see X3 variable and Y3(X3) function.
thanks,
Eleni
Solved! Go to Solution.
The error message is pretty clear. You have defined X3 as a range from 0 to L, but L has a unit (m), so Prime wants you to provide the second value in the range. Define:
(Just type a comma between the 0 and the .. and you'll see where you can add the 0.1*m. Make sure that m is a unit) and your first problem is gone.
Regarding the plot: You have defined Y3 to be a function of X3. If you want to plot it, you have to call it with an argument.
So on the horizontal axis change Y3 to
Y3(X3)
and your Plot is without error. You may want to set the units for the Y3(X3) trace to mm...
Success!
Luc
The error message is pretty clear. You have defined X3 as a range from 0 to L, but L has a unit (m), so Prime wants you to provide the second value in the range. Define:
(Just type a comma between the 0 and the .. and you'll see where you can add the 0.1*m. Make sure that m is a unit) and your first problem is gone.
Regarding the plot: You have defined Y3 to be a function of X3. If you want to plot it, you have to call it with an argument.
So on the horizontal axis change Y3 to
Y3(X3)
and your Plot is without error. You may want to set the units for the Y3(X3) trace to mm...
Success!
Luc
Thanks Luc,
much appreciated.