Добавил:
kostikboritski@gmail.com Выполнение курсовых, РГР технических предметов Механического факультета. Так же чертежи по инженерной графике для МФ, УПП. Писать на почту. Дипломы по кафедре Вагоны Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Скачиваний:
41
Добавлен:
12.08.2017
Размер:
2.3 Mб
Скачать

Graphing Functions and Expressions / 119

Graphing Functions and Expressions

2D QuickPlots

A 2D QuickPlot is a plot created from an expression or function that represents the y- coordinates of the plot. Mathcad automatically creates a plot over a default domain for the independent variable, from –10 to 10 for an X-Y plot and 0° to 360° for a polar plot.

To create an X-Y QuickPlot of a single expression or function:

1.Type the expression or function of a single variable you want to plot. Click in the expression.

2.Choose Graph > X-Y Plot from the Insert menu.

3.Click outside the graph or press [Enter].

To change the default domain for the independent variable in a 2D QuickPlot, change the axis limits on the plot.

Defining an Independent Variable

You can set your own range by defining the independent variable as a range variable before creating the plot:

1.Define a range variable. See “Range Variables” on page 84.

2.Enter the expression or function you want to plot using that variable. Click in the expression.

3.Choose Graph > X-Y Plot from the Insert menu.

4.Type the name of the variable into the x- axis placeholder.

5.Click outside the graph or press [Enter].

Mathcad plots one point for every value of the range variable, and unless you specify otherwise, connects each pair of points with a straight line. To smooth out the curve, make the step size of the range variable smaller.

120 / Chapter 11 2D Plots

Plotting Multiple 2D Curves

You can graph several traces on the same X-Y or polar plot. A graph can show several y-axis (or radial) expressions against the same x-axis (or angular) expression. See Figure 11-3. Or it can match up several y-axis (or radial) expressions with the corresponding number of x-axis (or angular) expressions. See Figure 11-2.

To create a QuickPlot containing more than one trace:

1.Enter the expressions or functions of a single variable you want to plot, separated by commas.

2.Click in the expressions, then choose Graph > X-Y Plot from the Insert menu.

3.Click outside the graph or press [Enter].

In a QuickPlot with multiple traces, you need not use the same independent variable in every y-axis (or radial-axis) expression. Mathcad provides the appropriate corresponding variable in the x-axis (or angular-axis) placeholder.

To create a graph containing several independent curves:

1.Choose Graph > X-Y Plot from the Insert menu.

2.Enter two or more expressions separated by commas in the y-axis placeholder.

3.Enter the same number of expressions separated by commas in the x-axis placeholder.

If you specify more than one independent variable, Mathcad matches up the expressions in pairs — the first x-axis expression with first y-axis expression, the second with the second, and so on. It then draws a trace for each pair. Figure 11-2 shows an example.

Figure 11-2: Graph with multiple expressions on both axes.

Graphing Functions and Expressions / 121

Figure 11-3: Graph with multiple y-axis expressions.

Note All traces on a graph share the same axis limits. For each axis, all expressions and limits on that axis must have compatible units.

Creating a Parametric Plot

A parametric plot is one in which a function or expression is plotted against another function or expression with the same independent variable. You can create either an X-Y or polar parametric plot.

To create an X-Y parametric plot:

1.Choose Graph > X-Y Plot from the Insert menu.

2.In both the x-axis and y-axis placeholders, enter a function or expression.

3.Press [Enter].

Mathcad produces a QuickPlot over a default range for the independent variable. Figure 11-1 shows an example of a parametric plot.

If you don’t want Mathcad to use a default range for the plot, define the independent variable as a range variable before creating the plot. Mathcad plots one point for each value of the independent variable and connects each pair of points with a straight line. Figure 11-4 shows two functions of θ plotted against each other. The range variable θ was previously defined. See “Range Variables” on page 84.

Соседние файлы в папке doc