cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need help navigating or using the PTC Community? Contact the community team. X

Defining variable greater than/equal or less than/equal

rsuorsa
1-Newbie

Defining variable greater than/equal or less than/equal

eisaatana.PNG

I was trying to draw this graph, but how im supposed to define x ?

1 ACCEPTED SOLUTION

Accepted Solutions
RichardJ
19-Tanzanite
(To:rsuorsa)

See the attached worksheet.

A Boolean inequality like that does not assign any values to x. The only way to make a numeric assignment is to use the numeric assignment operator (typed as ":", appears as ":=")

View solution in original post

7 REPLIES 7
RichardJ
19-Tanzanite
(To:rsuorsa)

Do you want x to be the independent variable on the graph? If so, what are you trying to do with n? Do you want one curve on the graph for each value of n? Lastly, which version of Mathcad are you using?

6 different curves for each values of n. Im using trial version of Mathcad 15. If I understood the assignment correctly the value of x means that im supposed to draw the curves between 0 and 2pie.

RichardJ
19-Tanzanite
(To:rsuorsa)

See the attached worksheet.

A Boolean inequality like that does not assign any values to x. The only way to make a numeric assignment is to use the numeric assignment operator (typed as ":", appears as ":=")

Thanks, your worksheet helped alot. Just one question: In your first example is there a way to use n:=1,2..6 instead of typing y(x,1), y(x,2), y(x,3), y(x,4), y(x,5), y(x,6), or does it only work when using matrix?

RichardJ
19-Tanzanite
(To:rsuorsa)

It only works when using a matrix. Programmable graphs that would allow an automated version of the first graph is a long standing request.

lturek
4-Participant
(To:rsuorsa)

Risto Suorsa wrote:

Thanks, your worksheet helped alot. Just one question: In your first example is there a way to use n:=1,2..6 instead of typing y(x,1), y(x,2), y(x,3), y(x,4), y(x,5), y(x,6), or does it only work when using matrix?

Yes, there is. But there are some drawbacks (you must not experience all of them)

- You must change the order of the arguments - x has to be last

- You get all plots in just one color because its basically just one plot (similar to what Richard had shown using matrices

- You must use a range for x (you can't use the quickplot feature)

- Sometimes autoscale won't work as expected and you have to set the limits in y direction manually

- You will get nasty "fly back lines and you have to avoid them by using a combination of two workarounds:

1) set the plot style from "line" to "draw"

2) Sometime the above already helps, most times not. So you will have to set either the left x-limit a little bit larger or the right limit a bit smaller than the limits in your x-range.

Here I simply defined a new function yy with swapped arguments.

RichardJ
19-Tanzanite
(To:lturek)

I didn't realize that worked

Top Tags