0% found this document useful (0 votes)
103 views33 pages

Mathcad Lecture: Tarlac State University Civil Engineering Department Engr. Orlando Sico JR, CE

This document provides an overview of using Mathcad software. It discusses the Mathcad workspace, regions, entering calculations and text, graphs, and other features. Key points covered include using toolbars to insert operators and symbols, working with multiple worksheets, selecting and modifying properties of regions, and moving or copying regions within and between worksheets. The document serves as an introductory guide for getting started with the basic functions and layout of the Mathcad program.

Uploaded by

Allen Aquino
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
103 views33 pages

Mathcad Lecture: Tarlac State University Civil Engineering Department Engr. Orlando Sico JR, CE

This document provides an overview of using Mathcad software. It discusses the Mathcad workspace, regions, entering calculations and text, graphs, and other features. Key points covered include using toolbars to insert operators and symbols, working with multiple worksheets, selecting and modifying properties of regions, and moving or copying regions within and between worksheets. The document serves as an introductory guide for getting started with the basic functions and layout of the Mathcad program.

Uploaded by

Allen Aquino
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 33

Mathcad Lecture

Tarlac State University


Civil Engineering Department

Engr. Orlando Sico Jr, CE


Getting Started with
Mathcad
! The Mathcad Workspace
! Regions
! A Simple Calculation
! Definitions and Variables
! Entering Text
! Iterative Calculations
! Graphs
! Saving, Printing, and Exiting

The Mathcad Workspace


For information on system requirements and how to install Mathcad on your computer,
refer to Chapter 1, “Welcome to Mathcad.”
When you start Mathcad, you’ll see a window like that shown in Figure 2-1. By default
the worksheet area is white.

Figure 2-1: Mathcad with various toolbars displayed.


Each button in the Math toolbar, shown in Figure 2-1, opens another toolbar of
operators or symbols. You can insert many operators, Greek letters, and plots by
clicking the buttons found on these toolbars:
Button Opens math toolbar...
Calculator: Common arithmetic operators.

Graph: Various two- and three-dimensional plot types and graph tools.

Matrix: Matrix and vector operators.

Evaluation: Equal signs for evaluation and definition.

Calculus: Derivatives, integrals, limits, and iterated sums and products.

Boolean: Comparative and logical operators for Boolean expression.

Programming: Programming constructs.

Greek: Greek letters.

Symbolic: Symbolic keywords.

The Standard toolbar is the strip of buttons shown just below the main menus in
Figure 2-1. Many menu commands can be accessed quickly by using these buttons.

The Formatting toolbar is shown immediately below the Standard toolbar in Figure
2-1. This contains scrolling lists and buttons used to specify font characteristics in
equations and text.

Tip To learn what a button on any toolbar does, let the mouse pointer rest on the button momentarily.
You’ll see a tooltip beside the pointer giving a brief description.

You can choose to show or hide each toolbar from the View menu. To detach and drag
a toolbar around your window, place the mouse pointer anywhere other than on a button
or a text box. Then press and hold down the mouse button and drag.

Tip You can customize the Standard, Formatting, and Math toolbars. To add and remove buttons,
right click on the toolbar and choose Customize from the popup menu.
Regions / 13

Working with Worksheets


When you start Mathcad, you open up a Mathcad worksheet. You can have as many
worksheets open as your available system resources allow.
There are times when a Mathcad worksheet cannot be displayed in its entirety because
the window is too small. To bring unseen portions of a worksheet into view, you can:
• Expand the window as you do in other Windows applications.

• Choose Zoom from the View menu or click on the Standard toolbar and
choose a number smaller than 100%.

Tip Mathcad supports the Microsoft IntelliMouse and compatible pointing devices. Turning the
wheel scrolls the window one line vertically for each click of the wheel. When you press
[Shift] and turn the wheel, the window scrolls horizontally.

See “Appendix I: Arrow and Movement Keys” on page 445 in the Appendices for
keystrokes for moving the cursor. If you are working with a longer worksheet, use Go
to Page from the Edit menu to move quickly through the worksheet.

Tip Mathcad supports standard Windows keystrokes for operations such as file opening, [Ctrl]O,
saving, [Ctrl]S, printing, [Ctrl]P, copying, [Ctrl]C, and pasting, [Ctrl]V. Choose
Preferences from the Tools menu and uncheck “Standard Windows shortcut keys” in the
General tab to use shortcut keys supported in early versions of Mathcad.

Regions
Mathcad lets you enter equations, text, and plots anywhere in the worksheet. Each
equation, piece of text, or other element is a region. Mathcad creates an invisible
rectangle to hold each region. A Mathcad worksheet is a collection of such regions. To
start a new region in Mathcad:
1. Click anywhere in a blank area of the worksheet. You see a small crosshair.
Anything you type appears at the crosshair.
2. If the region you want to create is a math region, just start typing anywhere you put
the crosshair. By default Mathcad understands what you type as mathematics. See
“A Simple Calculation” on page 16 for an example.
3. To create a text region, first choose Text Region from the Insert menu and then
start typing. See “Entering Text” on page 18 for an example.
In addition to equations and text, Mathcad supports a variety of plot regions. See
“Graphs” on page 21.

Tip Mathcad displays a box around any region you are currently working in. When you click outside
the region, the surrounding box disappears. To put a permanent box around a region or regions,
select them, then right click and choose Properties from the popup menu. Click on the Display
tab and check the box next to “Show Border.”
Selecting Regions
To select a single region, simply click it. Mathcad shows a rectangle around the region.
To select multiple regions:
1. Press and hold down the left mouse button to anchor one corner of the selection
rectangle.
2. Without letting go of the mouse button, move the mouse to enclose everything you
want inside the selection rectangle.
3. Release the mouse button. Mathcad shows dashed rectangles around the regions
you have selected.

Tip You can also select a single region or disconnected regions anywhere in the worksheet by
holding down the [Ctrl] key while clicking on each region. If you click one region and
[Shift]-click another, you select both regions and all regions in between.

Region Properties
The Region Properties dialog box allows you to perform the following actions,
depending on the type of region you’ve selected:
• Highlight the region.
• Display a border around the region.
• Assign a tag to the region.
• Restore the region to original size.
• Widen a region to the entire page width.
• Automatically move everything down in the worksheet below the region when the
region wraps at the right margin.
• Disable/enable evaluation of the region.
• Optimize an equation.
• Turn protection on/off for the region.
You can change the properties of a region or regions by right clicking and choosing
Properties from the menu.

Tip You can change the properties for multiple regions by selecting the regions you want to change,
and either selecting Properties from the Format menu or by right clicking on one of the regions
and choosing Properties from the menu.

