Professional Documents
Culture Documents
1
Task 11: Navigating and Customizing the PTC Mathcad Workspace ............................ 2
Task 12: Using the Help Center ................................................................................. 3
The PTC Mathcad user interface is designed to make your work intuitive and
simple. Most of the commands in PTC Mathcad are on the Ribbon. You can
customize your workspace by minimizing or maximizing the Ribbon and by adding
commands that you frequently use to the Quick Access Toolbar. To learn more
about a Ribbon command, you can read its tooltip and access context-sensitive
Help. After completing this exercise, you will be able to:
Navigate the PTC Mathcad workspace
Use the Help effectively
Proceed to Task 11
1
Task 11: Navigating and Customizing
the PTC Mathcad Workspace
In this exercise you are required to navigate the PTC Mathcad workspace and Help
Center. For your convenience, download a copy of this PDF file, open it from your
computer, and then continue.
4. Click the PTC Mathcad Button to view the list of commands in it, and then
examine the Quick Access Toolbar located next to the PTC Mathcad Button.
5. To add a button to the Quick Access Toolbar, on the Math tab, in the Regions
group, right-click the Text Block icon, and select Add to Quick Access Toolbar
from the shortcut menu.
Note
By default the Quick Access Toolbar is to the right of the PTC Mathcad Button
and above the Ribbon.
6. To remove the added button, right-click it, and select Remove from Quick
Access Toolbar.
2
Task 12: Using the Help Center
Opening and Navigating the Help
1. Click the Help icon on the top-right corner of the Ribbon. The Help
Center opens.
2. Use the Table of Contents on the left side to navigate the Help Center.
3. In the Search box, type copy math and click Search.
4. From the search results, open the Help topic To Copy Math Examples from
the Help.
5. Perform the steps in the topic and then close the Help Center.
6. On the Math tab, in the Regions group, place the pointer on the Solve Block
button. The command tooltip appears.
7. While the tooltip is visible, press F1. The Help topic About Solve Blocks
opens.
8. In the Related Links list, click Example: Solve Blocks with Inequality
Constraints. The Help topic opens.
9. Read the Example Help topic, minimize the Help Center window, and continue
by following the steps below.
1. To save the blank worksheet, click . The Save As dialog box opens.
2. Type a name for the file, keep the default .mcdx file extension selected, and
save the worksheet in the data_files directory.
About Exercise 1 3
Note
To verify that the current working directory is set properly, type the string
CWD= in the worksheet. The current working directory appears between
quotation marks.
3. Open the Help and type Example: Column, Normal Probability, and Box
Plots in the Search box. Click Search and open the topic from the search
results.
4. To copy the first expression in the topic Example: Column, Normal Probability,
and Box Plots to your worksheet, point to the expression graphic and click.
The expression is copied to the clipboard.
Note
You must click the graphic to copy the expression to the clipboard. Do not
press Ctrl+C.
5. To paste the expression, click inside the worksheet and press Ctrl+V.
Alternatively, right-click the worksheet and select Paste from the shortcut
menu.
The expression is copied to the worksheet.
6. To copy all the math expressions in the example, click Copy Expressions on
the top-right of the Help example.
7. Click inside the worksheet and press Ctrl+V. All expressions are copied to
the worksheet.
Note
This example uses the external data file furnace.csv. If your working
directory is not set to the data_files folder, the worksheet displays
calculation errors.
8. Edit the pasted math expressions to see how results change.
9. Save the worksheet and keep it open.
Open the Getting Started Tutorial in the Help Center and proceed to Exercise 2.
4
Task 21: Entering and Evaluating an Equation Page 1 of 2
eLearning Knowledge Base Your System Administrator has Installed: Search Learning Connector
2 recommended topics
PTC Learning Connector
Mathcad Prime 3.0 - Application Orientation
Get Started Setup
A math region is created, as indicated by the border around the number 19.
3. Click outside of the math region. The border disappears and the blue crosshair reappears.
4. Click on the number 19 to activate the math region again. Notice the blue cursor. Use the arrow keys to
move the cursor to the rightmost insertion point of the math region, as in step 2.
5. To insert the addition operator, type + (plus sign).
Type 5.
Do not insert spaces. PTC Mathcad inserts space around each operator as needed.
6. To insert the exponentiation operator, on the Math tab, in the Operators and Symbols group, click
Operators. The Operators list opens. Click xn. A placeholder appears.
Type 2.
When you point to an operator in the Operators list, a tooltip appears with a short description of the
operator and its keyboard shortcut.
7. To group the terms 19 and 52, press Spacebar 3 times. The group is complete when all the required terms
are highlighted.
http://127.0.0.1:61783/tutorials_en/tutorials/gst/task2-1_entering_and_evaluating_an_equation.html 9/13/2014
Task 21: Entering and Evaluating an Equation Page 2 of 2
PTC Mathcad inserts parentheses to indicate that you multiply the whole group.
9. To insert the cosine function, type cos.
10. To add an argument to the cosine function, type ( for the left and right parentheses.
The pair of parentheses appears with an empty placeholder in the middle. Notice that empty placeholders
also appeared in steps 5, 6, and 8 when you entered an operator. In most cases, when you see such a
placeholder, you must fill it in before you can evaluate the expression.
11. To insert the constant , type p, and then press Ctrl+G. For a list of constants, on the Math tab, in the
Operators and Symbols group, click Constants.
The evaluation operator and the result are displayed. To delete the result, you must first select the equal
sign and then press Delete or Backspace.
Proceed to Task 22.
http://127.0.0.1:61783/tutorials_en/tutorials/gst/task2-1_entering_and_evaluating_an_equation.html 9/13/2014
Task 22: Editing an Equation Page 1 of 3
eLearning Knowledge Base Your System Administrator has Installed: Search Learning Connector
3 recommended topics
PTC Learning Connector
Mathcad Prime 3.0 - Application Orientation
Get Started Setup
Note
For formatting a region, it is enough to select it. Click your worksheet and drag the pointer across the
region. A dark-gray rectangle expands around the selected region:
2. Click the addition operator. The operator is now blue, and both of its operands, the math terms 19 and 52,
are grouped.
3. To replace the addition operator with the square root and nth root operator, type \ (backslash) and then
press Enter. The result is automatically recalculated.
4. To delete or replace the root expression, double-click the nth root operator, and press Backspace or
Delete.
5. To undo the delete operation, press Ctrl+Z.
6. You no longer need the parentheses around the first term. You can select one of the parentheses and then
press Delete or Backspace. Both of the parentheses are deleted at once.
7. Practice moving the cursor around and in and out of the math region by pressing the Arrow keys,
Ctrl+Arrow keys, or the Home and End keys. Finish on the exponentiation operator ^.
8. To delete the exponentiation operator, press Backspace or Delete. The 5 and the 2 become one integer.
When you delete an operator, the outcome depends on the operator and on the operands. For more
information refer to the Operators book in the Help.
http://127.0.0.1:61783/tutorials_en/tutorials/gst/task2-2_editing_an_equation.html 9/13/2014
Task 22: Editing an Equation Page 2 of 3
9. To group the cosine function and its argument, drag the pointer over cos().
10. To insert the integral operator, press Ctrl+Shift+I. The operator appears with 3 additional placeholders
that are highlighted in blue:
11. Move the cursor to the lower and the upper limit placeholders for the integral operator, and type a lower
limit (0) and an upper limit (0.5 ) of integration, respectively.
12. Delete the cosine function argument, , and replace it with another Greek letter, such as . Type the
Roman letter a and then press Ctrl+G. For a list of symbols, on the Math tab, in the Operators and Symbols
group, click Symbols.
Place the cursor next to the cosine function argument and ensure that on the Math tab, in the Style
group, Labels is set to (none).
Note
Task 32 describes how to use labels.
13. To define the variable of integration, in the remaining placeholder, type the same Greek letter as in step
9.
14. To insert the division operator, place the cursor to the left of 52 and then type / (slash). A division bar
appears with a placeholder above it.
16. To group the math terms of the equation, drag the cursor from left to right:
http://127.0.0.1:61783/tutorials_en/tutorials/gst/task2-2_editing_an_equation.html 9/13/2014
Task 22: Editing an Equation Page 3 of 3
Notice how the position of the cursor influences the outcome. In step 11, you placed the cursor to the left
of 52. Then when you inserted the division operator, 52 became the denominator. In step 13, you placed
the cursor to the right of the group. Then when you inserted the division operator, the group became the
numerator.
Practice
Before moving on to the next exercise, enter and evaluate the following equation:
Note
You can type 2 and without inserting the multiplication operator. PTC Mathcad recognizes an implied
multiplication and it automatically inserts the scaling operator between the two terms. However, PTC
Mathcad identifies as a single variable. You must first insert , then insert the multiplication operator or
the scaling operator, and finally insert .
Proceed to Exercise 3.
http://127.0.0.1:61783/tutorials_en/tutorials/gst/task2-2_editing_an_equation.html 9/13/2014
Task 31: Defining and Evaluating Variables Page 1 of 2
eLearning Knowledge Base Your System Administrator has Installed: Search Learning Connector
2 recommended topics
PTC Learning Connector
Mathcad Prime 3.0 - Application Orientation
Get Started Setup
2. To insert a literal subscript, on the Math tab, in the Style group, click Subscript. The cursor moves below
the line of text. Type a.
3. To return the cursor to its normal position, click Subscript. Type the rest of the variable name, inserting
another literal subscript at the end of the name.
This operator looks different from the evaluation operator. It is used to assign a math expression to a
name.
5. Type 40^3. To move the cursor out of the exponent, press the Right Arrow key. Type s.
6. To highlight the name, click the variable name and then press Spacebar.
7. To copy the name, press Ctrl+C. To paste the name in a new math region, click below the variable
definition and then press Ctrl+V.
Notice that the s is now blue. PTC Mathcad recognized that the s is a unit (second).
9. Type an expression that contains the variable and evaluate it.
http://127.0.0.1:61783/tutorials_en/tutorials/gst/task3-1_defining_and_evaluating_variables.html 9/13/2014
Task 31: Defining and Evaluating Variables Page 2 of 2
All the terms in the addition must have compatible units. The final result is returned in seconds. For a list
of units, on the Math tab, in the Units group, click Units.
10. Delete the unit. The result is dimmed. If you click outside the math region, the s appears again to balance
the equation.
11. To evaluate the math region in minutes, in the empty unit placeholder, type min and then press Enter.
The result is recalculated to match the new unit.
12. To format the result, you must first select or activate the math region. To change the display of the result,
on the Math Formatting tab, in the Results group, select Scientific from the Result Format list.
13. To decrease the number of decimal points in the result, select 1 decimal place from the Display Precision
list.
Note
To apply result formatting globally, click a blank spot in the worksheet, and then set your preferred result
formatting options.
Proceed to Task 32.
http://127.0.0.1:61783/tutorials_en/tutorials/gst/task3-1_defining_and_evaluating_variables.html 9/13/2014
Task 32: Ordering Regions and Applying Labels Page 1 of 2
eLearning Knowledge Base Your System Administrator has Installed: Search Learning Connector
No recommended topics
PTC Learning Connector
http://127.0.0.1:61783/tutorials_en/tutorials/gst/task3-2_ordering_regions_and_applying_labels.html 9/13/2014
Task 32: Ordering Regions and Applying Labels Page 2 of 2
5. Repeat steps 2 and 3 and notice how labels affect the result of the math region.
In some cases PTC Mathcad automatically assigns labels to elements. For example, when you insert a
function, a constant, or a unit from the Ribbon, it is already labeled.
The label format for a particular math type is the same throughout the worksheet. To customize label
formats, you can use the options on theMath Formatting tab, in the Label Styles group.
For more information on labels, refer to the Help.
Proceed to Task 33.
http://127.0.0.1:61783/tutorials_en/tutorials/gst/task3-2_ordering_regions_and_applying_labels.html 9/13/2014
Task 33: Defining and Evaluating Functions Page 1 of 2
eLearning Knowledge Base Your System Administrator has Installed: Search Learning Connector
2 recommended topics
PTC Learning Connector
Mathcad Prime 3.0 - Application Orientation
Get Started Setup
Note
Another way to insert degrees is to type deg after 67. When you evaluate degrees, the result is returned
in radians:
2. Evaluate the built-in sine function for this angle. For a list of built-in functions, on the Functions tab, in the
Functions group, click All Functions.
3. Select the math region. On the Calculation tab, in the Controls group, click Disable Region. The disabled
math region is dimmed.
4. Change the angle definition to /6. The disabled region is not recalculated to account for the change in the
angle.
5. Select the disabled region, and then click Disable Region to toggle the control. The result is recalculated.
You can disable any region to freeze its result at a point in time. When you disable a variable definition,
other regions that use this variable return an error until you reactivate the variable definition.
http://127.0.0.1:61783/tutorials_en/tutorials/gst/task3-3_defining_and_evaluating_functions.html 9/13/2014
Task 33: Defining and Evaluating Functions Page 2 of 2
You can generalize a math expressions by assigning it to a function. You first define the function and its
arguments, and then evaluate it at specific points.
1. Insert a function name and the list of its arguments.
2. Insert the definition operator and then type the following expression:
In this function, cm denotes centimeters, and x and y are the arguments of function f. You can define one
function in terms of another function as long as their arguments match. Here, the argument of sin is x,
and x is also an argument of function f.
3. Evaluate function f at x = /2 and y = 2kg.
An error is returned. PTC Mathcad performed unit checking on the function and found that the units of x or
y were not compatible with the function definition (x must be an angle and y must be a length).
4. Evaluate function f at x = /5 and y = 3in.
The result is returned in meters because the default unit system is the SI system. To change unit system,
on the Math tab, in the Units group, select a new system from the Unit System list.
Practice
Before moving on to the next exercise, calculate the area of a triangle:
The general formula for the area of a triangle is 1/2 a b sin(), where a and b are the length of two of
the sides of the triangle, and is the angle between these sides. Define a 3-argument function for
calculating the area of triangles.
A triangle has two sides of 5mm and 1.5cm, and the angle between them is 32. Define these variables.
Make sure you type in all the units, including the degree for the angle.
Evaluate the function for this triangle and check that its area is 0.199cm2. Initially, the result is returned
in m2, so you must convert the units to cm2.
Proceed to Exercise 4.
http://127.0.0.1:61783/tutorials_en/tutorials/gst/task3-3_defining_and_evaluating_functions.html 9/13/2014
Task 41: Inserting Vectors Page 1 of 2
eLearning Knowledge Base Your System Administrator has Installed: Search Learning Connector
No recommended topics
PTC Learning Connector
3. For a matrix template, on the Matrices/Tables tab, in the Matrices and Tables group, click Insert Matrix. To
insert a row vector with 1 row and 6 columns, drag the pointer for a 1 6 matrix.
4. Type the following numbers in the empty placeholders. To move from one placeholder to the other, press
Tab to move forward or Shift+Tab to move backward, or press the Arrow keys.
5. Evaluate the following expression using your preferred method to enter vectors:
7. To group the two vectors, place the cursor to the left of the math region, and then press Spacebar twice.
On the Math tab, in the Operators and Symbols group, click Operators and select the Vectorization operator
from the Vector and Matrix list. Enter = to evaluate the expression. The vectors are multiplied term-by-
term.
http://127.0.0.1:61783/tutorials_en/tutorials/gst/task4-1_inserting_vectors.html 9/13/2014
Task 41: Inserting Vectors Page 2 of 2
http://127.0.0.1:61783/tutorials_en/tutorials/gst/task4-1_inserting_vectors.html 9/13/2014
Task 42: Defining Matrices Page 1 of 3
eLearning Knowledge Base Your System Administrator has Installed: Search Learning Connector
No recommended topics
PTC Learning Connector
3. To insert a row, press Shift+Enter, or place the pointer on the last element of the matrix (2 in this case)
and press Tab.
Note
To edit matrices from the Ribbon, on the Matrices/Tables tab, in the Rows and Columns group, select one o
the options.
4. Place the cursor in the leftmost empty placeholder. Type 5 6 2 7 9 1 8 5 4, pressing Tab between each
number.
6. On the Matrices/Tables tab, in the Matrices and Tables group, click Insert Matrix. To insert a matrix with 4
rows and 3 columns, drag the pointer for a 4 3 matrix.
http://127.0.0.1:61783/tutorials_en/tutorials/gst/task4-2_defining_matrices.html 9/13/2014
Task 42: Defining Matrices Page 2 of 3
When you add matrices, they must be of the same size. Here, both A and B are 4 3 matrices.
9. Evaluate elements of matrix C.
To evaluate the first element of matrix C, type C, insert the Matrix Index operator, and then type 0,0=
To evaluate the third element of the first column, type C, insert the Matrix Index operator, and then
type 2,0=
To evaluate the second element of the second column, type C, insert the Matrix Index operator, and
then type 1,1=
The indices are counted from the top leftmost element. The indices of the first element are controlled by
the system variable ORIGIN. You can change ORIGIN on the Calculation tab or in your worksheet. The
default value of ORIGIN is 0, so the indices of the first matrix element are (0, 0).
10. Assign new values to these three elements. For the first element, type C, insert the Matrix Index operator,
and then type 0,0:0
When you evaluate C, you can see the elements that you have redefined:
A range variable defines a number sequence. You can define range variables using the range operator or
the step range operator. For more information on the difference between these two operators, refer to the
Operators book in the Help.
2. To display the sequence of numbers associated with each range variable, evaluate the range variables.
http://127.0.0.1:61783/tutorials_en/tutorials/gst/task4-2_defining_matrices.html 9/13/2014
Task 42: Defining Matrices Page 3 of 3
When you evaluate a range variable, its sequence of numbers is presented as a column vector. However,
range variables and column vectors have different properties. For example, you cannot plot a range
variable against a column vector.
3. To define several matrix elements at once, insert the range variables as indices, and then refer to the
range variables in the math expression.
You must include a scaling or multiplication operator between the integers and the i or the j. Otherwise,
PTC Mathcad identifies the terms 2i and 3j as imaginary numbers:
Note
To change the format of complex results, on the Math Formatting tab, in the Results group, select a format
from the Complex Values list.
http://127.0.0.1:61783/tutorials_en/tutorials/gst/task4-2_defining_matrices.html 9/13/2014
Task 43: Extracting Data from Matrices Page 1 of 2
eLearning Knowledge Base Your System Administrator has Installed: Search Learning Connector
2. Type X. To insert the row operator, press Ctrl+Shift+R. Type 0 in the empty placeholder and then
evaluate the expression.
The first row of matrix X contains strings. You can use strings for adding headers in matrices. The rules for
editing strings are slightly different than for editing numbers. For example, you can insert spaces in a
string:
3. To extract the number of rows and columns from matrix X, call the rows and cols built-in functions.
The arguments for submatrix are as follows: the name of the matrix, the indices of the first and of the
last rows to extract, the indices of the first and of the last columns to extract. Function arguments are
described in the Help.
5. To extract the highest number from matrix Y, call max.
6. To extract the second column of Y, insert the column operator. The keyboard shortcut for the column
operator is Ctrl+Shift+C.
http://127.0.0.1:61783/tutorials_en/tutorials/gst/task4-3_extracting_data_from_matrices.html 9/13/2014
Task 43: Extracting Data from Matrices Page 2 of 2
You can combine functions and operators in expressions. For example, you can extract the lowest number
from the second column of matrix Y:
Practice
Before you move on to the next exercise, define M, v, and P using different methods for inserting arrays.
Extract the second row of P and its highest number. You can check your result by evaluating P. Redefine the
first element of P by a string, such as "header".
Proceed to Exercise 5.
http://127.0.0.1:61783/tutorials_en/tutorials/gst/task4-3_extracting_data_from_matrices.html 9/13/2014
Task 51: Creating a Plot with Multiple Traces Page 1 of 3
eLearning Knowledge Base Your System Administrator has Installed: Search Learning Connector
3 recommended topics
PTC Learning Connector
Mathcad Prime 3.0 - Plotting
Get Started Setup
2. On the Plots tab, in the Traces group, click Insert Plot. An empty plot appears.
3. In the y-axis placeholder, to the right of the plot, type 18 and drag the y-axis legend to the left.
4. In the x-axis placeholder, to the bottom of the plot, type x. Press Enter or click outside the plot region. A
line trace appears.
You can move from one placeholder to the next by pressing Tab or Shift+Tab. Ignore the unit placeholders
for this task.
http://127.0.0.1:61783/tutorials_en/tutorials/gst/task5-1_creating_a_plot_with_multiple_traces.html 9/13/2014
Task 51: Creating a Plot with Multiple Traces Page 2 of 3
5. Place the cursor adjacent to the 8 in 18. Click Add Trace. A new y-axis placeholder appears below the
current one.
Note
When you place the cursor to the leftmost insertion point of an axis expression, and then you add an axis
expression, the axis placeholder appears above the current one.
6. Type 16 - 0.05 x2 in the y-axis placeholder. Press Enter. A second trace appears.
http://127.0.0.1:61783/tutorials_en/tutorials/gst/task5-1_creating_a_plot_with_multiple_traces.html 9/13/2014
Task 51: Creating a Plot with Multiple Traces Page 3 of 3
7. Insert two y-axis placeholders and type the following y-axis expressions.
http://127.0.0.1:61783/tutorials_en/tutorials/gst/task5-1_creating_a_plot_with_multiple_traces.html 9/13/2014
Task 52: Formatting a Plot Page 1 of 6
eLearning Knowledge Base Your System Administrator has Installed: Search Learning Connector
5 recommended topics
PTC Learning Connector
Mathcad Prime 3.0 - Plotting
Get Started Setup
Copy Expressions
Start using Mathcad Prime 3.0 with these free
tutorials!
In a table, each column is a data set. The first row contains the name of each data set, the second row
defines the units of each data set (if any), and the remaining rows contain the data.
2. Add the name of the data sets and of the units where needed.
http://127.0.0.1:61783/tutorials_en/tutorials/gst/task5-2_formatting_a_plot.html 9/13/2014
Task 52: Formatting a Plot Page 2 of 6
Use tables to define column vectors. Afterward, you can work with the column vectors in your worksheet:
Copy Expressions
3. On the Plots tab, in the Traces group, click Insert Plot and select XY Plot. An empty XY plot region appears.
Drag the y-axis legend to the left of the plot.
4. In the y-axis placeholder, type Value. To insert a new y-axis expression, press Shift+Enter and then type
Charges.
Click the x-axis placeholder and then type Weight. Press Enter. The following traces appear. Notice that kg
appears automatically in the unit placeholder next to Weight.
5. Click Value. On the Plots tab, in the Styles group, select a shade of red from the Color Scheme list. Select
a cross from the Symbol list. The settings you chose are saved and appear on the Plots tab.
Click Charges. Click Symbol.
http://127.0.0.1:61783/tutorials_en/tutorials/gst/task5-2_formatting_a_plot.html 9/13/2014
Task 52: Formatting a Plot Page 3 of 6
Copy Expressions
6. Click Weight. Select (none) from the Line Style list. Both traces are formatted at once.
7. In the Axes group, click Logarithmic Scaling. The x-axis scaling becomes logarithmic. Click Charges and
once again, click Logarithmic Scaling. Both axes now have a logarithmic scale.
http://127.0.0.1:61783/tutorials_en/tutorials/gst/task5-2_formatting_a_plot.html 9/13/2014
Task 52: Formatting a Plot Page 4 of 6
Copy Expressions
8. On the y-axis, click the topmost tick mark value, 1000000. In the Format Plot Values group, select
Scientific from the Result Format list.
Click Weight, and then select Scientific from the Result Format list.
9. Drag each axis to a new location. The axis snaps to a tick mark on the other axis.
http://127.0.0.1:61783/tutorials_en/tutorials/gst/task5-2_formatting_a_plot.html 9/13/2014
Task 52: Formatting a Plot Page 5 of 6
Copy Expressions
Practice
Before you move on to the next exercise, copy and paste the following expressions to your worksheet.
http://127.0.0.1:61783/tutorials_en/tutorials/gst/task5-2_formatting_a_plot.html 9/13/2014
Task 52: Formatting a Plot Page 6 of 6
Copy Expressions
Proceed to Exercise 6.
http://127.0.0.1:61783/tutorials_en/tutorials/gst/task5-2_formatting_a_plot.html 9/13/2014
Task 61: Inserting and Formatting Text Page 1 of 1
eLearning Knowledge Base Your System Administrator has Installed: Search Learning Connector
2 recommended topics
PTC Learning Connector
Mathcad Prime 3.0 - Application Orientation
Get Started Setup
http://127.0.0.1:61783/tutorials_en/tutorials/gst/task6-1_inserting_and_formatting_text.html 9/13/2014
Task 62: Inserting Page Breaks and Images Page 1 of 1
eLearning Knowledge Base Your System Administrator has Installed: Search Learning Connector
http://127.0.0.1:61783/tutorials_en/tutorials/gst/task6-2_inserting_page_breaks_and_images.html 9/13/2014
Task 11: Creating a Program Page 1 of 2
eLearning Knowledge Base Your System Administrator has Installed: Search Learning Connector
2. Type localX.
The local variable localX is defined only within the program. You cannot refer to it outside the program.
3. On the Math tab, in the Operators and Symbols group, click Programming. The programming operators list
opens. Click Local Assignment and type 5.
This is the local assignment operator. The definition operator is not applicable inside a program.
Note
You can define a local program variable with the same name as a variable on the worksheet, but PTC
Mathcad treats these as two different variables.
4. To evaluate the program, press =. PTC Mathcad displays the evaluation of the last line of the program.
7. Type 2*localX and press F5 to calculate. PTC Mathcad recalculates the program.
Note
No matter how long your program is, the result is always displayed at the top right of the program.
8. To assign the last expression calculated in the program, assign the program to a variable as shown below.
http://127.0.0.1:61783/tutorials_en/tutorials/prgmt/task1-1_starting_a_program.html 9/13/2014
Task 11: Creating a Program Page 2 of 2
http://127.0.0.1:61783/tutorials_en/tutorials/prgmt/task1-1_starting_a_program.html 9/13/2014
Task 12: Defining Functions Page 1 of 1
eLearning Knowledge Base Your System Administrator has Installed: Search Learning Connector
After you define a function, you can call it and use it with parameters, such as numbers and variables.
2. Call the function with different values and verify that it returns 1 for positive numbers and 0 for
nonpositive numbers as shown below.
3. Define a function that calculates the greatest common divisor and the difference of two numbers:
Note
You can use all PTC Mathcad built-in functions inside a program.
4. Check the value of f(57,48).
The function output is a two-element vector. The first number is the greatest common divisor of the two
input numbers and the second number is the difference between them.
Proceed to Task 13.
http://127.0.0.1:61783/tutorials_en/tutorials/prgmt/task1-2_defining_functions.html 9/13/2014
Task 13: Using Operators Page 1 of 2
eLearning Knowledge Base Your System Administrator has Installed: Search Learning Connector
Note
PTC Mathcad identifies the letter m as a unit.
2. Define the angle as 23 degrees.
4. Add the required values in the integral placeholders and multiply the integral by 1/2 as shown below.
http://127.0.0.1:61783/tutorials_en/tutorials/prgmt/task1-3_using_operators.html 9/13/2014
Task 13: Using Operators Page 2 of 2
2. On the Functions tab, in the Statistics list, click mean. The function is added with empty placeholders.
3. Calculate the mean of m1 and m2 elements and delete the remaining placeholders.
Practice
Before you move on to the next exercise, define a function f that receives a vector v.
Function f is a program that uses PTC Mathcad built-in functions. It returns a three-element vector containing
the vectors length, the maximal element in the vector v, and the median of vector v.
Proceed to Exercise 2.
http://127.0.0.1:61783/tutorials_en/tutorials/prgmt/task1-3_using_operators.html 9/13/2014
Task 21: Writing If Statements Page 1 of 2
eLearning Knowledge Base Your System Administrator has Installed: Search Learning Connector
2 recommended topics
PTC Learning Connector
Mathcad Prime 3.0 - Programming Mathematical Expressions
Get Started Setup
2. To add an if statement, on the Math tab, in the Operators and Symbols group, click Programming. The
programming operators list opens. Click if.
Note
You can type the name of a programming operators, such as "if, and then press Ctrl+J to convert the
name to a programming operator with all its placeholders.
3. Condition that if the value of var is BLACK, the function returns the value WHITE as shown below. To add
the Boolean equal operator for comparison, on the Math tab, in the Operators and Symbols group, click
Operators. The operators list opens. Click = Equal To.
4. To add another if statement, position the cursor as shown below and press Enter.
If the cursor is positioned right after WHITE and you press Enter, PTC Mathcad adds a line inside the if
block.
5. Specify the opposite case as shown below.
Note
PTC Mathcad supports nested if statements.
http://127.0.0.1:61783/tutorials_en/tutorials/prgmt/task2-1_Writing_If_Statements.html 9/13/2014
Task 21: Writing If Statements Page 2 of 2
6. Call reverse and change the value of a variable myvar as shown below.
http://127.0.0.1:61783/tutorials_en/tutorials/prgmt/task2-1_Writing_If_Statements.html 9/13/2014
Task 31: Writing For Loops Page 1 of 1
eLearning Knowledge Base Your System Administrator has Installed: Search Learning Connector
2 recommended topics
PTC Learning Connector
Mathcad Prime 3.0 - Programming Mathematical Expressions
Get Started Setup
Note
You cannot modify the operator (belongs to). This operator is a part of the for statement syntax.
3. Specify an iterator i and a range of values (0..2) as shown below.
Note
The range of values can also be a single value, a vector, or a matrix defining the range of values.
The default origin of a vector or a matrix in PTC Mathcad is 0.
4. Assign zero to the first three elements of the vector as shown below.
http://127.0.0.1:61783/tutorials_en/tutorials/prgmt/task3-1_Writing_For_Loops.html 9/13/2014
Task 32: Writing While Loops Page 1 of 4
eLearning Knowledge Base Your System Administrator has Installed: Search Learning Connector
2 recommended topics
PTC Learning Connector
Mathcad Prime 3.0 - Programming Mathematical Expressions
Get Started Setup
Copy Expressions
Start using Mathcad Prime 3.0 with these free
tutorials!
2. To add an empty while loop, on the Math tab, in the Operators and Symbols group, click Programming, and
then click while.
3. Specify that the while loop should continue as long as n>0 and should decrement n by 1 inside the loop.
Note
Unlike for loops, you must increment or decrement the while iterator.
4. To add the current iterator value to the sum, type the following line as shown below, right after the while
statement.
Note
Update the iterator last; otherwise, you miss the first iteration addition.
6. Calculate the value of sigma for 5.
http://127.0.0.1:61783/tutorials_en/tutorials/prgmt/task3-2_Writing_While_Loops.html 9/13/2014
Task 32: Writing While Loops Page 2 of 4
Copy Expressions
Adding Continue Statements
Add continue statements to keep the loop running but to skip a specific iteration.
Write a function that sums all the numbers from 0 to n, except for numbers that can be divided by 17.
1. Copy the above function and rename it to sigma_not17.
2. Inside the while loop, add a new line under the while statement.
http://127.0.0.1:61783/tutorials_en/tutorials/prgmt/task3-2_Writing_While_Loops.html 9/13/2014
Task 32: Writing While Loops Page 3 of 4
2. To add an empty while loop, on the Math tab, in the Operators and Symbols group, click Programming, and
then click while.
Note
A while loop runs as long as the value of the expression inside the parenthesis is not 0.
4. Initialize sum and i.
5. Add the value of the iterator i to a variable sum and increment i by 1 inside the loop.
Note
http://127.0.0.1:61783/tutorials_en/tutorials/prgmt/task3-2_Writing_While_Loops.html 9/13/2014
Task 32: Writing While Loops Page 4 of 4
Copy Expressions
8. Calculate sum.
9. To break the loop and exit the program, select the break statement and on the Math tab, in the Operators
and Symbols group, click Programming, and then click return, to modify it to a return statement. Type sum
in the placeholder as shown below.
Note
Use return to immediately exit a program.
Practice
Before you move to the next task, write a function fact(n) that implements a factorial function using a while
loop. Define the loop to run as long as n is greater than 1. Inside the loop, multiple n by a variable product
(saving the factorial result) and decrement n by 1.
Note
In PTC Mathcad, program variables are set to 0 by default. In the beginning of the program, you must assign
1 to product. Otherwise, the program will yield 0 for all arguments.
Proceed to Task 33
http://127.0.0.1:61783/tutorials_en/tutorials/prgmt/task3-2_Writing_While_Loops.html 9/13/2014
Task 33: Writing Try-On-Error Statements Page 1 of 2
eLearning Knowledge Base Your System Administrator has Installed: Search Learning Connector
2 recommended topics
PTC Learning Connector
Mathcad Prime 3.0 - Programming Mathematical Expressions
Get Started Setup
2. To add a try block, on the Math tab, in the Operators and Symbols group, click Programming, and then click
try.
Note
When you add a try block, PTC Mathcad adds an on-error block.
3. Type 1/2x.
The try block is the function PTC Mathcad performs when no error occurs. It can contain several
expressions.
4. Place the cursor inside the on error block, and on the Math tab, in the Operators and Symbols group, click
Constants. Select the infinity sign ().
http://127.0.0.1:61783/tutorials_en/tutorials/prgmt/task3-3_Writing_Try_On_Error_Statements.html 9/13/2014
Task 33: Writing Try-On-Error Statements Page 2 of 2
http://127.0.0.1:61783/tutorials_en/tutorials/prgmt/task3-3_Writing_Try_On_Error_Statements.html 9/13/2014
About Exercise 1 Page 1 of 1
eLearning Knowledge Base Your System Administrator has Installed: Search Learning Connector
No recommended topics
PTC Learning Connector
About Exercise 1
Use PTC Mathcad solvers and solve blocks to solve systems of equations and to find the roots of a function.
Solvers are similar to PTC Mathcad built-in functions. They require a specific set of arguments, and they
provide one command to solve a problem. Each solver is designed to solve a specific problem. Solve blocks,
on the other hand, are special areas constructed of multiple regions. In these regions, you can define your
problem in natural notation. You can solve a greater variety of problems with solve blocks than with solvers.
You can parameterize your solve blocks and call them later in your worksheet. After completing this exercise,
you will be able to perform the following tasks:
Solve a linear or a nonlinear system of equations
Find the roots of a function
Parameterize a solve block
Proceed to Task 11.
http://127.0.0.1:61783/tutorials_en/tutorials/st/about_exercise_1.html 9/13/2014
About Exercise 2 Page 1 of 1
eLearning Knowledge Base Your System Administrator has Installed: Search Learning Connector
No recommended topics
PTC Learning Connector
About Exercise 2
With solve blocks, you can perform optimization. You can find the parameters that minimize or maximize a
function and you can add constraints to restrict the optimization. After completing this exercise, you will be
able to perform the following tasks:
Maximize or minimize a function
Add constraints when optimizing a function
Proceed to Task 21.
http://127.0.0.1:61783/tutorials_en/tutorials/st/about_exercise_2.html 9/13/2014
About Exercise 3 Page 1 of 1
eLearning Knowledge Base Your System Administrator has Installed: Search Learning Connector
No recommended topics
PTC Learning Connector
About Exercise 3
You can solve stiff and non-stiff ordinary differential equations (ODEs) with solvers or with solve blocks. In
addition, you can calculate the Jacobian. After completing this exercise, you will be able to perform the
following tasks:
Solve stiff and non-stiff ODEs
Model ODEs in State-Space
Parameterize ODEs
Work with the Jacobian
Proceed to Task 31.
http://127.0.0.1:61783/tutorials_en/tutorials/st/about_exercise_3.html 9/13/2014
About the Solving Tutorial Page 1 of 1
eLearning Knowledge Base Your System Administrator has Installed: Search Learning Connector
No recommended topics
PTC Learning Connector
http://127.0.0.1:61783/tutorials_en/tutorials/st/about_the_solving_tutorial.html 9/13/2014
Task 11: Linear System of Equations Page 1 of 5
eLearning Knowledge Base Your System Administrator has Installed: Search Learning Connector
Problem Definition
The following functions are linear functions:
You want to find the coordinates of the crossing point (x, y) where the following equations hold true:
http://127.0.0.1:61783/tutorials_en/tutorials/st/task1-1_linear_system_of_equations.html 9/13/2014
Task 11: Linear System of Equations Page 2 of 5
The equations can be rearranged so that the variables are on the left of the equations:
Each vector and matrix in the equation above can be represented by a variable:
The arrays M and v are known, but X is unknown. X is a 2-element vector representing the x and y
coordinates of the crossing point.
3. Evaluate X.
The x value of the crossing point is 5.714 and the y value is -0.714.
2. Call lsolve.
http://127.0.0.1:61783/tutorials_en/tutorials/st/task1-1_linear_system_of_equations.html 9/13/2014
Task 11: Linear System of Equations Page 3 of 5
The following solve block calculates the crossing point of the two functions:
2. To insert a solve block region, on the Math tab, in the Regions group, click Solve Block.
http://127.0.0.1:61783/tutorials_en/tutorials/st/task1-1_linear_system_of_equations.html 9/13/2014
Task 11: Linear System of Equations Page 4 of 5
To resize a solve block region, you can drag its thick borders. When you move a solve block in your
worksheet, all the regions in the solve block move with it.
3. In the solve block region, type guess values for your problem. PTC Mathcad uses the guess values as the
starting point for finding the solution.
4. Type the constraints that limit the problem. You must use the Boolean operators when you define
constraints. Insert the Boolean equal to operator.
The first constraint defines the value of x at the crossing point, and the second constraint defines the
value of y at that point.
5. Insert the solve block function name and arguments. Here, type find, and then type x and y as the
function arguments. You must label find as a keyword. Click the word find, and then, on the Math tab, in
the Style group, select Keyword from the Labels list.
http://127.0.0.1:61783/tutorials_en/tutorials/st/task1-1_linear_system_of_equations.html 9/13/2014
Task 11: Linear System of Equations Page 5 of 5
http://127.0.0.1:61783/tutorials_en/tutorials/st/task1-1_linear_system_of_equations.html 9/13/2014
Task 12: Nonlinear System of Equations Page 1 of 3
eLearning Knowledge Base Your System Administrator has Installed: Search Learning Connector
http://127.0.0.1:61783/tutorials_en/tutorials/st/task1-2_nonlinear_system_of_equations.html 9/13/2014
Task 12: Nonlinear System of Equations Page 2 of 3
f crosses the x-axis at the same x value as the crossing point of the nonlinear functions. f is a polynomial, so
you can use polyroots instead of the more general root solver to find where f crosses the x-axis.
1. Assign the polynomial coefficients to vector c. The first element of c is the intercept and the next elements
are the coefficients for each power of x, in ascending order.
2. Call polyroots. The real solution (the first element of r) is the x value of the crossing point.
Note
polyroots returns all the solutions, including the complex solutions, at once. Solve blocks return only one
http://127.0.0.1:61783/tutorials_en/tutorials/st/task1-2_nonlinear_system_of_equations.html 9/13/2014
Task 12: Nonlinear System of Equations Page 3 of 3
solution at a time. To find other solutions with solve blocks, you must change the guess values.
3. Evaluate y1 and y2 at x. The result is the same, since it is the y value of the crossing point.
http://127.0.0.1:61783/tutorials_en/tutorials/st/task1-2_nonlinear_system_of_equations.html 9/13/2014
Task 13: Finding Roots Page 1 of 2
eLearning Knowledge Base Your System Administrator has Installed: Search Learning Connector
root searches a solution in the interval 4 < x < 8. The solution is slightly greater than 6, as expected from
the plot.
Note
With root, you can find the roots of a function with one unknown only.
http://127.0.0.1:61783/tutorials_en/tutorials/st/task1-3_finding_roots.html 9/13/2014
Task 13: Finding Roots Page 2 of 2
3. To find the root directly to the right of the origin, define a new guess value.
http://127.0.0.1:61783/tutorials_en/tutorials/st/task1-3_finding_roots.html 9/13/2014
Task 14: Parameterizing Solve Blocks Page 1 of 4
eLearning Knowledge Base Your System Administrator has Installed: Search Learning Connector
2 recommended topics
PTC Learning Connector
Mathcad Prime 3.0 - Symbolics and Solving
Get Started Setup
Copy Expressions
Start using Mathcad Prime 3.0 with these free
tutorials!
If you define a guess value inside the solve block region, it is defined locally. It does not affect the value of
the variable in the worksheet.
You can assign the solution to a variable and use it later in your worksheet.
You can assign the solution to a function that has the same arguments as the parameters of the solve block.
Here, the parameter is a.
http://127.0.0.1:61783/tutorials_en/tutorials/st/task1-4_parameterizing_solve_blocks.html 9/13/2014
Task 14: Parameterizing Solve Blocks Page 2 of 4
Copy Expressions
With function f, you can evaluate the solution for a specific value of a:
You can also plot function f to visualize how it varies depending on parameter a.
Practice
Before you move on to the next exercise, consider the following problem. Two balls roll towards each other
before colliding:
http://127.0.0.1:61783/tutorials_en/tutorials/st/task1-4_parameterizing_solve_blocks.html 9/13/2014
Task 14: Parameterizing Solve Blocks Page 3 of 4
You can set up a solve block to find the velocities of the balls after collision as follows:
Copy Expressions
The guess values have units compatible with the solve block solution.
The constraints are the conservation of momentum and the conservation of energy.
The solve block solution, V(m.a), is a vector function. v.a and v.b are labeled as functions, so they can be
distinguished from variables in the following calculations.
The change in momentum during the collision:
You can plot the final velocities and the change in momentum and energy in terms of m.a.
http://127.0.0.1:61783/tutorials_en/tutorials/st/task1-4_parameterizing_solve_blocks.html 9/13/2014
Task 14: Parameterizing Solve Blocks Page 4 of 4
Copy Expressions
Click Copy Expressions on the top-right corner of this topic. To paste the expressions in a new worksheet,
click the worksheet and then press Ctrl+V. Change the value of u.a to 2, and the unit of u.b to ft/s and notice
how the changes affect the plot.
Proceed to Exercise 2.
http://127.0.0.1:61783/tutorials_en/tutorials/st/task1-4_parameterizing_solve_blocks.html 9/13/2014
Task 21: Optimizing Functions Page 1 of 2
eLearning Knowledge Base Your System Administrator has Installed: Search Learning Connector
No recommended topics
PTC Learning Connector
1. Enter the following solve block. Define the guess value for the maximum to be x = 30 and then maximize
the Bessel function J0.
Note
You must enter the function J0 without adding its list of arguments, contrary to the command find.
2. Evaluate xmax.
http://127.0.0.1:61783/tutorials_en/tutorials/st/task2-1_optimizing_functions.html 9/13/2014
Task 21: Optimizing Functions Page 2 of 2
The solve block detects a local maximum at x = 7.016. The actual maximum is at x = 0, as you can see in
the plot above.
3. Change the guess value and evaluate xmax.
The solve block detects the desired solution. When possible, it is good practice to plot the function that
you want to optimize. With this approach, you can choose an appropriate guess value.
Proceed to Task 22.
http://127.0.0.1:61783/tutorials_en/tutorials/st/task2-1_optimizing_functions.html 9/13/2014
Task 22: Optimization with Constraints Page 1 of 2
eLearning Knowledge Base Your System Administrator has Installed: Search Learning Connector
No recommended topics
PTC Learning Connector
3. Enter the following solve block. Define guess values for a and b, define the function for maximizing the
area, and define the condition d < r for keeping the rectangle inside the circle. To solve for a and b, call
maximize.
http://127.0.0.1:61783/tutorials_en/tutorials/st/task2-2_optimization_with_constraints.html 9/13/2014
Task 22: Optimization with Constraints Page 2 of 2
4. Evaluate A, B, and d.
http://127.0.0.1:61783/tutorials_en/tutorials/st/task2-2_optimization_with_constraints.html 9/13/2014
Task 23: Nonlinear Least Squares Fitting Page 1 of 3
eLearning Knowledge Base Your System Administrator has Installed: Search Learning Connector
No recommended topics
PTC Learning Connector
2. Define a fitting function, the Weibull density with unknown parameters and .
3. Define the residuals, the difference between the y values from the data set and the y values calculated
with Wb.
5. To find the parameters and that best fit the Weibull function, enter the solve block below. Define guess
values for and , and then call minimize.
http://127.0.0.1:61783/tutorials_en/tutorials/st/task2-3_nonlinear_least_squares_fitting.html 9/13/2014
Task 23: Nonlinear Least Squares Fitting Page 2 of 3
7. Calculate the mean squared error. This value is zero when a true solution exists.
9. To fit the parameters using the constraint resid = 0, enter the following solve block:
http://127.0.0.1:61783/tutorials_en/tutorials/st/task2-3_nonlinear_least_squares_fitting.html 9/13/2014
Task 23: Nonlinear Least Squares Fitting Page 3 of 3
You cannot use find here because there is no exact solution for 2 and 2. An error is returned to indicate
that no solution exists. minerr works the same way as find, except that it returns an approximate
solution if it fails to converge to the solution within a set number of iterations.
10. Calculate the mean squared error for the new parameters.
Practice
Before you move on to the next exercise, find the price for an item assuming that you want to maximize
profit, n p. The relationship between the number of items sold and the price is described by the function n:
Plot the profit function for 0 < p < 10 before choosing a guess value.
Proceed to Exercise 3.
http://127.0.0.1:61783/tutorials_en/tutorials/st/task2-3_nonlinear_least_squares_fitting.html 9/13/2014
Task 31: Modeling ODEs in State-Space Page 1 of 3
eLearning Knowledge Base Your System Administrator has Installed: Search Learning Connector
Problem Definition
Consider the classical mass-spring-damper system:
The dynamical equation for this system is given by the following equation:
You can represent this system with a state-space model expressed in the following form:
AState matrix
BInput matrix
COutput matrix
DDirect transmission matrix
http://127.0.0.1:61783/tutorials_en/tutorials/st/task3-1_modeling_ODEs_in_state_space.html 9/13/2014
Task 31: Modeling ODEs in State-Space Page 2 of 3
xState vector
uInput
yMeasured or controlled output
Note
You can obtain the linear system above by linearizing the state and the output nonlinear equations that
model the system dynamics.
Use two state variables for this second order system.
2. Define the input to be the heaviside step function. To insert the step function, type F, and then press
Ctrl+G.
3. Define the initial condition of the two variables. To type i as a literal subscript, on the Math tab, in the
Style group, click Subscript, and then type i.
4. Define time boundaries over which you want to find the system solution.
http://127.0.0.1:61783/tutorials_en/tutorials/st/task3-1_modeling_ODEs_in_state_space.html 9/13/2014
Task 31: Modeling ODEs in State-Space Page 3 of 3
5. Define the number of points at which you want to find the solution, excluding ti.
The first column of the matrix sol contains the time at which the solution is found. Its remaining columns
contain the state variables x1 and x2 at that time.
7. Extract t, x1, and x2 from matrix sol.
The plot shows the transient response characteristics such as the rise time, the overshoot, and the settling
time.
Proceed to Task 32.
http://127.0.0.1:61783/tutorials_en/tutorials/st/task3-1_modeling_ODEs_in_state_space.html 9/13/2014
Task 32: Solving ODEs with ODE Solvers Page 1 of 2
eLearning Knowledge Base Your System Administrator has Installed: Search Learning Connector
The system parameters were m = 1, b = 0.5, and k = 3. The input was a heaviside step function, u(t) = (t).
You can rewrite the second-order equation in terms of first-order ODEs:
The arguments of D are t, the independent variable, and X, the vector of dependent variables:
3. Define the initial and the final times over which to evaluate the solution.
Alternatively, you can replace the AdamsBDF solver by another ODE solver. For more information
refer to the About Differential Equation Solvers topic in the Help.
The solution is a 3-column matrix with the time, the displacement, and the velocity of the system for
http://127.0.0.1:61783/tutorials_en/tutorials/st/task3-2_solving_ODEs_with_ODE_solvers.html 9/13/2014
Task 32: Solving ODEs with ODE Solvers Page 2 of 2
6. Extract the time and the displacement from Sol and plot them one against the other.
The AdamsBDF solver is a hybrid solver. It starts with the non-stiff Adams solver. If it identifies the
problem as stiff, it switches to the stiff BDF solver.
Proceed to Task 33.
http://127.0.0.1:61783/tutorials_en/tutorials/st/task3-2_solving_ODEs_with_ODE_solvers.html 9/13/2014
Task 33: Solving ODEs with Solve Blocks Page 1 of 3
eLearning Knowledge Base Your System Administrator has Installed: Search Learning Connector
3. Enter the following solve block. On the Math tab, in the Operators and Symbols group, click Operators and
then click the Prime Operator to enter the derivatives of x. Define the initial conditions of your problem.
Call odesolve and label it as a keyword.
Note
When solving ODEs in solve blocks, you must define initial or boundary conditions for your problem
instead of guess values.
4. Plot the solution over the range 0 < t < 10.
http://127.0.0.1:61783/tutorials_en/tutorials/st/task3-3_solving_ODEs_with_solve_blocks.html 9/13/2014
Task 33: Solving ODEs with Solve Blocks Page 2 of 3
Parameterizing ODEs
1. Copy and paste the solve block to a new spot in your worksheet.
2. Parameterize the initial conditions. You must add one argument per parameter to the function definition.
Here, define y(a, b).
http://127.0.0.1:61783/tutorials_en/tutorials/st/task3-3_solving_ODEs_with_solve_blocks.html 9/13/2014
Task 33: Solving ODEs with Solve Blocks Page 3 of 3
http://127.0.0.1:61783/tutorials_en/tutorials/st/task3-3_solving_ODEs_with_solve_blocks.html 9/13/2014
Task 34: Solving Multiple ODEs with Solve Blocks Page 1 of 4
eLearning Knowledge Base Your System Administrator has Installed: Search Learning Connector
http://127.0.0.1:61783/tutorials_en/tutorials/st/task3-4_solving_multiple_ODEs_with_solve_blocks.ht... 9/13/2014
Task 34: Solving Multiple ODEs with Solve Blocks Page 2 of 4
4. Copy and paste the solve block and parameterize the initial conditions.
http://127.0.0.1:61783/tutorials_en/tutorials/st/task3-4_solving_multiple_ODEs_with_solve_blocks.ht... 9/13/2014
Task 34: Solving Multiple ODEs with Solve Blocks Page 3 of 4
http://127.0.0.1:61783/tutorials_en/tutorials/st/task3-4_solving_multiple_ODEs_with_solve_blocks.ht... 9/13/2014
Task 34: Solving Multiple ODEs with Solve Blocks Page 4 of 4
http://127.0.0.1:61783/tutorials_en/tutorials/st/task3-4_solving_multiple_ODEs_with_solve_blocks.ht... 9/13/2014
Task 35: Working with the Jacobian Page 1 of 3
eLearning Knowledge Base Your System Administrator has Installed: Search Learning Connector
2. Integrate the function over the region. You must divide the integral in two, first integrating over the left-
side of the x-y plane, and then over its right-side.
You can introduce new variables to transform the plane and to simplify the integral.
The region of integration for these new variables has borders that are parallel to the axes.
http://127.0.0.1:61783/tutorials_en/tutorials/st/task3-5_working_with_the_jacobian.html 9/13/2014
Task 35: Working with the Jacobian Page 2 of 3
When you convert variables for multiple integrals, you must calculate the Jacobian to scale the
integration.
4. Define a vector function F(u, v).
8. Scale the integral with the absolute value of the Jacobian, and evaluate the result.
http://127.0.0.1:61783/tutorials_en/tutorials/st/task3-5_working_with_the_jacobian.html 9/13/2014
Task 35: Working with the Jacobian Page 3 of 3
With the new variables, only one integral is needed to integrate the function.
Practice
Before you finish the tutorial, find the time it takes for an object thrown up in the air to reach its highest
point. Set up a solve block with the differential equation x = -9.8 and with the initial conditions x(0) = 2 and
x(0) = 3. Set up a second solve block to optimize the function returned by the first solve block.
You can check your answer by plotting the function returned by the first solve block between 0 < t < 1. You
can add units as long as you ensure that the units are compatible throughout your calculations.
http://127.0.0.1:61783/tutorials_en/tutorials/st/task3-5_working_with_the_jacobian.html 9/13/2014