Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X
I was trying to draw this graph, but how im supposed to define x ?
Solved! Go to Solution.
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 ":=")
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.
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?
It only works when using a matrix. Programmable graphs that would allow an automated version of the first graph is a long standing request.
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.
I didn't realize that worked