Note When you select multiple regions, you may only change the properties common to the regions
selected. If you select both math and text regions, you will not be able to change text-only or
math-only options, such as “Occupy Page Width” or “Disable/Enable Evaluation”.
Moving and Copying Regions
Once the regions are selected, you can move or copy them.
Moving regions
You can move regions by dragging with the mouse, nudging with the arrow keys, or
by using Cut and Paste.
To drag regions with the mouse:
1. Select the regions.
2. Place the pointer on the border of any selected region. The pointer turns into a small
hand.
3. Press and hold down the mouse button.
4. Without letting go of the button, move the mouse. The rectangular outlines of the
selected regions follow the mouse pointer.
Dragging regions. To move the selected regions into another worksheet, press and
hold down the mouse button, drag the rectangular outlines into the destination
worksheet, and release the mouse button.
Nudging Regions.To nudge the regions, first select them to get a dotted line around
them. If you want to select a single region, press [Ctrl] and then click on the region.
Then you can use the arrows keys to nudge them in different directions.
To move the selected regions by using Cut and Paste:
1. Select the regions.
2. Choose Cut from the Edit menu, [Ctrl] X, or click on the Standard toolbar.
This deletes the selected regions and puts them on the Clipboard.
3. Click the mouse wherever you want the regions moved. Make sure you’ve clicked
in an empty space.
4. Choose Paste from the Edit menu, [Ctrl] V, or click on the Standard toolbar.

Note You can move one region on top of another. To move a particular region to the top or bottom,
right click on it and choose Bring to Front or Send to Back from the popup menu.

Copying Regions
To copy regions by using the Copy and Paste commands:
1. Select the regions.
2. Choose Copy from the Edit menu, [Ctrl] C, or click on the Standard toolbar
to copy the selected regions to the Clipboard.
3. Click the mouse wherever you want to place a copy of the regions. Make sure you’ve
clicked in an empty space and that you see the crosshair.
4. Choose Paste from the Edit menu, [Ctrl] V.

Tip If the regions you want to copy are coming from a locked area (see “Safeguarding an Area of the
Worksheet” on page 85) or an E-book, you can copy them simply by dragging them with the
mouse into your worksheet.
Deleting Regions
To delete one or more regions:
1. Select the regions.
2. Choose Cut from the Edit menu, [Ctrl] X.
Choosing Cut removes the selected regions from your worksheet and puts them on the
Clipboard. If you don’t want to disturb the contents of your Clipboard, or if you don’t
want to save the selected regions, choose Delete from the Edit menu or press
[Ctrl] D instead.

A Simple Calculation
Although Mathcad can perform sophisticated mathematics, you can easily use it as a
simple calculator. To try your first calculation, follow these steps:
1. Click anywhere in the worksheet. You see a small
crosshair. Anything you type appears at the crosshair.
2. Type 15-8/104.5=. When you type the equal sign or
click on the Evaluation toolbar, Mathcad computes
the result.
This calculation demonstrates the way Mathcad works:
• Mathcad sizes fraction bars, brackets, and other symbols to display equations the
same way you might see them in a book or on a blackboard.
• Mathcad understands which operation to perform first. In this example, Mathcad
knew to perform the division before the subtraction and displayed the equation
accordingly.
• As soon as you type the equal sign or click on the Evaluation toolbar, Mathcad
returns the result. Unless you specify otherwise, Mathcad processes each equation
as you enter it. See the section “Controlling Calculation” in Chapter 8 to learn how
to change this.
• As you type each operator (in this case, − and /), Mathcad shows a small rectangle
called a placeholder. Placeholders hold spaces open for numbers or expressions not
yet typed. As soon as you type a number, it replaces the placeholder in the
expression. The placeholder that appears at the end of the expression is used for
unit conversions. Its use is discussed in “Displaying Units of Results” on page 115.
Once an equation is on the screen, you can edit it by clicking in the appropriate spot
and typing new letters, numbers, or operators. You can type many operators and Greek
letters by clicking in the math toolbars introduced in “The Mathcad Workspace” on
page 11. Chapter 4, “Working with Math,” details how to edit Mathcad equations.
Definitions and Variables
Mathcad’s power and versatility quickly become apparent once you begin using
variables and functions. By defining variables and functions, you can link equations
together and use intermediate results in further calculations.
Defining Variables
To define a variable t, follow these steps:

1. Type t followed by a colon : or click on the Calculator


toolbar. Mathcad shows the colon as the definition symbol :=.
2. Type 10 in the empty placeholder to complete the definition
for t.
If you make a mistake, click on the equation and press [Space]
until the entire expression is between the two editing lines, just as you did earlier. Then
delete it by choosing Cut from the Edit menu ([Ctrl] X). See Chapter 4, “Working
with Math,” for other ways to edit an expression.
These steps show the form for typing any definition:
1. Type the variable name to be defined.

2. Type the colon key : or click on the Calculator toolbar to insert the definition
symbol.
3. Type the value to be assigned to the variable. The value can be a single number or
a more complicated combination of numbers and previously defined variables.
Mathcad worksheets read from top to bottom and left to right. Once you have defined
a variable like t, you can compute with it anywhere below and to the right of the equation
that defines it.
Now enter another definition:
1. Press [↵]. This moves the crosshair below the first
equation.
2. To define acc as –9.8, type: acc:–9.8. Then press [↵]
again. Mathcad shows the crosshair cursor below the last
equation you entered.
Calculating Results
Now that the variables acc and t are defined, you can use them in other expressions:
1. Click the mouse a few lines below the two definitions.
2. Type acc/2[Space]*t^2. The caret symbol (^)
represents raising to a power, the asterisk (*) is
multiplication, and the slash (/) represents division.
3. Press the equal sign [=].
This equation calculates the distance traveled by a falling body in time t with
acceleration acc. When you enter the equation and press the equal sign [=], or click
on the Evaluation toolbar, Mathcad returns the result.
Mathcad updates results as soon as you make changes. For example, if you click on the
10 on your screen and change it to some other number, Mathcad changes the result as
soon as you press [Enter] or click outside of the equation.

Entering Text
Mathcad handles text as easily as it does equations, so you can make notes while
calculating.
Here’s how to enter text:
1. Click in the blank space to the right of the equations you
entered. You’ll see a small crosshair.
2. Choose Text Region from the Insert menu, or press " (the
double-quote key), to tell Mathcad that you’re about to enter
some text. Mathcad changes the crosshair into a vertical line called the insertion
point. Characters you type appear behind this line. A box surrounds the insertion
point, indicating you are now in a text region. This box is called a text box. It grows
as you enter text.
3. Type Equations of motion. The text appears in the
worksheet.

Note If Ruler under the View menu is checked when the cursor is inside a text region, the ruler resizes
to indicate the size of your text region. To use the ruler to set tab stops and indents in a text
region, see “Changing Paragraph Properties” on page 69.

Tip If you click in blank space in the worksheet and start typing, which creates a math region,
Mathcad automatically converts the math region to a text region when you press [Space].

