TRN 4010 003 01 - SG Ins - Lec - EN
TRN 4010 003 01 - SG Ins - Lec - EN
TRN 4010 003 01 - SG Ins - Lec - EN
rP
TC
In
te
rn
al
se
nl
Copyright 2013 PTC Inc. and/or Its Subsidiary Companies. All Rights Reserved.
User and training guides and related documentation from PTC Inc. and its subsidiary companies
(collectively "PTC") are subject to the copyright laws of the United States and other countries
and are provided under a license agreement that restricts copying, disclosure, and use of such
documentation. PTC hereby grants to the licensed software user the right to make copies in
printed form of this documentation if provided on software media, but only for internal/personal use
and in accordance with the license agreement under which the applicable software is licensed.
Any copy made shall include the PTC copyright notice and any other proprietary notice provided
by PTC. Training materials may not be copied without the express written consent of PTC. This
documentation may not be disclosed, transferred, modified, or reduced to any form, including
electronic media, or transmitted or made publicly available by any means without the prior written
consent of PTC and no authorization is granted to make copies for such purposes.
Information described herein is furnished for general information only, is subject to change without
notice, and should not be construed as a warranty or commitment by PTC. PTC assumes no
responsibility or liability for any errors or inaccuracies that may appear in this document.
nl
The software described in this document is provided under written license agreement, contains
valuable trade secrets and proprietary information, and is protected by the copyright laws of the
United States and other countries. It may not be copied or distributed in any form or medium,
disclosed to third parties, or used in any manner not provided for in the software licenses agreement
except with written prior approval from PTC.
rn
al
se
te
Important Copyright, Trademark, Patent, and Licensing Information: See the About Box, or
copyright notice, of your PTC software.
UNITED STATES GOVERNMENT RESTRICTED RIGHTS LEGEND
rP
TC
In
This document and the software described herein are Commercial Computer Documentation and
Software, pursuant to FAR 12.212(a)-(b) (OCT95) or DFARS 227.7202-1(a) and 227.7202-3(a)
(JUN95), and are provided to the US Government under a limited commercial license only. For
procurements predating the above clauses, use, duplication, or disclosure by the Government
is subject to the restrictions set forth in subparagraph (c)(1)(ii) of the Rights in Technical Data
and Computer Software Clause at DFARS 252.227-7013 (OCT88) or Commercial Computer
Software-Restricted Rights at FAR 52.227-19(c)(1)-(2) (JUN87), as applicable. 01282013
PTC Inc., 140 Kendrick Street, Needham, MA 02494 USA
PRINTING HISTORY
Fo
Document No.
TRN-4010-M02-EN-LM-P01
Printed in the U.S.A
Date
Description
10/21/2013
In
te
rn
al
se
nl
rP
TC
The course you are about to take will expose you to a number of learning
offerings that PTC University has available. These include:
Fo
nl
se
Europe
al
Asia
rn
Fo
rP
TC
In
te
In addition, you can access the PTC Web site at www.ptc.com. Our Web
site contains the latest training schedules, registration information, directions
to training facilities, and course descriptions. You can also reach technical
support, and register for online service options such as knowledge base
searches, reference libraries and documentation. You can also find general
information about PTC, PTC Products, Consulting Services, Customer
Support, and PTC Partners.
Precision Learning
The Precision Learning Methodology
PTC developed the Precision Learning methodology to provide you with an
effective, comprehensive learning experience. This methodology is based on
a cycle of learn, assess and improve.
In
te
rn
al
se
nl
rP
TC
Fo
At the end of the class, you will either take a Pro/FICIENCY assessment
via your PTC University account, or your instructor will provide training on
how to do this after the class.
nl
Fo
rP
TC
In
te
rn
al
se
Please note that Web-based training may not be available in all languages.
The Web-based training is available in your account for one year after the
live class.
Fo
rP
TC
In
te
rn
al
se
nl
Before the end of the class, your instructor will review the map
corresponding to the course you are taking. This review, along with instructor
recommendations, should give you some ideas for additional training that
corresponds to your role and job functions.
al
se
nl
Concept this section contains the initial introduction to the topic and is
presented during the class lecture.
Theory this sections provides detailed information introduced in the
Concept.
Procedure This section provides step-by-step instructions on how to
complete the topic within MATHCAD. Procedures are short, focused,
and simple exercises that cover the specific topics to which they apply.
Procedures are found in this Student Handbook only. Not every topic has a
Procedure as there are knowledge topics that can not be exercised.
Exercise Exercises are longer than procedures, and may cover multiple
topics, so not every topic will have an associated exercise. Exercises are
typically more involved and use more complicated models. Exercises are
found in the printed Exercise Guide and the online exercise HTML files.
rn
Additionally, these topics are organized into modules. Except for the first
module, all modules are grouped to keep similar functionality together.
Fo
rP
TC
In
te
The first module is a process module. In this module, you will find the generic
process used to solve the common types of Behavioral Modeling problems.
Training Agenda
12
13
14
15
16
17
18
19
20
21
22
3-D Plotting
Boolean Conditions
Symbolics
Solving
Optimization
Differential Equations
Programming
Data Exchange
Data Analysis
Project Day 2
Challenge Exercise Solutions
Fo
rP
TC
In
te
rn
al
Day 2
Module
Module
Module
Module
Module
Module
Module
Module
Module
Module
Module
nl
Getting Started
Documenting and Formatting
Entering and Editing Math
Variables
Functions
Range Variables
Controlling Calculations
Vectors and Matrices
Units
2-D Plotting
Project Day 1
se
01
02
03
04
05
06
07
08
09
10
11
Module
Module
Module
Module
Module
Module
Module
Module
Module
Module
Module
Day 1
rP
TC
Fo
al
rn
te
In
se
nl
Table of Contents
Mathcad Prime 3.0 Essentials
Getting Started ............................................................................1-1
Opening Mathcad ....................................................................1-2
The Mathcad Workspace ..........................................................1-5
Mathcad Worksheets ...............................................................1-6
Saving Mathcad Files ...............................................................1-7
se
nl
rn
al
rP
TC
In
te
Variables ....................................................................................4-1
Defining a Variable ..................................................................4-2
Numerically Evaluating a Variable ...............................................4-5
Defining a Global Variable .........................................................4-7
Assigning an Expression Retroactively ........................................4-9
Using Literal Subscripts .......................................................... 4-11
Fo
Functions ...................................................................................5-1
Defining a User-Defined Function ...............................................5-2
Inserting a Built-In Function .......................................................5-5
Design of Experiments Functions ...............................................5-8
Using Deprecated Functions......................................................5-9
Range Variables ..........................................................................6-1
Defining a Range Variable.........................................................6-2
Using a Range Variable ............................................................6-7
Controlling Calculations ...............................................................7-1
Controlling Calculations ............................................................7-2
Using Calculation Options .........................................................7-5
Using Areas ...........................................................................7-6
Vectors and Matrices ...................................................................8-1
Vectors and Matrices ...............................................................8-2
Defining Vectors and Matrices....................................................8-5
se
nl
rn
al
rP
TC
In
te
Fo
nl
al
se
te
rn
Fo
rP
TC
In
rP
TC
Fo
al
rn
te
In
se
nl
1
y
Module
nl
Getting Started
se
Module Overview
In this module, you learn how to open Mathcad and save Mathcad files.
Objectives
Fo
rP
TC
In
te
rn
al
2013 PTC
Module 1 | Page 1
Opening Mathcad
This process enables you to open Mathcad, a new worksheet,
or an existing file.
To get started:
se
nl
rP
TC
In
te
rn
al
Fo
Opening Mathcad
Module 1 | Page 2
2013 PTC
Open Mathcad.
button.
rP
TC
In
te
rn
al
se
Task 2:
nl
Fo
2. Click New
. A new
worksheet tab opens.
2013 PTC
Module 1 | Page 3
Task 3:
nl
click Open
button and
Fo
rP
TC
In
te
rn
al
se
Module 1 | Page 4
2013 PTC
nl
se
rn
al
Fo
rP
TC
In
te
Module 1 | Page 5
Mathcad Worksheets
Display and calculate your work in Mathcad worksheets.
Math, text, and other elements
are contained in regions in your
worksheet. The following types of
regions are available:
nl
Math
Table
Plot
Solve Block
Image
Text Block or Box
In
Mathcad Worksheets
te
rn
al
se
Math
Table
Plot
Solve Block
Image
Text Block or Box
Fo
rP
TC
Mathcad worksheets are where you display and calculate your work. You can
have multiple worksheets open in Mathcad at once. To display a worksheet,
select the tab for that worksheet. Math, text, and other elements are contained
in regions in your worksheet. The following types of regions are available:
The Document tab contains commands that enable you to customize your
worksheet. The following commands are available:
Module 1 | Page 6
2013 PTC
se
nl
MCDX
MCTX
XPS
te
rn
al
In
To save a Mathcad file, select one of the following file types to Save As:
Fo
rP
TC
MCDX The default save format for Mathcad files is a Mathcad MCDX
document (.mcdx).
MCTX You can save your document as a template that can be used to
create future worksheets.
XPS You can also select an XML Paper Specification format (.xps). The
XPS format is Microsofts electronic paper file format and is similar to
a PDF.
2013 PTC
Module 1 | Page 7
button and
.
nl
se
4. Click Save.
Fo
rP
TC
In
te
rn
al
Module 1 | Page 8
2013 PTC
2
nl
Module
se
Module Overview
al
Objectives
Fo
rP
TC
In
te
rn
2013 PTC
Module 2 | Page 1
Text Regions
Mathcad supports calculation documentation through the use
of text regions.
Text regions:
Are text blocks or text boxes.
Contain resize handles.
Have a text style that you can view
on the Text Formatting tab which
determines:
Font
Size
Color
Other standard text properties
al
se
nl
rn
te
Text Regions
In
rP
TC
Fo
A text block is a text region that extends the full page width and does not
overlap with other regions in the worksheet. A text box is a text region that
expands as text is typed and can be moved across the worksheet. Text boxes
contain a resize handle to control the width of the region.
Alter justification.
Add bullets or numbers to lists.
Decrease or increase font size.
Locally modify text.
Module 2 | Page 2
2013 PTC
nl
Task 2:
se
U
rn
al
te
Fo
rP
TC
In
2013 PTC
Module 2 | Page 3
nl
se
You can insert a math region in a text block or a text box. The embedded
math region is live. Mathematical functions, equations, and definitions are
evaluated as if they were located outside of the text.
The embedded math region can include:
rn
al
Expressions
Definitions
Functions
Matrices
Fo
rP
TC
In
te
Module 2 | Page 4
2013 PTC
nl
to embed a math
Region
region in the text region.
al
se
te
rn
Fo
rP
TC
In
2013 PTC
Module 2 | Page 5
nl
You can format worksheets using one or more of the following options:
se
te
rn
al
Insert and delete blank lines by right-clicking a blank area between two
regions and selecting Add Space or Remove Space.
Separate overlapping regions by selecting both regions, right-clicking, and
selecting Separate Regions Vertically or Separate Regions Horizontally.
Toggle the worksheet grid off and on by selecting the Document tab. In the
rP
TC
In
.
Page group, click Show Grid
Adjust the grid size by selecting the Document tab. In the Page group, click
Grid Size and select Standard or Fine from the Grid Size drop-down list.
To edit the header or footer, select the Document tab. In the Headers and
Footers group, click Header
Fo
Module 2 | Page 6
2013 PTC
nl
Math styles
Text styles
Page defaults
Headers and footers
Numerical formats
Unit systems
Calculation mode
Plot values
se
rn
al
Fo
rP
TC
In
te
From My Templates
From Shared Templates
From Default Templates
Alternately, you can select a template from the Recently Used Templates
section.
Once your new worksheet has been created using the template, save your
worksheet as a .mcdx file using a new file name.
2013 PTC
Module 2 | Page 7
y
nl
O
se
U
al
rn
te
In
rP
TC
Fo
Module 2 | Page 8
2013 PTC
3
nl
Module
se
Module Overview
In this module, you learn how to input math in a Math region in Mathcad, edit
the mathematical expressions you typed, and format the evaluated results.
al
Objectives
Fo
rP
TC
In
te
rn
2013 PTC
Module 3 | Page 1
Using Operators
Operators are symbols, such as the plus sign (+) and the
minus sign (-), that link variables and numbers together to form
expressions.
When typing or modifying a
mathematical expression in Mathcad
you can:
nl
Insert an operator.
Identify the operands.
Modify an existing operator.
se
Using Operators
al
Operators are symbols, such as the plus sign (+) and the minus sign (-), that
link variables and numbers together to form expressions. When typing or
modifying a mathematical expression in Mathcad you can:
Fo
rP
TC
In
te
rn
Module 3 | Page 2
2013 PTC
Insert an operator.
1. Click in the worksheet and insert the Square Root and Nth Root
operator.
Select the Math tab.
In the Operators and Symbols group, click Operators
operator.
nl
se
2. Type 2+3 in the placeholder under the Square Root operator. The
cursor appears to the right of the 3 when complete.
al
rn
operator.
In
Division
te
rP
TC
Fo
operator.
2013 PTC
Module 3 | Page 3
Task 2:
Identify operands.
1. Using the expression typed in for the previous task, click any operator.
2. Note that the operator color changes to blue and blinks. The operands
associated with the blue highlighted operator highlight in gray.
3. Click other operators and note how the operands change.
Task 3:
Modify an operator.
nl
se
te
rn
Root
operator. Note the
operand location.
al
Fo
rP
TC
In
Module 3 | Page 4
2013 PTC
nl
Placeholders
Operators
Symbols
Constants
se
rn
rP
TC
Placeholders
te
Placeholders
Operators
Symbols
Constants
In
al
Fo
Module 3 | Page 5
Fo
rP
TC
In
te
rn
al
se
nl
Operators, Symbols, and Constants are all found on the Math tab in
the Operators and Symbols group. You can use them when entering a
mathematical expression.
Module 3 | Page 6
2013 PTC
Insert operators by
selecting the Math
tab. In the Operators
and Symbols group,
O
se
U
rn
al
nl
,
click Operators
and select the desired
operator.
rP
TC
In
te
4. Insert the Pi
constant.
Select the Math tab.
In the Operators and Symbols
group, click Constants
Fo
Select Pi
2013 PTC
Pi displays in a different
color. This denotes
that Pi is labeled as a
constant.
Module 3 | Page 7
Task 2:
nl
, and selecting
Evaluation
Fo
rP
TC
In
te
rn
al
se
Module 3 | Page 8
2013 PTC
se
nl
al
te
rn
In
rP
TC
You can also add highlighting to a math region. This is an effective method
for drawing attention to a region or a set of regions.
Fo
Each region, math or text, is an individual entity that you can move or position
within a workspace. You can move these regions individually or as a group.
2013 PTC
Module 3 | Page 9
nl
se
to restore
Highlight a region.
te
Task 2:
rn
al
In
rP
TC
Fo
and select
Highlight Color
the color yellow from the color
options. The region is highlighted
as shown.
This completes the procedure.
Module 3 | Page 10
2013 PTC
nl
se
You can apply results formatting globally or to one or more regions in your
worksheet. The following formatting options are available:
Fo
rP
TC
In
te
rn
al
Result Format You can select the display format of numeric results from
this drop-down list. The following options are available:
General
Decimal
Scientific
Engineering
Percent
Display Precision Controls the number of digits displayed to the right
of the decimal point.
To set the zero threshold for your worksheet, set the result format to
Decimal and then modify the display precision. Any result smaller than
the selected display precision is displayed as zero.
Show Trailing Zeros Toggles the display of trailing zeros to the right of
the decimal point. The display precision selected controls the number
of trailing zeros displayed.
Complex Values Displays the result in Cartesian or Polar form.
To remove any changes and return to the default result formatting, click Clear
Format.
2013 PTC
Module 3 | Page 11
Implied Multiplication
Mathcad supports implied multiplication.
Implied multiplication:
nl
se
Implied Multiplication
al
te
rn
rP
TC
In
Fo
There are two variables in which Mathcad does not insert an implied
Multiplication operator. These two variables are reserved suffixes and are the
letters i and j. These are reserved for complex numbers using i or j notation.
You can select these letters as variables, but you must always explicitly type
the Multiplication operator.
Module 3 | Page 12
2013 PTC
4
y
Module
nl
Variables
se
Module Overview
In this module, you learn how to define and evaluate variables, assign an
expression retroactively, and use literal subscripts.
al
Objectives
Fo
rP
TC
In
te
rn
2013 PTC
Module 4 | Page 1
Defining a Variable
A variable may equal a scalar, array, string, or range of scalar
values.
Variables in Mathcad:
al
se
nl
rn
Defining a Variable
te
Often you must define values as variables that you can use in subsequent
calculations.
In
rP
TC
Fo
2013 PTC
If the variable used in the expression has not been previously defined, an error
message displays and the undefined variable is circled in red. Even if more
than one variable is undefined, Mathcad flags only one variable at a time.
Fo
rP
TC
In
te
rn
al
se
nl
2013 PTC
Module 4 | Page 3
Define a variable.
and select
nl
O
se
U
al
Fo
rP
TC
In
te
rn
Definition
. The Definition
operator and a placeholder
appears.
Module 4 | Page 4
2013 PTC
nl
In
te
rn
al
se
rP
TC
Fo
You can evaluate a variable to the right of where it is defined or below where it
is defined. If a variable is redefined to the left or below the original definition,
the variable takes on the new definition value when evaluated.
You can also evaluate a variable directly in the definition statement. The
result is bound to the assigned variable name.
2013 PTC
Module 4 | Page 5
click Operators
Definition
rn
al
se
nl
In
te
and select
rP
TC
click Operators
Fo
Evaluation
Module 4 | Page 6
2013 PTC
nl
se
al
Global definitions are similar to other variable definitions except they are
evaluated first. When a worksheet is opened, Mathcad scans the entire
document twice. The first scan processes global definitions. The second
scan processes other variable definitions.
te
rn
rP
TC
In
Fo
2013 PTC
Module 4 | Page 7
nl
3. Click Operators
from the
Operators and Symbols group.
se
rP
TC
In
te
rn
A global variable
definition can contain
variables that have
been globally defined
to the left or above
where they are being
used.
al
Task 2:
Fo
Module 4 | Page 8
2013 PTC
nl
al
se
Figure 1 Expression to be
Retroactively Assigned
rn
te
Fo
rP
TC
In
2013 PTC
Module 4 | Page 9
se
nl
al
. A placeholder
te
Definition
appears.
and select
rn
click Operators
rP
TC
In
Fo
Module 4 | Page 10
2013 PTC
nl
se
Variable names.
Representing derivatives in partial differential equations.
click Subscript
You create literal subscripts by selecting the Math tab. In the Style group,
and type the subscript text.
Fo
rP
TC
In
te
rn
al
2013 PTC
Module 4 | Page 11
nl
Fo
rP
TC
In
te
rn
al
se
Module 4 | Page 12
2013 PTC
5
y
Module
nl
Functions
se
Module Overview
In this module, you learn how to define and evaluate user-defined and built-in
functions.
al
Objectives
Fo
rP
TC
In
te
rn
2013 PTC
Module 5 | Page 1
se
nl
al
In
te
rn
rP
TC
Fo
2013 PTC
Fo
rP
TC
In
te
rn
al
se
nl
2013 PTC
Module 5 | Page 3
nl
and select
al
. The Definition
Definition
operator and a placeholder
appears.
se
click Operators
In
te
rn
Fo
rP
TC
Module 5 | Page 4
2013 PTC
nl
se
te
rn
al
In
rP
TC
Fo
To access these functions, select the Functions tab. You can also directly
type in a built-in function. Built-in functions are not font sensitive, but they are
case sensitive and you must spell them correctly.
2013 PTC
Module 5 | Page 5
rP
TC
In
te
rn
al
se
nl
Fo
Module 5 | Page 6
2013 PTC
To insert a function
in the worksheet,
select the Functions
tab. In the Functions
group, click a function
category and select the
desired function.
Fo
rP
TC
In
te
rn
al
se
nl
2013 PTC
Module 5 | Page 7
te
rn
al
se
nl
In
rP
TC
Fo
Module 5 | Page 8
2013 PTC
nl
Deprecated functions are functions that are not available in Mathcad Prime.
Deprecated functions:
se
Fo
rP
TC
In
te
rn
al
2013 PTC
Module 5 | Page 9
y
nl
O
se
U
al
rn
te
In
rP
TC
Fo
Module 5 | Page 10
2013 PTC
6
y
Module
nl
Range Variables
se
Module Overview
In this module, you learn how to define, evaluate, and use a range variable.
Objectives
Fo
rP
TC
In
te
rn
al
2013 PTC
Module 6 | Page 1
nl
rP
TC
In
te
rn
al
se
A starting value.
An ending value.
A second value specified, if not
using a unit step.
Fo
Module 6 | Page 2
2013 PTC
in
operator.
Fo
rP
TC
In
te
rn
al
se
nl
A starting value.
An ending value.
A second value specified, if not using a unit step.
2013 PTC
Module 6 | Page 3
nl
se
al
rn
, and
Operators
selecting the desired
operator.
In
te
Fo
rP
TC
Module 6 | Page 4
2013 PTC
Task 2:
O
se
Fo
rP
TC
In
te
rn
al
Task 3:
nl
2013 PTC
Module 6 | Page 5
nl
Fo
rP
TC
In
te
rn
al
se
Module 6 | Page 6
2013 PTC
te
rn
al
se
nl
In
rP
TC
Fo
2013 PTC
Module 6 | Page 7
nl
, and
Operators
selecting the desired
operator.
Fo
rP
TC
In
te
rn
al
se
Module 6 | Page 8
2013 PTC
7
y
Module
nl
Controlling Calculations
se
Module Overview
al
Objectives
Fo
rP
TC
In
te
rn
2013 PTC
Module 7 | Page 1
Controlling Calculations
By default, Mathcad opens in Auto Calculation mode. In this
mode, all results are automatically updated.
You can control calculations in
Mathcad by:
nl
Controlling Calculations
se
rn
al
The numerical results and graphs you see in your window are always
up-to-date when in Auto Calculation mode. If your worksheet contains
several computationally intensive equations, scrolling through the worksheet
becomes time consuming as Mathcad updates all calculations as you scroll.
te
rP
TC
In
Fo
You can edit the disabled region but the result is not recalculated, and any
regions that depend on the disabled region are not affected.
The disabled regions are not affected by changes to other regions.
Module 7 | Page 2
2013 PTC
All Calculations
nl
se
Calculation
te
Task 2:
rn
al
rP
TC
In
Fo
2013 PTC
Module 7 | Page 3
Disable Region
nl
Task 3:
In
Disable Region
te
rn
al
se
rP
TC
Fo
Module 7 | Page 4
2013 PTC
nl
Approximate Equality
ORIGIN in Strings
Strict Singularity Check
Multithreading
Units/Constants in Symbolics
se
rn
al
Fo
rP
TC
In
te
2013 PTC
Module 7 | Page 5
Using Areas
Calculations in Mathcad can be enclosed in an area and
collapsed and/or disabled.
To enclose calculations in an area:
Insert an area.
Type calculations in the area.
In
te
rn
al
se
nl
rP
TC
Using Areas
Fo
2013 PTC
8
y
Module
nl
se
Module Overview
In this module, you learn how to define and use vectors and matrices.
Objectives
Fo
rP
TC
In
te
rn
al
2013 PTC
Module 8 | Page 1
Manual entry.
Defining each element using a
range variable.
Importing data from a file.
nl
Elements in an array:
By default, have a starting index of
0, referred to as the array ORIGIN.
se
al
rn
In
te
Manual entry.
Defining each element using a range variable.
Reading in the array directly from a file.
rP
TC
Fo
The row and column index starting point default for the array elements is a
built-in variable in Mathcad. This variable is named ORIGIN and by default is
set to 0. You can globally set this variable by selecting the Calculation tab.
In the Worksheet Settings group, select 0 or 1 from the ORIGIN drop-down
list. You can also set this variable locally or globally using a definition in
the worksheet.
IMPORTANT! For the examples used in this training, the array
ORIGIN is equal to 1.
2013 PTC
Fo
rP
TC
In
te
rn
al
se
nl
2013 PTC
Module 8 | Page 3
Task 2:
al
rn
se
nl
In
te
rP
TC
, and
Operators
selecting the desired
operator.
Fo
Module 8 | Page 4
2013 PTC
nl
Manual entry.
Populating an array
element-by-element.
Using range variables.
rn
al
se
In
te
rP
TC
Fo
operator.
Populating a matrix using range variables.
Here the definition process is automated by using an iterative variable:
a range variable representing the index.
2013 PTC
Module 8 | Page 5
Fo
rP
TC
In
te
rn
al
se
nl
Module 8 | Page 6
2013 PTC
nl
se
U
al
, and
Operators
selecting the desired
operator.
In
te
rn
Fo
rP
TC
.
Click and drag to select a 3x3
matrix.
2013 PTC
Module 8 | Page 7
Task 2:
nl
rP
TC
In
te
rn
al
se
Fo
Module 8 | Page 8
2013 PTC
operator.
nl
Task 3:
In
te
rn
al
se
rP
TC
Fo
2013 PTC
Module 8 | Page 9
nl
A single element.
An entire column or row.
A subset, or submatrix of data.
rn
al
se
te
In
rP
TC
You can extract elements from arrays and use them in functions and definition
statements.
There are three basic types of data that you can extract from a matrix or array:
Fo
A single element.
An entire column or row.
A subset, or submatrix of data.
You can use the built-in submatrix function to extract a subset of data from an
array. The submatrix function returns the data in a matrix consisting of the
specified number of rows and columns.
Module 8 | Page 10
2013 PTC
nl
te
rn
al
se
Fo
rP
TC
In
2013 PTC
Module 8 | Page 11
Task 2:
te
rn
al
Task 3:
se
nl
rP
TC
In
Fo
Task 4:
Module 8 | Page 12
operator.
2013 PTC
nl
rP
TC
In
te
rn
al
se
Fo
2013 PTC
Module 8 | Page 13
Nested Arrays
An array may contain an element that is another array.
se
nl
In
te
rn
al
rP
TC
Nested Arrays
Fo
An array may contain elements that are other arrays. An array that is
embedded within another array is called a nested array.
When initially evaluating an array containing a nested array, Mathcad
indicates the nested array using a shorthand notation. This shorthand
indicates the dimensions (rows, columns) of the nested array and encloses
the dimensions in brackets.
Module 8 | Page 14
2013 PTC
se
nl
1. Define the two matrices shown. The matrix Nest is nested in the
matrix P.
al
In
te
rn
rP
TC
Task 2:
Fo
2013 PTC
Module 8 | Page 15
nl
Fo
rP
TC
In
te
rn
al
se
Module 8 | Page 16
2013 PTC
se
nl
rn
al
te
In
rP
TC
You can use vectors and arrays when working with operators and functions in
Mathcad. You can find operators and functions used with vectors and arrays:
Fo
Module 8 | Page 17
Array Functions
The Vector and Matrix Functions category located in the Matrices and Tables
group on the Matrices/Tables and Functions tabs contains a list of functions
that operate on arrays.
The following functions are useful when working with vectors and matrices:
Fo
rP
TC
In
te
rn
al
se
nl
Module 8 | Page 18
2013 PTC
se
U
nl
In
te
rn
al
rP
TC
Operators
Select Vectorization
Fo
2013 PTC
Module 8 | Page 19
Fo
rP
TC
In
te
rn
al
se
nl
Module 8 | Page 20
2013 PTC
9
y
Module
nl
Units
se
Module Overview
In this module, you learn how to select a unit system and use units in
calculations.
al
Objectives
Fo
rP
TC
In
te
rn
2013 PTC
Module 9 | Page 1
nl
CGS
USCS
se
al
The SI system is the default unit system for Mathcad. Mathcad also supports
the following unit systems:
rn
CGS
USCS
In
te
Every unit system has a set of base dimensions and derived units associated
with it. Mathcad stores all units in terms of the base units for a particular
dimension. Because of this, unit results are initially returned in the base
units for the default system of units.
rP
TC
For example, if you select the SI system as the default unit system:
Length is initially returned in meters, m.
Mass is initially returned in kilograms, kg.
Time is initially returned in seconds, s.
Fo
You can select the default unit system by selecting the Math tab. In the Units
, and select a unit system. Regardless of
group, click Unit System
the unit system selected, you can use units from other systems to define
variables and evaluate results.
Module 9 | Page 2
2013 PTC
rn
al
se
nl
Fo
rP
TC
In
te
2013 PTC
Module 9 | Page 3
Using Units
Mathcad enables you to multiply values by built-in units or
custom defined units.
Using Mathcad you can:
Add units to variable definitions.
Change units.
Define a custom unit.
nl
You can add units to a variable definition by typing them in or by selecting the
se
al
rn
1.
2.
te
rP
TC
In
Fo
Built-in units are predefined variables and you can overwrite them with a
variable of the same name. For example, you can rewrite the built-in unit
m, representing meters, to represent any quantity, but any subsequent
results depending on meters represented by m do not make sense and may
generate an error. To avoid overwriting predefined variables, if you evaluate
the variable you are using, Mathcad evaluates a built-in unit.
2013 PTC
Fo
rP
TC
In
te
rn
al
se
nl
2013 PTC
Module 9 | Page 5
nl
U
al
rn
se
te
In
Fo
rP
TC
Mathcad does
not require the
Multiplication operator
when using units.
You can use implied
multiplication.
Module 9 | Page 6
2013 PTC
Task 2:
Change units.
nl
O
se
U
te
Task 3:
rn
al
The abbreviation
lb refers to pound
mass, while lbf is the
abbreviation for pound
force.
rP
TC
In
Fo
2013 PTC
Module 9 | Page 7
se
nl
al
Fo
rP
TC
In
te
rn
Module 9 | Page 8
2013 PTC
nl
Arrays.
Range variables.
se
rn
al
te
In
rP
TC
Fo
When adding units to range variables, you should add the unit to each
element in the range variable definition. A dimensioned range variable must
always specify the second value in the range in the appropriate dimension,
even if the step size is equal to one. If this is not specified, an error message
appears.
2013 PTC
Module 9 | Page 9
nl
O
se
al
te
rn
, and
Operators
selecting the desired
operator.
rP
TC
In
Fo
.
Click the cursor and drag to
highlight a 5x1 matrix and
release. A 5x1 matrix of blank
placeholders appears in the
original placeholder for the
variable.
Module 9 | Page 10
2013 PTC
nl
, and
te
Task 2:
rn
al
se
Fo
rP
TC
In
2013 PTC
Module 9 | Page 11
Task 3:
nl
se
In
te
rn
al
Fo
rP
TC
Module 9 | Page 12
2013 PTC
nl
se
te
rn
al
Fo
rP
TC
In
2013 PTC
Module 9 | Page 13
nl
Kelvin.
Rankine.
Degrees Fahrenheit.
Change in degrees Fahrenheit.
Degrees Celsius.
Change in degrees Celsius.
se
rn
al
te
rP
TC
In
Fo
Module 9 | Page 14
2013 PTC
nl
rn
al
, and
Operators
selecting the desired
operator.
se
In
te
rP
TC
Fo
.
Select F.
2013 PTC
Module 9 | Page 15
Task 2:
nl
te
rn
al
Task 3:
se
operator.
rP
TC
Multiplication
In
Fo
4. Click to the right of the K and press BACKSPACE until the K is deleted.
Insert a F temperature unit. Click outside of the region to evaluate.
Module 9 | Page 16
2013 PTC
10
y
Module
nl
2-D Plotting
se
Module Overview
In this module, you learn how to plot data and functions on a 2-D plot.
Objectives
Fo
rP
TC
In
te
rn
al
2013 PTC
Module 10 | Page 1
nl
rP
TC
In
te
rn
al
se
Fo
You can plot data stored in vectors on 2-D plots. When plotting vectors of
data, you must store the data to be plotted in two vectors of equal length. The
data must be free of strings or variables, and functions which do not equal
scalar quantities. For large vectors, you can determine the number of rows
using the built-in rows function.
You can create vectors by:
Manually typing them in.
Using a function or a range variable.
Importing them from a data source, such as Microsoft Excel.
Once plotted, the graphs have the following properties:
They are plotted as a line plot by default.
A simple legend is shown along the vertical y-axis.
Axes limits are automatically selected based on the properties of the data
set.
Both axes are automatically partitioned and numbered.
Module 10 | Page 2
2013 PTC
nl
rn
al
Select XY Plot
. A blank
plot region appears.
se
Insert Plot
Fo
rP
TC
In
te
2013 PTC
Module 10 | Page 3
Task 2:
nl
rn
al
.
Symbol
Select x.
In the Styles group, click Line
se
In
te
.
Style
Select (none). The data
displays as data points.
Fo
rP
TC
Module 10 | Page 4
2013 PTC
te
rn
al
se
nl
rP
TC
In
Fo
The horizontal axis must be populated with the independent variable, not
previously defined.
The plot is made over a default domain of 10 to 10, if possible.
2013 PTC
Module 10 | Page 5
se
Insert Plot
nl
rn
al
Select XY Plot
. A blank
plot region appears.
Fo
rP
TC
In
te
Task 2:
Module 10 | Page 6
2013 PTC
nl
Task 3:
rn
al
se
In
te
Fo
rP
TC
2013 PTC
Module 10 | Page 7
se
nl
rn
al
There are many formatting features available for 2-D plots in Mathcad.
Features discussed here are:
Fo
rP
TC
In
te
Module 10 | Page 8
2013 PTC
nl
rn
al
Select XY Plot
. A blank
plot region appears.
se
Insert Plot
Fo
rP
TC
In
te
Task 2:
2013 PTC
Module 10 | Page 9
se
nl
. The marker is
al
Fo
rP
TC
In
te
rn
Module 10 | Page 10
2013 PTC
nl
se
rP
TC
In
te
rn
Symbol style
Symbol weight
Line type
Line weight
Color
Trace type (line, points, bar)
Fo
al
Mathcad enables you to plot multiple traces on a single plot. Once plotted,
you can individually format each trace. Formatting options include:
2013 PTC
Module 10 | Page 11
nl
se
te
rn
Select XY Plot
. A blank
plot region appears.
al
Insert Plot
In
rP
TC
4. Add a trace.
Click in the vertical axis
placeholder.
Select the Plots tab.
In the Traces group, click Add
Fo
. A second vertical
Trace
axis placeholder appears.
Module 10 | Page 12
2013 PTC
Task 2:
Format a trace.
Click Symbol
select x.
nl
, and
Fo
rP
TC
In
te
rn
al
se
, and
2013 PTC
Module 10 | Page 13
nl
Axes Formatting
Log scale
Cross axes at 0,0
Tick marks
Tick mark values
Axis expressions
rP
TC
In
te
rn
al
se
Fo
Mathcad provides many options to format axes on a 2-D plot. The formatting
options available for the 2-D plot axes include:
Axes Formatting
Log scale Plot using a logarithmic scale.
Cross axes at 0,0.
Tick marks Add or remove tick marks from the axes.
Tick mark values Add or remove values from the tick marks on the
axes.
Axis expressions Add or remove the axes expressions.
Mathcad also provides a feature that enables you to change the displayed
format and precision of the axis limits and markings. The options available
are:
General
Decimal
Module 10 | Page 14
2013 PTC
Fo
rP
TC
In
te
rn
al
se
nl
Scientific
Engineering
Percent
2013 PTC
Module 10 | Page 15
nl
se
te
rn
Select XY Plot
. A blank
plot region appears.
al
Insert Plot
In
rP
TC
4. Add a trace.
Click in the vertical axis
placeholder.
Select the Plots tab.
In the Traces group, click Add
Fo
. A second vertical
Trace
axis placeholder appears.
Module 10 | Page 16
2013 PTC
nl
O
se
al
Task 2:
rP
TC
In
te
rn
Fo
2013 PTC
Module 10 | Page 17
te
rn
al
se
nl
In
rP
TC
In Mathcad, you can plot a function or data with units. To plot a function, or
data, with units:
Define the data or function.
Plot the data. Include the units in the axis expression.
Click outside the plot region.
Fo
The tick marks are not associated with units. Only the axis
expressions can have units.
Module 10 | Page 18
2013 PTC
rn
Insert Plot
al
se
nl
1. Create the data matrices for Shear, in kip, and Position, in ft, as
shown.
rP
TC
In
te
Select XY Plot
. A blank
x-y plot region appears.
Fo
2013 PTC
Module 10 | Page 19
Task 2:
nl
Fo
rP
TC
In
te
rn
al
se
Module 10 | Page 20
2013 PTC
11
y
Module
nl
Project Day 1
se
Module Overview
Using Mathcad and the skills that you have learned so far complete one of
the projects in this module.
al
Objectives
Fo
rP
TC
In
te
rn
2013 PTC
Module 11 | Page 1
5.
nl
O
Figure 1 Beam Section
rP
TC
In
te
6.
se
4.
3.
al
2.
rn
1.
Fo
t=20.2 mm
h=903.3 mm
b=303.3 mm
s= 15.1 mm
Ix=325253 cm4
E=120 kN/mm2
The beam is a simply supported beam with the following dimensions and load:
L=15 m
a= 5 m
W=18 kN
Module 11 | Page 2
2013 PTC
Fo
rP
TC
In
te
rn
al
se
nl
6.
2013 PTC
Module 11 | Page 3
y
nl
Figure 1 Shaft
In
te
rn
al
3.
4.
2.
se
1.
Fo
rP
TC
In this project, you calculate the critical speed of a shaft bearing with an
asymmetrical load, and how the critical speed varies with load location. The
shaft has the following properties:
Define the variables and calculate the critical speed of the shaft.
Calculate how the critical speed varies with load location.
Plot the results.
Format the Mathcad document with headers and footers.
Module 11 | Page 4
2013 PTC
12
y
Module
nl
3-D Plotting
se
Module Overview
In this module, you learn how to plot data and functions on a 3-D plot.
Objectives
Fo
rP
TC
In
te
rn
al
2013 PTC
Module 12 | Page 1
nl
In
te
rn
al
se
Figure 2 Vector-Valued
Function Plot
rP
TC
Fo
2013 PTC
nl
Insert Plot
rn
al
se
Select 3D Plot
. A blank
plot region appears.
rP
TC
In
te
A QuickPlot always
appears over the
default domain of
10 to 10 for both
independent variables.
Fo
Task 2:
2013 PTC
Module 12 | Page 3
nl
In
Change the default domain to not include any values that cause a
singularity in the plotted function.
rP
TC
Task 3:
te
rn
al
se
Fo
Module 12 | Page 4
2013 PTC
nl
Fo
rP
TC
In
te
rn
al
se
2013 PTC
Module 12 | Page 5
se
nl
In
te
rn
al
rP
TC
Mathcad provides many options for formatting a 3-D plot. 3-D plot formatting
options include the following:
Appearance.
Axes.
View Control.
Suppressing the plot arguments.
Fo
Appearance
Appearance options are located on the Plots tab, in the Styles group. These
options enable you to add color to the traces and perform other basic
formatting changes. The following options are available:
Fill options
Line options
Symbol options
Color options
If there is more than one plot in the graph, these options are specific to each
plot. You can fill each plot with its own color, lines, and configure other
options.
You can also define the grid size per trace in the x and y directions by
selecting the number of points in the Traces group.
Module 12 | Page 6
2013 PTC
Axes
Axes options are located on the Plots tab, in the Axes group, and in the plot
region. You can modify the axis tick marks and tick mark values.
To modify a specific axis click the axis using the Axis Selector in the
upper-right corner of the plot. The Editable Axis, located on the right side of
the plot, can then be used to edit the tick mark values.
View Control
nl
To modify the view and orientation of the plot use the View Control located in
the upper-left corner of the plot. The View Control options enable you to spin,
pan, zoom, or reset the view of the plot.
se
To clean up the appearance of a 3-D plot, suppress the display of the plot
argument(s) on the bottom of the plot. To toggle the arguments on and off:
Fo
rP
TC
In
te
rn
al
Suppressing the arguments gives a cleaner look to the plot within the
Mathcad document.
2013 PTC
Module 12 | Page 7
se
nl
rP
TC
In
te
rn
al
Fo
You can store data in various formats. The format that is passed to the 3-D
plot operator affects how the plot is rendered.
You can plot data as:
A three column matrix. The three columns in the matrix represent the x,
y, and z coordinates.
An m x n matrix. Mathcad plots each element as an elevation in the z-axis
versus its respective row, x-axis, and column, y-axis, index.
Module 12 | Page 8
2013 PTC
nl
se
Insert Plot
al
Select 3D Plot
. A blank
plot region appears.
Fo
rP
TC
In
te
rn
2013 PTC
Module 12 | Page 9
Task 2:
nl
O
se
Insert Plot
al
Select 3D Plot
. A blank
plot region appears.
rP
TC
In
te
rn
Fo
Style
Module 12 | Page 10
2013 PTC
se
nl
al
rn
te
You can plot multiple traces on a single plot, or add traces to an existing plot.
Fo
rP
TC
In
By default, the second trace appears as the same type as the first. You can
then modify each plot to the appropriate type.
2013 PTC
Module 12 | Page 11
nl
O
se
Insert Plot
te
rn
al
Select 3D Plot
. A blank
plot region appears.
rP
TC
In
Fo
. A second
Add Trace
placeholder appears.
Type the function name only,
Q, with no arguments, in the
placeholder. Click outside
the plot to display the surface
plots.
A QuickPlot always
appears over the
default domain of
10 to 10 for both
independent variables.
Module 12 | Page 12
2013 PTC
Task 2:
se
nl
rP
TC
In
te
rn
al
Fo
2013 PTC
Module 12 | Page 13
y
nl
O
se
U
al
rn
te
In
rP
TC
Fo
Module 12 | Page 14
2013 PTC
13
y
Module
nl
Boolean Conditions
se
Module Overview
In this module, you learn how to use Boolean operators to create equations,
conditional statements, and Piecewise Continuous functions.
al
Objectives
Fo
rP
TC
In
te
rn
2013 PTC
Module 13 | Page 1
rn
al
se
nl
te
In
rP
TC
You can use Boolean operators to evaluate Boolean expressions and specify
constraints in solve blocks. You can locate Boolean operators by selecting
from the Operators and Symbols
the Math tab and clicking Operators
group. They include Comparison and Logical operators. You can use them to:
Fo
Module 13 | Page 2
2013 PTC
The Equal To
operator is
the most commonly used Boolean
operator when solving a system of
equations.
nl
se
al
All equations used inside a solving construct must use Boolean operators.
te
rn
The Equal To
operator is the most commonly used Boolean operator
when solving a system of equations. You can use it to express equality
between two sides of an equation. A Boolean Equal To operator appears as
a bold equal sign to distinguish it from the Evaluation operator.
Fo
rP
TC
In
Mathcad does not evaluate equations created with Boolean operators unless
they are used in a Mathcad program or another construct requiring a Boolean
condition. Therefore, it is ideal to use Boolean operators for documenting
equations.
2013 PTC
Module 13 | Page 3
nl
se
al
rn
Boolean operators, unlike other operators, can only return a zero or one. They
are useful in performing tests or comparisons within conditional expressions.
In
te
If the expression using the Boolean operator is true, the Boolean operator
returns a one.
rP
TC
If the expression using the Boolean operator is false, the Boolean operator
returns a zero.
Boolean expressions are those whose results are either true or false. For
example, 1 > 2 is Boolean because its value is false, represented as a 0 in
Mathcad. The Boolean operators enable you to set up expressions, which
you can evaluate like any other Mathcad expression.
Fo
You can use Boolean operators to write functions that are not uniform over a
range. You can then integrate and differentiate these functions.
Module 13 | Page 4
2013 PTC
nl
rP
TC
In
te
rn
al
se
Fo
A function that is not uniform over its range is known as a Piecewise function.
Mathcad has six Piecewise Continuous built-in functions.
To create Piecewise Continuous functions using Boolean operators:
Define a range of values over which the function is to be evaluated.
Define the function using Boolean operators.
Graph the function to validate the results.
2013 PTC
Module 13 | Page 5
nl
U
al
te
rn
se
rP
TC
In
. Expand the
appropriate group,
and select the desired
function.
Fo
Module 13 | Page 6
2013 PTC
nl
Fo
rP
TC
In
te
rn
al
se
2013 PTC
Module 13 | Page 7
y
nl
O
se
U
al
rn
te
In
rP
TC
Fo
Module 13 | Page 8
2013 PTC
14
y
Module
nl
Symbolics
se
Module Overview
Objectives
Fo
rP
TC
In
te
rn
al
2013 PTC
Module 14 | Page 1
Symbolics
Mathcad can perform operations on symbolic expressions,
expressions that contain variables or mathematical symbols,
and return results in symbolic form.
You can perform symbolic
calculations on:
Variables
Functions
nl
se
al
rn
Symbolics
rP
TC
In
te
All the calculations shown in Mathcad to this point have been numeric.
Numeric calculations require that all variables and functions involved be
defined to the left or above where the calculation is made. They always
return answers in terms of floating point numbers. Numeric calculations
rely on built-in algorithms and tolerances to perform calculations quickly
and accurately.
Mathcad can also perform operations on symbolic expressions, expressions
that contain variables or mathematical symbols, and return results in symbolic
form.
Fo
2013 PTC
Indefinite Integrals
Definite Integrals
Fo
rP
TC
In
te
rn
al
se
nl
2013 PTC
Module 14 | Page 3
PROCEDURE - Symbolics
Task 1:
nl
se
U
rn
.
group, click Symbolics
Select Symbolic Evaluation
al
te
rP
TC
In
The Symbolic
Evaluation operator
can also be inserted
by selecting the Math
tab. In the Operators
and Symbols group,
Fo
click Operators
and select Symbolic
Evaluation
Module 14 | Page 4
2013 PTC
Symbolic Calculation
When you evaluate an expression with the Symbolic Evaluation
operator, Mathcad simplifies the result by performing arithmetic
and combining like variables.
Symbolic keywords provide an
additional level of control over
symbolic evaluation.
nl
se
Symbolic Calculation
te
rn
al
rP
TC
In
To perform more complex symbolic operations, you can insert a keyword that
specifies the operation before the symbolic equals sign. Symbolic keywords,
located in the Operators and Symbols group, Symbolic section, provide an
additional level of control over symbolic evaluation.
Evaluating a definite integral, using the Symbolic Evaluation operator, results
in a symbolic expression as shown in Figure 1.
Fo
You can have the result appear as a floating point approximation by using the
keyword float as shown in Figure 2.
When you apply a keyword to an expression containing a variable that has an
assigned value, Mathcad first replaces the variable with its value and then
applies the keyword. If you do not want Mathcad to substitute the assigned
value of a variable before applying the keyword you can use one of the
following clear functions:
clear(x,y,..) Clears variables both symbolically and numerically.
clearsym(x,y,...) Clears variables symbolically but not numerically. The
subscript sym is a literal subscript.
2013 PTC
Module 14 | Page 5
nl
U
al
rn
se
In
te
and
Symbolics
selecting the desired
keyword.
rP
TC
Fo
Module 14 | Page 6
2013 PTC
Task 3:
nl
2. Position the cursor to the right of the expression and insert the
explicit keyword.
rP
TC
In
te
rn
al
se
Fo
3. Position the cursor to the right of the explicit keyword and type ,a,b,c
and click outside the region to evaluate.
If you evaluate a variable that is defined by an expression
containing other variables with assigned values, explicit
substitutes the expression in terms of the variables, not
their assigned values.
2013 PTC
Module 14 | Page 7
Symbolic Algebra
You can use keywords to algebraically simplify, expand, or
factor expressions.
Mathcad contains the following
algebraic keywords:
simplify
expand
factor
nl
se
Symbolic Algebra
Fo
rP
TC
In
te
rn
al
Module 14 | Page 8
2013 PTC
15
y
Module
nl
Solving
se
Module Overview
al
rn
Objectives
Fo
rP
TC
In
te
2013 PTC
Module 15 | Page 1
nl
rn
al
se
te
In
rP
TC
Mathcad enables you to numerically solve for the roots of functions of single
independent variables.
Mathcad offers two built-in functions to numerically locate the roots of
functions of single independent variables:
The root function.
The polyroots function.
Fo
You can use the root function for all types of functions. You can use it in
two formats:
A two-argument case, which uses a guess value to search for the root.
A four-argument case, which uses a range over which to search for the root.
The root function, two-argument case, has the format:
root(f(t),t)
where:
f(t) is the function.
t is the guess value for the root of the function.
You can make a guess by assigning the independent variable before the
function, and using this variable in the function definition. Mathcad attempts
to provide a solution near the guess value. Different guesses may yield
Module 15 | Page 2
2013 PTC
different results, or may return the same result. The results depend on the
guess value and its location with respect to the actual root. It is useful to plot
the functions prior to evaluating the root.
The root function, four-argument case, has the format:
root(f(t),t,A,B)
where:
nl
No guess values are required for this format. The values of the function
at each endpoint of the range must be of opposite sign. This ensures that
there is a root in the range. You can evaluate multiple roots of a function by
giving different boundary conditions.
se
al
rn
polyroots(v)
where:
te
In
rP
TC
Mathcad provides the ability to solve for roots symbolically by selecting the
Math tab. In the Operators and Symbols group click Symbolics
click the solve keyword.
and
Fo
2013 PTC
Module 15 | Page 3
nl
se
al
rn
.
Solving
Select root.
In
te
rP
TC
Fo
Task 2:
Module 15 | Page 4
2013 PTC
Task 3:
nl
se
rn
al
In
te
To insert a
matrix, select the
Matrices/Tables tab,
click Insert Matrix
rP
TC
Fo
2013 PTC
operator to evaluate.
Module 15 | Page 5
Task 4:
In
te
rn
al
se
nl
3. Type ,x after the solve keyword and click outside the region to
evaluate.
Fo
rP
TC
Module 15 | Page 6
2013 PTC
In
te
rn
al
se
nl
rP
TC
Fo
2013 PTC
Module 15 | Page 7
2.
The numbers used in the function can be real or complex, and the
use of units is supported.
Assign a matrix containing the unknown variables to the function lsolve,
and evaluate the results.
lsolve returns the solution for the linear system of equations written in matrix
form.
Solve Blocks
nl
You can also solve a linear system using a solve block. Using solve blocks
enables you to write the problem using natural mathematical notation, so the
constraints, functions, and initial values are easier to identify, both for you
and for others reading your document.
se
You can numerically evaluate solve blocks, and units are supported within a
solve block.
rn
al
Each solve block includes guess values, a set of constraints, and a solving
function. All solve blocks follow a similar setup. The difference is the function
that you use to close the solve block.
Fo
rP
TC
In
te
The solve block first evaluates the constraints using the guess values to
check for errors and determine the domain of the solution. This can dictate
whether real or complex solutions are returned. If the problem is treated as
real and complex results are encountered during the solution, absolute values
are taken. If the type is complex, complex results are carried out as is. To
find a complex solution, you must provide a complex guess. Mathcad does
not look in the complex plain without a complex guess.
Module 15 | Page 8
2013 PTC
se
In
te
rn
al
Task 1:
nl
Numerically solve the following system of linear equations using the built-in
lsolve function and a solve block.
rP
TC
Fo
.
Solving
Select lsolve.
2013 PTC
Module 15 | Page 9
Task 2:
nl
Fo
rP
TC
In
te
rn
al
se
. A solve
Solve Block
block region appears.
Module 15 | Page 10
2013 PTC
nl
O
se
U
In
te
rn
al
rP
TC
Fo
2013 PTC
Module 15 | Page 11
In
te
rn
al
se
nl
Guess values
Constraint listing
Solution statement
rP
TC
Fo
Guess values
Constraint listing
Solution statement
The solve block returns one solution, even if the system has multiple
solutions. Mathcad uses the guess values as a starting point to find the
solution. Different guesses may yield different solutions.
To find a complex solution, you must provide a complex guess. Mathcad
does not look in the complex plain without a complex guess.
Module 15 | Page 12
2013 PTC
se
nl
Fo
rP
TC
In
te
rn
al
. A blank
Solve Block
solve block region appears.
2013 PTC
Module 15 | Page 13
rP
TC
In
te
rn
al
se
nl
Fo
Module 15 | Page 14
2013 PTC
nl
se
Fo
rP
TC
In
te
rn
al
2013 PTC
Module 15 | Page 15
nl
.
Click and drag to select a 2x1
matrix.
se
rn
al
rP
TC
In
te
Fo
Module 15 | Page 16
2013 PTC
nl
se
The Find function attempts to return an answer with an error satisfying the
built-in convergence tolerance, which is 0.001 by default. Mathcad enables
you to change the tolerance as required.
rn
al
te
rP
TC
In
Fo
Tightening both tolerances may lead to a better solution, but keep in mind that
it may also place an unreasonable expectation on the solver and generate
an error.
2013 PTC
Module 15 | Page 17
y
nl
O
se
U
al
rn
te
In
rP
TC
Fo
Module 15 | Page 18
2013 PTC
16
y
Module
nl
Optimization
se
Module Overview
al
Objectives
Fo
rP
TC
In
te
rn
2013 PTC
Module 16 | Page 1
Constrained Optimization
Constrained optimization in Mathcad requires a solve block
construct because you specify the constraints that the variables
must satisfy.
Constrained optimization requires:
nl
al
se
rn
Constrained Optimization
te
In
rP
TC
Fo
Module 16 | Page 2
2013 PTC
nl
In
te
rn
al
. A blank
Solve Block
solve block regions appears.
se
Fo
rP
TC
2013 PTC
Module 16 | Page 3
nl
se
U
al
rn
In
te
,
click Solving
and select minimize.
Fo
rP
TC
Module 16 | Page 4
2013 PTC
Unconstrained Optimization
You can solve unconstrained optimization problems in Mathcad
with or without using a solve block.
To solve an unconstrained optimization problem:
nl
Unconstrained Optimization
se
In
te
rn
al
rP
TC
Fo
2013 PTC
Module 16 | Page 5
nl
rn
al
se
. A blank
Solve Block
solve block appears.
Fo
rP
TC
In
te
Module 16 | Page 6
2013 PTC
nl
and
click Solving
select maximize.
rP
TC
Task 2:
In
te
rn
al
se
Fo
2013 PTC
Module 16 | Page 7
nl
Fo
rP
TC
In
te
rn
al
se
Module 16 | Page 8
2013 PTC
17
y
Module
nl
Differential Equations
se
Module Overview
Objectives
Fo
rP
TC
In
te
rn
al
2013 PTC
Module 17 | Page 1
nl
se
al
Mathcad can numerically solve ordinary differential equations using the solve
block approach.
In
te
rn
Fo
rP
TC
You can also write the ODE representing the system by clicking the Prime
operator. Where each prime applied to x represents a derivative with
respect to t.
Fo
rP
TC
In
te
rn
al
se
nl
You can use a solve block to solve an ODE, system of ODEs, or differential
algebraic equations. The setup is the same as the solve block approach
presented in previous modules.
2013 PTC
Module 17 | Page 3
rP
TC
In
te
rn
al
se
nl
Fo
. A blank
Solve Block
solve block region appears.
Module 17 | Page 4
2013 PTC
nl
O
se
U
Fo
rP
TC
In
te
rn
al
2013 PTC
Module 17 | Page 5
Task 2:
al
se
nl
Fo
rP
TC
In
te
rn
3. Plot the function over the solution domain. Define a range variable, t,
as shown, to define the domain of the plot.
Module 17 | Page 6
2013 PTC
18
y
Module
nl
Programming
se
Module Overview
al
Objectives
Fo
rP
TC
In
te
rn
2013 PTC
Module 18 | Page 1
Creating a Program
Mathcad's programming operators enable the extension of
Mathcad's functionality when writing customized functions and
processes for calculations.
You can access Mathcad's programming operators by selecting the Math
.
nl
se
Creating a Program
te
rn
al
In
rP
TC
Fo
Module 18 | Page 2
2013 PTC
nl
O
se
U
al
Select Program
rn
.
.
rP
TC
In
te
Fo
,
Programming
and selecting the
desired programming
operator.
Task 2:
2013 PTC
Module 18 | Page 3
nl
O
se
U
al
rn
All assignments
made using the Local
Assignment operator
are local to the program
and are not recognized
outside of the program.
Definitions made
outside and before
the program are not
overwritten inside the
program.
rP
TC
In
te
Fo
Module 18 | Page 4
2013 PTC
Task 3:
nl
O
se
U
rn
al
rP
TC
In
te
To return multiple
values from a program,
place the values in a
vector or matrix on the
last line of a program.
Task 4:
Fo
2013 PTC
Module 18 | Page 5
Conditional Statements
Mathcad provides operators to enable conditional program
branching.
The operators that enable conditional
branching are:
if
else
else if
also if
nl
Conditional Statements
al
if
else
else if
also if
rn
se
Fo
rP
TC
In
te
Module 18 | Page 6
2013 PTC
nl
al
Task 1:
se
Create this program twice, once using only if programming operators and
once using a combination of if and else operators.
rn
rP
TC
In
te
Fo
Select Program
Programming
and selecting the
desired operator.
2013 PTC
Module 18 | Page 7
se
nl
al
te
rn
Fo
rP
TC
In
Module 18 | Page 8
2013 PTC
al
se
nl
rP
TC
Task 2:
In
te
rn
Fo
2013 PTC
Module 18 | Page 9
nl
O
se
Programming
and selecting the
desired operator.
rn
al
In
te
rP
TC
Fo
Module 18 | Page 10
2013 PTC
Fo
rP
TC
In
te
rn
al
se
nl
2013 PTC
Module 18 | Page 11
Looping Constructs
Mathcad looping constructs enable you to iterate any
combination of expressions in a way that is difficult to execute
with range variables or other constructs.
Two program looping constructs are
available:
nl
For loops.
While loops.
rP
TC
In
te
rn
al
se
Fo
Looping Constructs
A loop is a block of code that causes one or more statements comprising the
body of the loop to iterate until a termination condition occurs. There are
two kinds of loops within Mathcad:
A for loop.
A while loop.
When using these constructs, do not type the words for and while. This does
not produce the operators.
You can use a for loop to iterate a calculation, or set of calculations, a fixed
number of times. The for loop construct contains three placeholders, with
the bottom placeholder indented. On the first line of the construct, the first
placeholder contains an index. The second placeholder contains a range, a
vector, or a list. The symbol shown between the placeholders reads " is an
element of " and is used because the index can be an element of a range, a
vector, or a list of numbers. The second line of the construct, the indented
Module 18 | Page 12
2013 PTC
nl
Like for loops, you can use while loops to iterate a calculation or set of
calculations. Unlike for loops, while loops repeat based on the evaluation of
a Boolean condition. While a condition is met, the steps contained in the
loop repeat.
se
A while loop has two placeholders, one of which is indented. The placeholder
on the first line of the construct contains a condition that must be satisfied
to execute the statement(s) on the second line of the construct. Like the
conditional placeholder that appears to the right of an if operator, the
conditional placeholder here must also contain an expression or statement
which evaluates to true (1) or false (0). You can use comparative Boolean
operators to form conditional statements.
al
While loops are useful for converging processes. To avoid an infinite loop,
keep in mind that:
In
te
rn
Fo
rP
TC
2013 PTC
Module 18 | Page 13
nl
O
se
U
rn
, and
Programming
selecting the desired operator.
al
In
te
Fo
rP
TC
the Equal To
operator.
The subscripts are
comprised of the
Matrix Index
operator.
The word return
is a Programming
operator.
Module 18 | Page 14
2013 PTC
se
U
rP
TC
In
te
rn
al
nl
Fo
2013 PTC
Module 18 | Page 15
nl
Index
operator to create
the subscript.
te
rn
al
Task 2:
se
rP
TC
In
Fo
Module 18 | Page 16
2013 PTC
rn
al
se
nl
Fo
rP
TC
In
te
2013 PTC
Module 18 | Page 17
y
nl
O
se
U
al
rn
te
In
rP
TC
Fo
Module 18 | Page 18
2013 PTC
19
y
Module
nl
Data Exchange
se
Module Overview
Mathcad enables you to import and export data to and from a worksheet in
a variety of formats.
al
Objectives
Fo
rP
TC
In
te
rn
2013 PTC
Module 19 | Page 1
Importing Data
Mathcad works with files and functionality from other
applications, such as Excel and Matlab.
There are a variety of methods that
you can use to import data into
Mathcad:
se
nl
al
rn
Importing Data
In
te
Mathcad works with files and functionality from other applications, such as
Excel and Matlab. There are a variety of methods that you can use to import
data and functionality into Mathcad:
Fo
rP
TC
Module 19 | Page 2
2013 PTC
te
rn
al
se
nl
Fo
rP
TC
In
2013 PTC
Module 19 | Page 3
nl
Task 2:
se
al
te
rn
rP
TC
In
Fo
.
In the Functions group, click File Access
Select the READFILE function.
Complete the first two placeholders as shown. Delete the remaining
placeholders.
The second argument is a string variable with a value that
can be delimited, fixed, or Excel.
Module 19 | Page 4
2013 PTC
Task 3:
nl
te
rn
al
se
rP
TC
In
.
The READEXCEL dialog box
appears. Browse to the Excel
file datastep_07.xlsx. Click
Open.
Select rows 1 through 4 and
columns A and B.
Click Insert.
Fo
2013 PTC
Module 19 | Page 5
Exporting Data
Mathcad supports writing data stored in a vector or matrix to
a data file.
Mathcad provides multiple file output
options for exporting data to a data
file:
Tab delimited text.
Comma separated values.
Microsoft Excel.
nl
Exporting Data
se
Mathcad provides multiple file output options for exporting data to a data file:
Fo
rP
TC
In
te
rn
al
It is critical to store the data you want to output as a vector or matrix and not a
range or sequence of numbers. This file output link is dynamic. Each time
you recalculate the worksheet, Mathcad writes out the vector or matrix again.
This ensures that the output file reflects any changes to the variable.
Module 19 | Page 6
2013 PTC
nl
se
In
te
rn
al
Fo
rP
TC
2013 PTC
Module 19 | Page 7
se
nl
rn
al
The Excel component enables the exchange of data with an Excel worksheet
embedded as an object in a Mathcad worksheet. Using the Excel component
enables you to exchange data and use Excels functionality.
In
te
You can send values in your worksheet to Excel, use Excel functionality
to manipulate them, and then send new values back to your Mathcad
worksheet, as shown in Figure 1.
rP
TC
The Excel component is a local copy of the spreadsheet. You can save
the data in an Excel component as an external Excel file. There is no
link between the Mathcad Excel component and the saved Excel file. Any
changes made in the Mathcad Excel component are not reflected in the
external file and vice versa.
Fo
Module 19 | Page 8
2013 PTC
nl
se
Fo
rP
TC
In
te
rn
al
2013 PTC
Module 19 | Page 9
nl
se
Fo
rP
TC
In
te
rn
al
Module 19 | Page 10
2013 PTC
Task 2:
Calculate the sum of each row using Excel functionality and return
the results to Mathcad.
te
rn
al
se
nl
3. Close the Excel application and return to the Mathcad worksheet. The
additions are listed in the Excel component.
rP
TC
In
Fo
2013 PTC
Module 19 | Page 11
In
te
rn
al
se
nl
Fo
rP
TC
Module 19 | Page 12
2013 PTC
20
y
Module
nl
Data Analysis
se
Module Overview
Mathcad supports the analysis of data. Within Mathcad, you can smooth,
interpolate, and regress data.
al
Objectives
Fo
rP
TC
In
te
rn
2013 PTC
Module 20 | Page 1
Data Analysis
Mathcad supports a variety of data analysis options.
The data analysis options supported
in Mathcad include:
nl
Smoothing
Interpolation
Regression
In
te
rn
al
se
rP
TC
Data Analysis
Fo
Smoothing
Kernel
Median
Super
Interpolation
Linear
Cubic Spline
Regression
Linear
Polynomial
General
You can find the applicable built-in functions by selecting the Functions tab.
Most of the functions used in data analysis are listed in one of the following
categories:
Curve Fitting and Smoothing
Module 20 | Page 2
2013 PTC
Fo
rP
TC
In
te
rn
al
se
nl
Data Analysis
Interpolation and Prediction
2013 PTC
Module 20 | Page 3
Smoothing Data
A data smoother takes a set of data and returns a new set that
contains less noise than the original set; however, it still retains
the basic shape and properties of the original data.
Mathcad provides three smoothing
functions.
se
nl
medsmooth
ksmooth
supsmooth
rP
TC
In
te
rn
al
Smoothing Data
Fo
A data smoother takes a set of data and returns a new set that contains
less noise than the original set; however, it still retains the basic shape and
properties of the original data.
Mathcad provides three smoothing functions.
Function: medsmooth
The median smoothing function (medsmooth) takes a window of data
around a given data point and replaces that point with the median of
the values in the window. This function is the most robust of the three
smoothing functions. It is least likely to be affected by false data points.
Function: ksmooth
The kernel smoothing function (ksmooth) uses a Gaussian kernel to
compute and return local weighted averages of y. This function is most
useful when the data lies along a band of relatively constant width.
Module 20 | Page 4
2013 PTC
Fo
rP
TC
In
te
rn
al
se
nl
Function: supsmooth
The super smoothing function (supsmooth) uses a local smoother that
returns a localized linear fit. This function is most useful when the data
lies scattered along a band whose width fluctuates. The supsmooth
function adaptively selects different bandwidths for different portions
of the data.
2013 PTC
Module 20 | Page 5
se
nl
.
In the Data Import/Export group, click Data Filename
The Browser dialog box appears. Browse to the file smoothdata.prn.
Click Open.
al
te
rn
rP
TC
In
Fo
Module 20 | Page 6
2013 PTC
Task 2:
operator.
nl
te
rn
al
se
Fo
rP
TC
In
2013 PTC
Module 20 | Page 7
Task 3:
operator.
In
te
rn
al
se
nl
Fo
rP
TC
Module 20 | Page 8
2013 PTC
Task 4:
operator.
rn
al
se
nl
Fo
rP
TC
In
te
2013 PTC
Module 20 | Page 9
Interpolating Data
Interpolation draws lines, or polynomial curves, between data
points to predict values that are not in the data set.
Mathcad supports several types
of interpolation. The following two
types are discussed here:
se
nl
Linear Interpolation
Cubic Spline Interpolation
rP
TC
In
te
rn
al
Interpolating Data
Fo
2013 PTC
Fo
rP
TC
In
te
rn
al
se
nl
2013 PTC
Module 20 | Page 11
nl
se
al
In
te
rn
rP
TC
.
In the Functions group, click File Access
Select the READFILE function.
Complete the first two placeholders as shown. Delete the remaining
placeholders.
Fo
Module 20 | Page 12
2013 PTC
4. Create a range variable, range2. Use the built-in functions min and
max as shown.
Task 2:
nl
operator.
se
. The Functions
In the Functions group, click All Functions
dialog box appears on the left side of your worksheet.
Expand the Interpolation and Prediction category and select linterp.
Type in the arguments X2,Y2,range2 as shown.
rP
TC
In
te
rn
al
Fo
2013 PTC
Module 20 | Page 13
Task 3:
operator.
nl
Fo
rP
TC
In
te
rn
al
se
Module 20 | Page 14
2013 PTC
operator.
te
rn
al
se
nl
Fo
rP
TC
In
2013 PTC
Module 20 | Page 15
Regressing Data
Parametric, or regression, methods approximate the parameters
of a function to a set of data.
Mathcad supports several types of
regression methods. The following
are discussed here:
se
nl
Linear Regression
Polynomial Regression
rP
TC
In
te
rn
al
Regressing Data
Fo
2013 PTC
Fo
rP
TC
In
te
rn
al
se
nl
2013 PTC
Module 20 | Page 17
nl
.
In the Data Import/Export group, click Data Filename
The Browser dialog box appears. Browse to the file regression.prn.
Click Open.
se
rn
al
In
te
rP
TC
.
In the Functions group, click File Access
Select the READFILE function.
Complete the first two placeholders as shown. Delete the remaining
placeholders.
Fo
Module 20 | Page 18
2013 PTC
4. Create a range variable, range3. Use the built-in functions min and
max as shown.
Task 2:
nl
operator.
se
In
te
rn
al
rP
TC
Fo
2013 PTC
Module 20 | Page 19
se
nl
Task 3:
operator.
te
rn
al
Fo
rP
TC
In
Module 20 | Page 20
2013 PTC
operator.
. The Functions
In the Functions group, click All Functions
dialog box appears on the left side of your worksheet.
Expand the Design of Experiments category and select polyfitc.
Type in the arguments X3,Y3,4 as shown.
rn
al
se
nl
rP
TC
In
te
Fo
2013 PTC
Module 20 | Page 21
y
nl
O
se
U
al
rn
te
In
rP
TC
Fo
Module 20 | Page 22
2013 PTC
21
y
Module
nl
Project Day 2
se
Module Overview
Use the skills that you have learned so far in Mathcad to complete one of
the projects in this module.
al
Objectives
Fo
rP
TC
In
te
rn
2013 PTC
Module 21 | Page 1
nl
1.
2.
3.
al
Fo
rP
TC
In
3.
te
rn
1.
2.
se
In this project, you import a table of beam sections for the beam used in the
Structural Engineering Day 1 project and select the sections that satisfies
given design criteria.
Module 21 | Page 2
2013 PTC
se
4.
nl
1.
2.
3.
In this project, you set a threshold limit for the critical speed and vary the
inner and outer diameter of the shaft used in the Mechanical Engineering
Day 1 project.
rn
Fo
rP
TC
4.
te
2.
3.
In
1.
al
2013 PTC
Module 21 | Page 3
y
nl
O
se
U
al
rn
te
In
rP
TC
Fo
Module 21 | Page 4
2013 PTC
A
nl
Appendix
se
Module Overview
Fo
rP
TC
In
te
rn
al
2013 PTC
Appendix A | Page 1