How to graph two independent curves on the same set of axes
With Mathcad you can graph several sets of y values against different sets of x values. Select Insert > Graph > X-Y Plot. To graph two independent curves on the same set of axes, enter two expressions separated by commas on the x-axis and two expressions on the y-axis. Mathcad matches up the expressions in pairs - first x-axis expression with the first y-axis expression, and the second with the second. It then draws a trace for each pair. Mathcad graphs one point for each value of the range variable and, unless you specify otherwise, connects them with straight lines. Example: To graph the elements of a vector x of 25 elements against a vector y of the same size, first define the following range variable: i:=1..25 , if the ORIGIN is set to 1, or i:=0..24, if ORIGIN is set to 0. Then place xi in the middle placeholder of the horizontal axis, and yi in the middle placeholder of the vertical axis. You can graph any expression against any other expression, as long as they share the same range variables. For more information, select the following: Help > Resource Center > Tutorial > Step-by-Step Editing Guide > Creating Graphs and see the X-Y Plot Example on this assignment web page.
|