To enter a second line of text:


1. Press [↵].
2. Then type for falling body under gravity.
3. Click in a different spot in the worksheet or press
[Ctrl][Shift][↵] to move out of the text
region. The text box disappears and the cursor
appears as a small crosshair.

Note Use [Ctrl][Shift][↵] to move out of the text region to a blank space in your worksheet. If
you press [↵], Mathcad inserts a line break in the current text region instead.

You can set the width of a text region and change the font, size, and style of the text in
it. (See Chapter 6, “Working with Text.”)
Iterative Calculations
Mathcad can do repeated or iterative calculations as easily as individual calculations
by using a special variable called a range variable.
Range variables take on a range of values, such as all the integers from 0 to 10.
Whenever a range variable appears in a Mathcad equation, Mathcad calculates the
equation not just once, but once for each value of the range variable.
Creating a Range Variable
To compute equations for a range of values, first create a range variable. In the problem
shown in “Calculating Results” on page 17, for example, you can compute results for
a range of values of t from 10 to 20 in steps of 1.
To do so, follow these steps:
1. First, change t into a range variable by editing its definition.
Click on the 10 in the equation t:=10. The insertion point
should be next to the 10 as shown.
2. Type ,11. This tells Mathcad that the next number in the range
will be 11.
3. Type ; for the range variable operator, or click on the
Matrix toolbar, and then type the last number, 20. This tells
Mathcad that the last number in the range will be 20. Mathcad
shows the range variable operator as a pair of dots.

4. Now click outside the equation for t. Mathcad begins to compute


with t defined as a range variable. Since t now takes on eleven
different values, there must also be eleven different answers.
These are displayed in an output table as shown at right.

Defining a Function
Here’s how to add a function definition to your worksheet:
1. First delete the table if you are in the same worksheet.
Now define the function d(t) by typing d(t):
2. Complete the definition by typing this expression:
1600+acc/2[Space]*t^2[↵]
The definition you just typed defines a function. The function name is d, and the
argument of the function is t. You can use this function to evaluate the above expression
for different values of t. To do so, simply replace t with an appropriate number. For
example:
1. To evaluate the function at a particular value, such as 3.5,
type d(3.5)=. Mathcad returns the correct value as shown
at right.

2. To evaluate the function once for each value of the range variable
t you defined earlier, click below the other equations and type
d(t)=. Mathcad shows a table of values, as shown at right.

Formatting a Result
You can set the display format for any number Mathcad calculates and displays. This
means changing the number of decimal places shown, changing exponential notation
to ordinary decimal notation, and so on.
For example, in the example above, the first two values, 1.11 ⋅ 10 3 and 1.007 ⋅ 10 3 ,
are in exponential (powers of 10) notation. Here’s how to change the table produced
above so that none of the numbers in it are displayed in exponential notation:
1. Click anywhere on the table with the
mouse.
2. Choose Result from the Format
menu. You see the Result Format
dialog box. This box contains
settings that affect how results are
displayed, including the number of
decimal places, the use of
exponential notation, the radix, and
so on.
3. The default format scheme is General which has Exponential Threshold
set to 3. This means that only numbers greater than or equal to 10 3 are
displayed in exponential notation. Click the arrows to the right of the 3
to increase the Exponential Threshold to 6.
4. Click “OK.” The table changes to reflect the new result format.
(See“Formatting Results” on page 112.)

Note When you format a result, only the display of the result is affected. Mathcad maintains full
precision internally (up to 15 digits).
Graphs
Mathcad provides two-dimensional Cartesian and polar graphs, contour plots, surface
plots, and a variety of other three-dimensional graphs. This section describes how to
create a simple two-dimensional graph showing the points calculated in the previous
section.
Creating a Basic Graph
To create an X-Y plot:
1. Click in your worksheet.
2. Choose Graph⇒X-Y Plot from the Insert menu

or click on the Graph toolbar. Alternatively,


type [Shift]2 or @. Mathcad inserts a blank
X-Y plot.
3. Fill in both the x-axis placeholder (bottom center)
and the y-axis placeholder (left center) with a
function, expression, or variable.
4. Click outside the plot or press [Enter].
Mathcad automatically chooses axis limits for you. If you want to specify the axis limits
yourself, click in the plot and type over the numbers in the placeholders at the ends of
the axes.
Mathcad creates the plot over a default range using default limits. See “Formatting a
2D Plot” on page 168 for how to modify these defaults. For detailed information on
graphs, see Chapter 11, “2D Plots.”
Formatting a Graph
When you first create a graph it has default characteristics: numbered linear axes, no
grid lines, and points connected with solid lines. You can change these characteristics
by formatting the graph. To format the graph created previously:
1. Click on the graph and choose
Graph⇒X-Y Plot from the Format
menu, or double-click the graph to
bring up the formatting dialog box. To
learn more about these settings, see
Chapter 11, “2D Plots.”
2. Click the Traces tab.
3. Click “trace 1” in the scrolling list
under “Legend Label.” Mathcad
places the current settings for trace 1 in
the boxes under the corresponding
columns of the scrolling list.
4. Click the arrow under the “Type” column
to see a drop-down list of trace types.
Select “bar” from this drop-down list.
5. Mathcad shows the graph as a bar chart
instead of connecting the points with
lines. Note that the sample line under the
d(t) now has a bar on top of it.
6. Click outside the graph to deselect it.

Saving, Printing, and Exiting


Once you’ve created a worksheet, you will probably want to save or print it.
Saving a Worksheet
To save a worksheet:
1. Choose Save from the File menu (keystroke: [Ctrl] S) or click on the
Standard toolbar. If the file has never been saved before, the Save As dialog box
appears.
2. Type the name of the file in the text box provided. To save to another folder, locate
the folder using the Save As... dialog box.
By default Mathcad saves the file in Mathcad (MCD) format, but you have the option
of saving in other formats, such as HTML, as RTF for Microsoft Word, as a template
for future Mathcad worksheets, or in a format compatible with earlier Mathcad versions.
To save as HTML, choose Save as Web Page under the File menu. (See Chapter 7,
“Worksheet Management.”)
Printing

To print, choose Print from the File menu or click on the Standard toolbar. To

preview the printed page, choose Print Preview from the File menu or click on
the Standard toolbar.(See Chapter 7, “Worksheet Management.”)
Exiting Mathcad
To quit Mathcad choose Exit from the File menu. If you have moved any toolbars,
Mathcad remembers their locations for the next time you open the application.

Note To close an individual worksheet while keeping Mathcad open, choose Close from the
File menu.
Working with Math

! Inserting Math
! Building Expressions
! Editing Expressions
! Math Styles

Inserting Math
You can place math expressions anywhere you want in a Mathcad worksheet.
1. Click anywhere in the worksheet. Anything you type
appears at the crosshair.
2. Type numbers, letters, and math operators, or insert them
by clicking buttons on Mathcad’s math toolbars, to create
a math region.
You’ll notice that unlike a word processor, Mathcad by default understands anything
you type at the crosshair cursor as math. If you want to create a text region instead, see
Chapter 6, “Working with Text.”
You can also type math expressions in any math placeholder that appears. See Chapter
17, “Operators” for more on Mathcad’s operators.
Numbers and Complex Numbers
A single number in Mathcad is called a scalar. To enter groups of numbers in arrays,
see “Inserting an Operator” on page 38.
Types of numbers
In math regions, Mathcad interprets anything beginning with one of the digits 0–9 as
a number. A digit can be followed by:
• other digits
• a decimal point
• digits after the decimal point
• or appended as a suffix, one of the letters b, h, or o, for binary, hexadecimal, and
octal numbers, or i or j for imaginary numbers. These are discussed in more detail
below. See “Appendix G: Suffixes for Numbers” on page 443 for additional
suffixes.

Note Mathcad uses the period (.) to signify the decimal point. The comma (,) is used to separate
values in a range variable definition, as described in “Range Variables” on page 103. So when
you enter numbers greater than 999, do not use either a comma or a period to separate digits into
groups of three. Simply type the digits one after another. For example, to enter ten thousand, type
“10000”.
Imaginary and complex numbers
To enter an imaginary number, follow it with i or j, as in 1i or 2.5j.

Note You cannot use i or j alone to represent the imaginary unit. You must always type 1i or 1j. If
you don’t, Mathcad thinks you are referring to a variable named either i or j. When the cursor is
outside an equation that contains 1i or 1j, however, Mathcad hides the (superfluous) 1.

Although you can enter imaginary numbers followed by either i or j, Mathcad normally
displays them followed by i. To have Mathcad display imaginary numbers with j,
choose Result from the Format menu, click on the Display Options tab, and set
“Imaginary value” to “j(J).” See “Formatting Results” on page 112 for a full
description.
Mathcad accepts complex numbers of the form a + bi (or a + bj ), where a and b are
ordinary numbers.
Binary numbers
To enter a number in binary, follow it with the lowercase letter b. For example,
11110000b represents 240 in decimal. Binary numbers must be less than 2 31 .
Octal numbers
To enter a number in octal, follow it with the lowercase letter o. For example, 25636o
represents 11166 in decimal. Octal numbers must be less than 2 31 .
Hexadecimal numbers
To enter a number in hexadecimal, follow it with the lowercase letter h. For example,
2b9eh represents 11166 in decimal. To represent digits above 9, use the upper or
lowercase letters A through F. To enter a hexadecimal number that begins with a letter,
you must begin it with a leading zero. If you don’t, Mathcad will think it’s a variable
name. For example, use 0a3h (delete the implied multiplication symbol between 0
and a) rather than a3h to represent the decimal number 163 in hexadecimal.
Hexadecimal numbers must be less than 2 31 .
Exponential notation
To enter very large or very small numbers in exponential notation, just multiply a
number by a power of 10. For example, to represent the number 3 ⋅ 10 8 , type 3*10^8.

Vectors and Matrices


In Mathcad a column of numbers is a vector and a rectangular array of numbers is called
a matrix. The general term for a vector or matrix is an array. The term “vector” refers
to a column vector. A column vector is simply a matrix with one column. You can also
create a row vector by creating a matrix with one row and many columns. There are a
number of ways to create an array in Mathcad. See Chapter 5, “Vectors, Matrices, and
Data Arrays” for more information.

Tip You may wish to distinguish between the names of matrices, vectors, and scalars by font. Names
of vectors could be set in bold while setting scalars in italic. See “Math Styles” on page 50.
Strings
Although in most cases the math expressions or variables you work with in Mathcad
are numbers or arrays, you can also work with strings (also called string literals or
string variables). Strings can include any character you can type at the keyboard,
including letters, numbers, punctuation, and spacing, as well as a variety of special
symbols as listed in “Appendix K: ASCII codes” on page 447. Strings differ from
variable names or numbers because Mathcad always displays them between double
quotes. You can assign a string to a variable name, use a string as an element of a vector
or matrix, or use a string as the argument to a function.
To create a string:
1. Click on an empty math placeholder usually on the
right-hand side of a variable definition.
2. Type the double-quote (") key to get a pair of quotes
with an insertion line between them.
3. Type any combination of letters, numbers,
punctuation, or spaces. Click outside the expression
or press the right arrow key (→) twice when you are
finished.
To enter a special character corresponding to one of the ASCII codes:
1. Click to position the insertion point in the string.
2. Hold down the [Alt] key, and type the number “0” followed immediately by the
number of the ASCII code using the numeric keypad in number-entry mode.
3. Release the [Alt] key to see the symbol in the string.
For example, to enter the degree symbol (°) in a string, press [Alt] and type “0176”
using the numeric keypad.

Note The double-quote key (") has a variety of meanings in Mathcad, depending on the exact location
of the cursor in your worksheet. When you want to enter a string, you must always have a blank
placeholder selected.

Valid strings include expressions such as “Invalid input: try a number less than -5,”
and “Meets stress requirements.” A string in Mathcad, while not limited in size, always
appears as a single line of text. Note that a string such as “123” is understood by Mathcad
to be a string of characters rather than the number 123.

Tip Strings are especially useful for generating custom error messages in programs, as described in
Chapter 15, “Extending and Automating Mathcad.” Other string handling functions are listed in
“String Functions” on page 256. You can use strings to specify system paths for arguments to
some Mathcad built-in functions. (See “File Access Functions” on page 250.)
Names
A name in Mathcad is simply a sequence of characters you type referring to a variable
or function used in computations. Mathcad distinguishes between two kinds of names:
• Built-in names.
• User-defined names.
Built-in names
Mathcad’s built-in names include built-in variables and built-in functions.
• Some predefined or built-in variables either have a conventional value, like π
(3.14159...) or e (2.71828...), or are used as system variables to control how
Mathcad performs calculations. (See “Built-in Variables” on page 100.)
• In addition to these predefined variables, Mathcad treats the names of all built-in
units as predefined variables. For example, Mathcad recognizes the name “A” as
the ampere, “m” as the meter, “s” as the second, and so on. Choose Unit from the

Insert menu or click on the Standard toolbar to insert one of Mathcad’s


predefined units. (See “Units and Dimensions” on page 109.)

• Choose Function from the Insert menu or click on the Standard toolbar to
insert one of Mathcad’s built-in functions. (See “Built-in Functions” on page 249.)
User-defined variable and function names
Names in Mathcad can contain any of the following characters:
• Uppercase and lowercase letters.
• The digits 0 through 9.
• The underscore (_).
• The prime symbol ('). Note that this is not the same as an apostrophe. The prime
symbol is on the same key as the tilde (~) or press [Ctrl][F7] to insert it.
• The percent symbol (%).
• Greek letters. To insert a Greek letter, click a button on the Greek toolbar or type
the equivalent roman letter and press [Ctrl]G. (See “Greek letters” on page 37.)

• The infinity symbol ∞ is inserted by clicking on the Calculus toolbar or by


typing [Ctrl][Shift]Z.
• The following are examples of valid names:
alpha b
xyz700 A1_B2_C3_D4%%%
F1' a%%

The following restrictions apply to variable names:


• A name cannot start with one of the digits 0 through 9. Mathcad interprets anything
beginning with a digit as either an imaginary number ( 2i or 3j ), a binary, octal,
or hexadecimal number (e.g., 5o, 7h), or as a number times a variable ( 3 ⋅ x ).
• The infinity symbol ∞ can only appear as the first character in a name.
• Any characters you type after a period (.) appear as a subscript. (See “Literal
subscripts” on page 37.)
• All characters in a name must be in the same font, have the same point size, and be
in the same style (italic, bold, etc.). Greek letters can, however, appear in any
variable name. (See “Math Styles” on page 50.)
• Mathcad does not distinguish between variable names and function names. Thus,
if you define f(x), and later on you define the variable f, you will find that you cannot
use f(x) anywhere below the definition for f.
• Although you can redefine Mathcad’s names for built-in functions, constants, and
units, keep in mind that their built-in meanings will no longer exist after the
definition. For example, if you define a variable mean, Mathcad’s built-in function
mean(v) can no longer be used.

Note Mathcad distinguishes between uppercase and lowercase letters. For example, diam is a different
variable from DIAM. Mathcad also distinguishes between names in different fonts, as discussed
in “Math Styles” on page 50. Thus, Diam is also a different variable from Diam.

Tip To type symbols such as $ in a name, press [Ctrl][Shift]K, type the symbol(s), and type
[Ctrl][Shift]K again.

Greek letters
There are two ways to enter a Greek variable name:

• Click the letter on the Greek toolbar. To see this toolbar, click on the Math
toolbar or choose Toolbars⇒Greek from the View menu.
• Type the Roman equivalent of the Greek symbol and then press [Ctrl]G. For
example, to enter φ, press f[Ctrl]G. See “Appendix H: Greek Letters” on page
444 in the Appendices for a table of Greek letters and their Roman equivalents.

Note Although many uppercase Greek letters look like ordinary capital letters, they are not the same.
Mathcad distinguishes between Greek and Roman letters, even if they appear the same.

Tip The Greek letter π can also be typed by pressing [Ctrl][Shift]P.

Literal subscripts
If you include a period in a variable name, Mathcad displays whatever follows the
period as a subscript. You can use these literal subscripts to create variables with names
like vel init and u air .

To create a literal subscript:


1. Type the text that appears before the subscript.
2. Type a period (.) followed by text that is to become the subscript.
Note Do not confuse literal subscripts with array subscripts, which are generated with the left bracket

key ([) or by clicking on the Calculator toolbar. Although they appear similar—a literal
subscript appears below the line, like an array subscript, but with a slight space before the
subscript—they behave quite differently in computations. A literal subscript is simply a
cosmetic part of a variable name. An array subscript represents a reference to an array element.
See Chapter 5, “Vectors, Matrices, and Data Arrays”.

Operators
Operators are symbols like “+” and “−” that link variables and numbers together to
form expressions. The variables and numbers linked together by operators are called
operands. For example, in an expression like:

ax + y
the operands for the “+” are x and y. The operands for the exponent operator are a and
the expression x + y .

Inserting an Operator
Insert arithmetic operators in Mathcad using standard keystrokes, like * and +, that you
use in other applications. Alternatively, all of Mathcad’s operators can be inserted from
the math toolbars. For example, insert a derivative operator by clicking on the
Calculus toolbar, or by typing ?. Choose Toolbars from the View menu to see the math
toolbars. See Chapter 17, “Operators” for a complete list of operators, their keystrokes,
and descriptions.

Note To use operators in text, first click in the text and choose Math Region from the Insert menu.

Tip You can find the keyboard shortcut for an operator by hovering the mouse pointer over a button
in a math toolbar and reading the tooltip.

When you insert a Mathcad operator into a blank space in your worksheet, a
mathematical symbol with empty placeholders appears. You must enter a valid math
expression in each placeholder of an operator in order to calculate a result.
Here is a very simple example involving Mathcad’s addition operator:

1. Click in a blank space in your worksheet and click on the


Calculator toolbar, or simply type +. The addition operator with
two placeholders appears.
2. Enter 2 in the first placeholder.
3. Click in the second placeholder, or press [Tab] to move the
cursor, and enter 6.

4. Press =, or click on the Evaluation toolbar, to see the


numerical result.
Building Expressions
You can create many mathematical expressions by simply typing.
For example, you type these characters: 3/4+5^2=
to get the result at the right.
Mathcad’s equation editor is designed to work within the structure of a mathematical
expression so that expressions are not so much typed as they are built.
Mathcad assembles the parts that make up an expression using the rules of precedence
plus some additional rules to simplify entering denominators, exponents, and
expressions in radicals. For example, when you type / or click on the Calculator
toolbar to create a fraction, Mathcad stays in the denominator until you press [Space]
to select the entire expression.
Typing in Names and Numbers
When you type in names or numbers, Mathcad behaves very much like a standard word
processor. As you type, you see the characters you type appear behind a vertical editing
line. The left and right arrow keys move this vertical editing line to the left or to the
right a character at a time. There are, however, two important differences:
• As it moves to the right, the vertical editing line leaves behind a
trail. This trail is a “horizontal editing line.”
• Unless the equation you’ve clicked in already has an operator in
it, pressing [Space] turns the math region into a text region. It is not possible to
turn a text region back into a math region.
Typing in Operators
The key to working with operators is learning to specify what variable or expression is
to become an operand. There are two ways to do this:
• You can type the operator first, then fill in the placeholders with operands, or
• You can use the editing lines to specify what variable or expression you want to
select.
The first method is like building a skeleton and filling in the details later. This method
may be easier to use for very complicated expressions, or when you’re working with
operators like summation that require many operands but don’t have a natural typing
order.
The second method is more like straight typing so can be much faster when expressions
are simple. You may find yourself switching back and forth as the need arises.
Here’s how to create the expression a x + y using the first method:

1. Press ^ to create the exponent operator, or click on the


Calculator toolbar. You see two placeholders. The editing lines
“hold” the exponent placeholder.
2. Click in the lower placeholder and type a.
3. Click in the upper placeholder.

4. Type +.

5. Click in the remaining placeholders and type x and y.

To use the editing lines to create the expression a x + y proceed as follows:


1. Type a. The editing lines hold the a indicating that a becomes the
first operand of whatever operator you type next.
2. Press ^ to create the exponent operator. a becomes the first operand
of the exponent. The editing lines now hold another placeholder.
3. Type x+y in this placeholder to complete the expression.

Note that you can type the expression the same way you’d say it out loud. However,
even this simple example already contains an ambiguity. When you say “a to the x plus
y” there’s no way to tell if you mean a x + y or a x + y . For more complicated
expressions, the number of ambiguities increases dramatically.
Although you can always resolve ambiguities by using parentheses, doing so can
quickly become cumbersome. A better way is to use the editing lines to specify the
operands of whatever operator you type. The following example illustrates this by
describing how to create the expression a x + y instead of a x + y .
1. Enter a^x as you did in the previous example. Note how the editing
lines hold the x between them. If you were to type + at this point, the
x would become the first operand of the plus.
2. Press [Space]. The editing lines now hold the entire expression a x .

3. Now type +. Whatever was held between the editing lines now
becomes the first operand of the plus.
4. In the remaining placeholder, type y.
Multiplication
When writing, expressions like ax or a ( x + y ) are easily understood to mean “a times
x” and “a times the quantity x plus y,” respectively.
This cannot be done with Mathcad variables for the simple reason that when you type
ax, Mathcad has no way of knowing whether you mean “a times x” or “the variable
named ax.” Similarly, when you type a(x+y), Mathcad cannot tell if you mean
“a times the quantity x plus y” or whether you mean “the function a applied to the
argument x + y .”
To avoid ambiguity in math expressions, we recommend that you always press *
explicitly to indicate multiplication, as shown in the following example:
1. Type a followed by *. Mathcad inserts a small dot after the “a” to
indicate multiplication.
2. In the placeholder, type the second factor, x.

Note In the special case when you type a numerical constant followed immediately by a variable
name, such as 4x, Mathcad interprets the expression to mean the constant multiplied by the
variable: 4 ⋅ x . Mathcad displays a space between the constant and the variable to indicate that
the multiplication is implied. This enables you to produce math notation that closely
approximates the notation in textbooks. However, Mathcad reserves certain letters, such as “i”
for the imaginary unit and “o” for octal, as suffixes for numbers, and in these cases does not
attempt to multiply the number by a variable name but rather treats the expression as a single
number with a suffix.

Tip You can change the display of the multiplication operator to an X, a thin space, or a large dot.
To do so, click on the multiplication operator with the right mouse button and choose View
Multiplication As... Or to change all the multiplication operators in a worksheet, choose
Worksheet Options from the Tools menu, click on the Display tab, and choose from the
selections next to “Multiplication.” See “Changing the Display of an Operator” on page 391.

An Annotated Example
An equation is really two-dimensional, with a structure more like a tree with branches
than like a line of text. As a result, Mathcad has to use a two-dimensional editing cursor.
That’s why there are two editing lines: a vertical line and a horizontal line.
Suppose, for example, that you want to type the slightly more complicated expression
x – 3 ⋅ a2
---------------------------------------
–4+ y+1+π
Watch what happens to the editing lines in the following steps:
1. Type x-3*a^2. Since the editing lines contain just the “2,”
only the “2” becomes the numerator when you press the /. To
make the whole expression, x – 3 ⋅ a 2 , be the numerator, you
need the editing lines to hold the entire expression.
2. Press [Space]. Each time you press [Space], the editing lines
hold more of the expression. You need to press [Space] three
times to enclose the entire expression.
3. Now press / to create a division bar. Note that the numerator
is whatever was enclosed between the editing lines when you
pressed /.

4. Now type -4+ and click on the Calculator toolbar. Then


type y+1 under the radical to complete the denominator.
5. To add something outside the radical sign, press [Space]
twice to make the editing lines hold the radical. For example,
to add the number π to the denominator, press [Space] twice.
6. Press +. Since the editing lines are holding the entire radical,
it is the entire radical that becomes the first operand when you
press +.
7. Click on the Calculator toolbar or press [Ctrl][Shift]P.

Editing Expressions
Changing a Name or Number
To edit a name or number:
1. Click on it with the mouse. The vertical editing line appears.
2. Move the vertical editing line by pressing the [→] and [←] keys.
3. If you type a character, it appears just to the left of the vertical editing line. Pressing
[Bksp] removes the character to the left. Pressing [Delete] removes the character
to the right.
Choose Replace from the Edit menu to change several occurrences of the same name
or number. To search for a sequence of characters, choose Find from the Edit menu.
See “Text Tools” on page 73.
Inserting an Operator
The easiest place to insert an operator is between two characters in a name or two
numbers in a constant. For example, here’s how to insert a plus sign between two
characters:
1. Place the editing lines where you want the plus sign to be.

2. Press the + key, or click on the Calculator toolbar.

Note Mathcad inserts spaces automatically around operators wherever doing so is appropriate. If you
do try to insert a space, Mathcad assumes you meant to type text rather than math and converts
your math region into a text region.

When you insert a division sign, Mathcad moves everything that comes after the
division sign into the denominator. Here’s how you insert a division sign:
1. Place the editing lines where you want the division sign.

2. Press the / key or click on the Calculator toolbar. Mathcad


reformats the expression.
Some operators require only one operand. Examples are the square root, absolute value,
and complex conjugate operators. To insert one of these, place the editing lines on either
side of the operand and press the appropriate keystroke. Many of these operators are
available on the Calculator toolbar as well. For example, to turn x into x do the
following:
1. Place the editing lines around the “x,” either preceding or following
the character.

2. Press \ to insert the square root operator, or click on the


Calculator toolbar.
Applying an Operator to an Expression
If you want to apply an operator to an entire expression:
• Surround the expression in parentheses, or
• Use the editing lines to specify the expression.
Although the first method may be more intuitive, it is slower since you need to type a
pair of parentheses. The more efficient, second method is described below. “Inserting
Parentheses” on page 46 describes working with parentheses.
The editing lines consist of a horizontal line and a vertical line that moves left to right
along the horizontal line. To make an operator apply to an expression, select the
expression by placing it between the two editing lines. The following examples show
how typing *c results in completely different expressions depending on what was
selected.
• The two editing lines hold only the numerator. Any operator
you type will apply only to the numerator.

• Typing *c applies the operation to the numerator only.

• The editing lines hold the entire fraction. Any operator you type
will apply to the entire fraction.

• Typing *c applies to the whole fraction.

• The editing lines hold the entire fraction. However, this time
the vertical editing line is on the left side instead of on the right
side.
• Typing *c results in this expression. The c is before the fraction.
because the vertical editing line was on the left side rather than
the right side.
Controlling the editing lines
Use the following techniques to control what’s between the editing lines:
• Click on an operator. To move the vertical editing line from one side to the other
of the expression, press [Insert].
• Use the left and right arrow keys to move the vertical editing line one character at
a time. The horizontal editing line selects an operand of the nearest operator. If your
expression contains built-up fractions, you can also use the up and down arrow keys
to move the editing lines.
• Press [Space] to select larger parts of the expression. Each time you press
[Space], the editing lines enclose more and more of the expression, until they
enclose the entire expression. Pressing [Space] one more time brings the editing
lines back to where they started.

Tip You can drag-select parts of an expression to hold it between the editing lines. The selected
expression is highlighted in reverse video. Whatever you type next overwrites the highlighted
expression.

The following example walks you through a short cycle of using [Space]:
1. This is the starting position. The two editing lines hold just the
single variable “d.”

2. Pressing [Space] makes the editing lines grow so that they now
hold the entire denominator.

3. Pressing [Space] again makes the editing lines grow again so


that they now hold the entire expression.

4. At this point, the editing lines can’t become any longer. Pressing
[Space] brings the editing lines back to the starting point of the
cycle.
You’ll notice there was never an intermediate step in which the editing lines held just
the numerator. Nor was there ever a step in which the editing lines held just the a or
just the b in the numerator. The sequence of steps the editing lines go through as you
press [Space] depends on the starting point of the cycle.
The arrow keys walk the editing lines through the expression in the indicated direction.
Keep in mind that the idea of “up” and “down” or “left” and “right” may not always
be obvious, particularly when the expression becomes very complicated or if it involves
summations, integrals, and other advanced operators.

Note Editing of strings differs from editing of other math expressions because you must use the arrow
keys or click outside the string to move out of a string. Pressing [Space], which can be used
in other expressions to change the position of the editing lines, is interpreted as just another
character in a string.
Deleting an Operator
To delete an operator connecting two variable names or constants:
1. Place the vertical editing line after the operator.

2. Press [BkSp].
Now you can insert a new operator to replace the one you deleted just
by typing it in.

Tip You can place the editing lines before an operator and press [Delete].

In these examples, it is easy to see what “before” and “after” mean because the
expressions involved naturally flow from left to right, the same way we read. Fractions
behave the same way. Since we naturally say “a over b,” putting the editing lines “after”
the division bar means putting them just before the b. Similarly, putting the editing lines
“before” the division bar means putting them immediately after the a. The following
example illustrates this:
1. Place the vertical editing lines after the division bar.

2. Press [BkSp].
To delete an operator having only one operand
(for example, x , x or x! ):
1. Position the editing lines just after the operator.

2. Press [BkSp].
For certain operators, it may not be clear where to put the editing lines.
For example, it is not clear when looking at x or x what “before” and “after” mean.
When this happens, Mathcad resolves the ambiguity by referring to the spoken form
of the expression. For example, since you read x as “x conjugate,” the bar is treated as
being after the x.

Replacing an Operator
To replace an operator after deleting it, simply type the new operator after pressing
[BkSp].
To replace an operator between two expressions:
1. Position the editing lines just after the operator.
2. Press [BkSp]. An operator placeholder appears.

3. Type the new operator.


Inserting a Minus Sign
The minus sign that means “negation” uses the same keystroke as the one that means
“subtract.” To determine which one to insert, Mathcad looks at where the vertical
editing line is. If it’s on the left, Mathcad inserts the “negation” minus sign. If it’s on
the right, Mathcad inserts the “subtract” minus sign. To move the vertical editing line
from one side to the other, use [Insert].
The following example shows how to insert a minus sign in front of “sin(a).”
1. Click on the sin(a). If necessary, press [Space] to select the entire
expression.
2. If necessary, press [Insert] to move the vertical editing line all
the way to the left.
3. Type -, or click on the Calculator toolbar, to insert a minus sign.

Inserting Parentheses
Mathcad places parentheses automatically to maintain the precedence of operations.
You may want to place parentheses to clarify an expression or to change the overall
structure of the expression. You can either insert a matched pair of parentheses all at
once or insert the parentheses one at a time. We recommend you insert a matched pair
since this avoids the possibility of unmatched parentheses.
To enclose an expression with a matched pair of parentheses:
1. Select the expression by placing it between the editing lines. Do
this by clicking on the expression and pressing [Space] one or
more times.

2. Type the single-quote key (‘), or click on the Calculator


toolbar. The selected expression is now enclosed by
parentheses.
It is sometimes necessary to insert parentheses one at a time using the ( and ) keys.
For example, to change a – b + c to a – ( b + c ) do the following:
1. Move the editing lines just to the left of the b. Make sure the
vertical editing line is on the left as shown. Press [Insert] if
necessary to move it over.
2. Type (and click to the right of the c. Make sure the vertical
editing line is to the right as shown. Press [Insert] if
necessary to move it over.
3. Type ).
Deleting Parentheses
Whenever you delete one parenthesis, Mathcad deletes the matched parenthesis. This
prevents you from inadvertently creating an expression having unmatched parentheses.
To delete a matched pair of parentheses:
1. Move the editing lines to the right of the “(”.

2. Press [BkSp]. Note that you could also begin with the editing
lines to the left of the “)”and press [Delete] instead.
Insert Function
To see an alphabetical or category listing of available built-in functions or to insert a
function together with placeholders for its arguments, choose Function from the Insert
menu. The dialog box lists all functions.
1. Click in a blank area of your worksheet or on a placeholder.
2. Choose Function from the
Insert menu or click on the
Standard toolbar. Mathcad opens
the Insert Function dialog box.
3. Choose a Function Category or
click “All” to see all functions
sorted alphabetically.

4. Double-click the name of the


function you want to insert from the right-hand list, or click “Insert.”
The function and placeholders for its arguments are inserted into the
worksheet.
5. Fill in the placeholders.
To apply a function to an expression you have already entered, select the
expression and follow the steps given above. See Chapter 4, “Working with Math.”
You can also type the name of a built-in function directly into a math placeholder or in
a math region.

Tip Although built-in function names are not font sensitive, they are case sensitive. If you do not use
the Insert Function dialog box to insert a function name, you must enter the name of a built-in
function in a math region exactly as it appears in the tables in Chapter 16, “Functions: :
uppercase, lowercase, or mixed, as indicated.

Note Brackets, [ ], around an argument indicate that the argument is optional.


Assistance for Using Built-in Functions
Mathcad includes several sources of assistance for using built-in functions:
• Chapter 16, “Functions” provides details on the syntax, arguments, algorithms, and
behavior of all of Mathcad’s built-in functions, operators, and keywords.
• The Insert Function dialog box gives you a convenient way to look up a function
by category, to see the arguments required, and to see a brief function synopsis.
When you click “Help” in the Insert Function dialog box, you immediately open
the Help topic associated with the currently selected function.

• Online Help or clicking on the Standard toolbar provides both overview and
detailed help on functions and function categories.
• QuickSheets under the Help menu include working examples of most functions.
Applying a Function to an Expression
To turn an expression into the argument of a function, follow these steps:
1. Click in the expression and press [Space] until the entire
expression, w ⋅ t – k ⋅ z , is held between the editing lines.

2. Type the single-quote key (‘), or click on the Calculator


toolbar. The selected expression is enclosed by parentheses.
3. Press [Space]. The editing lines now hold the parentheses
as well.
4. If necessary, press the [Insert] key so that the vertical
editing line switches to the left side.
5. Now type the name of the function. If the function you wish
to use is a built-in function, you can also choose Function
from the Insert menu or click on the Standard toolbar
and double-click the name of the function.
Moving Parts of an Expression
The menu commands Cut, Copy, and Paste from the Edit menu are useful for editing
complicated expressions. They function as follows:
• Cut deletes whatever is between the editing lines and copies it to the Clipboard.
• Copy takes whatever is between the editing lines and copies it to the Clipboard.
• Paste takes whatever is on the Clipboard and places it into your worksheet, either
into a placeholder or into blank space.
The Copy and Paste commands use the Clipboard to move expressions from one place
to another. You can, however, bypass the Clipboard by using Mathcad’s equation drag
and drop feature.
Suppose you want to build the expression
cos ( wt + x ) + sin ( wt + x )
1. Drag-select the argument to the cosine
function so that it is highlighted in reverse
video.
2. Press and hold down [Ctrl] and the mouse
button. The pointer changes to indicate that it
carries the selected expression with it.
3. With the mouse button still held down, drag
the pointer over the placeholder.

4. Release the mouse button. The pointer drops


the expression into the placeholder and
recovers its original form.

Tip You can drag and drop expressions, or even entire math regions, into placeholders in other
expressions or into any blank space. Don’t let go of the mouse button before you’ve dragged the
expression to wherever you want to drop it. If you’re trying to drop the expression into a
placeholder, be sure to position the pointer carefully over the placeholder.

Deleting Parts of an Expression


You can delete part of an expression by using either the [Delete] key or the [BkSp]
key. If you use this method, whatever you delete is not placed on the Clipboard. This
is useful when you intend to replace whatever you delete with whatever is currently on
the Clipboard.
To delete part of an expression without placing it on the Clipboard:
1. Drag-select the part of the expression (in this case, the
numerator) so that it is highlighted in reverse video.

2. Press [Delete] or [BkSp]. This removes the numerator and


leaves behind a placeholder.

Note If you select an expression with the editing lines instead of drag-selecting as shown above, you
must press [Bksp] or [Delete] twice to remove it. In this case, [Bksp] removes the expression
to the left of the editing lines, and [Delete] removes to the right.
Math Styles
By making changes to text styles rather than to individual text elements, you can make
uniform changes across your files. (See Chapter 6, “Working with Text”.) You can get
this same kind of leverage by using math styles to assign particular fonts, font sizes,
font styles and affects, and colors to your math expressions.
Mathcad has predefined math styles that govern the default appearance of all the math
in your worksheet, but you can define and apply additional styles.
Mathcad’s predefined math styles are:
• Variables: all variables, letters, and operators in math regions.
• Constants: all numbers in math regions.
Whenever you type a variable name, Mathcad:
• Assigns to it a math style named “Variables.”
• Displays the variable name using the characteristics associated with the style named
“Variables.”
Similarly, when you type a number or when a result is calculated, Mathcad:
• Assigns to it a math style named “Constants.”
• Displays the number using the characteristics associated with the style named
“Constants.”
Editing Math Styles
To change Mathcad’s default style for all variables and plots:
1. Click on a variable name in your worksheet.
2. Choose Equation from the Format menu.
The style name “Variables” is selected.
3. Click “Modify” to change the font associated
with the “Variables” style. You’ll see a dialog
box for changing fonts.
4. Make any changes using the dialog box.
Mathcad changes the font of all variables in
the worksheet.
If you change the Variables style, you may also
want to change the style used for numbers so that the two go together.
1. Click on a number.
2. Choose Equation from the Format menu to see the Equation Format dialog box.
The style name “Constants” is now selected.
3. Follow the procedure given above for modifying the Variables style.
You can also use the Formatting toolbar to change the font, font size, or font style
associated with a math style. For example, click on a variable, then click on the
appropriate Formatting toolbar button to make variables bold, italic, or underlined or
to specify the font or point size in the drop-down lists.

Note Mathcad’s line-and-character grid does not respond automatically to changes in the font sizes
used in text and math. Changing font characteristics, particularly font sizes, may cause regions
to overlap. You can separate these regions by choosing Separate Regions from the Format
menu.

You may wish to have your equations display in a different color than your default text
regions to avoid confusing the two. To change the default color of all equations in your
worksheet:
1. Choose Equation from the Format menu.
2. Select a color in the “Default Equation Color” drop-down list.
Applying Math Styles
The “Variables” and “Constants” styles govern the default appearance of all math in
your worksheet. These two style names cannot be changed. You may, however, create
and apply additional math styles.
To see what math style is currently assigned to a name or number, simply click on the
name or number, and look at the style window on the Formatting toolbar.
Alternatively, click the name or number and
choose Equation from the Format menu. The
math style associated with whatever you clicked
on appears in the drop-down list in the Equation
Format dialog box.
If you click on the button to the right of
“Variables” in either the Formatting toolbar or the
Equation Format dialog box, you’ll see a drop-
down list of available math styles. If you now
choose “User 1” and click “OK,” a new math style is applied to the selected element
and its appearance changes accordingly.
You can apply a variety of math styles to:
• individual variable names in an expression, or
• individual numbers in a math expression (but not in computed results, which always
display in the “Constants” style).
For example, you may want to show vectors in a bold, underlined font:
1. Choose Equation from the Format menu.
2. Click the down arrow beside the name of the current math styles to see a drop-down
list of available math styles.
3. Click on an unused math style name like “User 1” to select it. The name “User 1”
should now appear in the “New Style Name” text box. Click in this text box and
change the name to “Vectors.”
4. Click “Modify” to change this style to a bold, underlined font.
This creates a math style called “Vectors” with the desired appearance.
Now rather than individually changing the font, font size, and font style for names of
vectors, you can simply change the math style for all vectors.

Note All names, whether function names or variable names, are font sensitive. This means that x and
x refer to different variables, and f(x) and f(x) refer to different functions. In deciding whether
two variable names are the same, Mathcad actually checks math styles rather than fonts. To
avoid having distinct variables that look identical, don’t create a math style with exactly the
same font, size, and other characteristics as another math style.

Saving Math Styles


You can reuse math style information by saving a worksheet as a template. Choose
Save As from the File menu and select Mathcad Template (*.mct) as the file type in
the Save As dialog box.
To apply math style information to another worksheet, open your template from the
File menu and copy the contents of the worksheet to the template. See “Worksheets
and Templates” on page 77.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy