Anda di halaman 1dari 147

,,,;

..

.
A

'I

r~

f~'

F1 rFl

..

1, 1

..

~-~ ~ ~1--=--~----"'_-=~ =-~ . ._. ~(Y)

~~~ !

..

: 'FI tf f
1

'

l 1 lil 1 1 l

r~1

'--,

2E

,.,

fP

C'CS

.e

C/J

'+-

+--'

_----------=--=--=--=-----_-- .

r:i

.,.,..;;.
___
-

..

f~ 1

Uij

Hl fR, 111

------tll:lll:l!ll!llllll!Dml:MllG~El!-=111~--
i

: \ 1 l 1 lBl

~-

.... .::." ....... . .


.

,_,.

:~, ,:,j,;.:

,f'' 'd!'t
"

. .. ....:;;;..
...,w,'<

- --:-
.=a

H"f ft
.';~'' 4~~.~......,
. . ~~e *'*' ,,1,.t~
--..

. ...

,,

1 -)
1 ri-,
'~\,~
~T~
'.

MathSoft, lnc.
License Agreement and Limited Warranty
~ ! ~

J. J
!E=-~

.
a

:J

E; - ~

~r!1

~p
E j~
~[~

~
[i.~

[1D
--[
CA:.~_

.-r
~L

-,

!AathSoltloc. ownsbomll>sf!tOll'omondittdocwmlm1t"".!lo1111hoP'O'l'l"'ondlhodocumentat1011n
pmtf!'Cted und91 epp!rcabfe ~t !IWI. Your right to use the program tnd st'llt doa1'nem1tion are limittd ta tt.
terms snd cood\tiool clf'ttnb!d htrtin.
1. Umlted l'f""'Hcl.cMi Uclf!H
'!tu Mww hdust the ern:loil!d progrtm on 11insJl1 comvJtlf; lblphystcaOy trnler tht O'QO''"' trorn Ol"ll
rompute110 eno11'\11 pcovlded fhtl ttll piwem '' ustd0ir1onlyont tomPJt9f t t 111rne. Jr'ld tNt YolJ remow W"Y
copies ol the pr09r1:m hom lht computtr lrom~1th fhe provam is briing transftrred: lclmste copies of hl
ptoqt "m sotetY fQI' backup pufllQses. 'to!J must mproduct and inctwe the C:OptJigtlt nohct on a labt( on ll'IT
bt::h:p copy.

'tbu M11y Not: 1.. Jdistribvte copies of the progrtm or the doalmentltian to othert: (b) rent. ltast r$ gr1nt
subhcenses or other rights to the prtl!Jftm; lcl pnMdt ust af the progttm in 1 computet Slt"fia buliness,
nttwoik:, 1i~sl"ltri rtg. tnu11ip~ CPU or mu!tiplt vss lll~mentwittiout lhe priol'written CDnMnt of Ml1hSoft;
(di 1ninsl.ate or oth!Mit.t lltef tht program Of rtllted doainontation without tht prior Wt'intn consent of
MaihSoh.
2.TmM
Vour lk.ns1 to use tht l)rolJftm end document1tion wlrl tutoffttllctlly ttfmiN11 if you ftif to comc:>fy with
tht 1erm1 of thl1 Agr11amen1. ll rhtl licenlt 11 tnmintted 'JW IQftlll to destmy 111 CllPft1 of tM Qt'OQl'lm ~
dot-..imtntll1un.
l.lflwltt~W.......,

M11hSol1w1n111111ot11toriginell~tll01thodo1~1lonwlllehlhof'IOl1t"lhl1Cl)l<jod.viKbolrtolrom

delem in mttorlolt ond m><tm111sflip""""' """''""''"a ieriodof nine1y1S01 drrs lrom lhl dall of fMthm

n,,,,,..o!

.. llV>denctd by 1 cov1f l'JIJ! ""'iJt.


lhtdiil hOJ ...'"'"'lctidtnt.-orm""""aoonof
tht p1odutt, 1""" M1thSofl stlll hM no mpon1ib11ity rl'pfoct uie disl:(sJ ~ ~ limittd W41fTtnty.

'

lhi1lirniltdW1<T""fendriglltclrtpl-~lol~of.ond...,hortbrMiw.""""'"'-WWtl!11ltl.
both e1prn11 .tnd rmplied. incMting bvt nct llmfftd to 'fV1trlntin ot tnlf'etiaitlbthty tnd fitneu fOf 1 PtlOll
pvrpo". The liabilily of M1thSch puttuent to rtiia limfted wan-~y th&'H tN litnited to lht ~&<'llT'lel'lt of tht
defect1w distbl. and 1n no ewnt s.lottll MamSoft bl lioblt tor k'lc~1l or conseqt;tntllt ~. inthJdiriQ but

not hm1tsd 101011 of use. louo1 profi11. lonof dar' dct& 1.1~ rtndemd in&ttUrltt. orkrssn1111ttintdbty
rturdp1tl1incwnifM11hSoflhnbtfnt6.'t1tdofthtp:n.1 1tMlityaf1!.:d'I~ fhftwerrtntygtwtt~

lr.hc l1!9tl righlS wtuch may "'1'Y fmm sttle to 11111. Some t1atn do not tfhM lM ltmitatlOft ot exdusim d
litbllity fo~ CDn!tlQVCf"t11l ~.so rM flbovt llmtationma., not~y tu you.

t U!>4,. l'clfey
In ord" IO be lble lo ubtain llf'datn e! lho f>!0'11'11. 1<>1 must comp!Oll llld rwtum l!>I ..-d Mt!KAO
P\lrchuer R~111r11100 C.d to M11t15'JH.
fh11lrtenM1/\gtttntent1httlbeO!)Ylfntdbv"'4 l....,,of tt'l~atmof M~ltldlhlll Nito
tht bttf'l4!ht ol M11hSoft. rtt 1ucte:JOtS, ld."mn1strlfor&, IWirt lnd n19'1.

Carefully
Read the
MathSoft
Licensing
Agreement
f
Befo re
Opening! tf
/~

Proprietary Notil%
\lhSafi. !ne. owns balh lhis software program and iJ.s
locumen1.ation. BOlh the program and docwncn1.ation are
;opyrihltd wilh all rig.bts rcser;ed by MalhSoft.. You may:
Use Lile encloscd program oo a !ingle comput.er.
Physically trarufct the program Crom onc comput.er IO
U>othct, providcd thal the program is uscd on anly onc
oompUlct ata time, and thal you l'W>OYC any copies of thc
program from the compulCC from which Lile pragram is
being transfcrrcd.

Mal:c copies ol thc program solcl y ror badup purposcs.

Youmaynot:

Dislribut.e coyics ol the program or docwnenLaon IO Olhtrs.

Reni. loase, or rant sublcense$ ot othcr rihts IO thc


program.

Providc ,,.. "' 'ie program in a comput.er aavice business,


oowork, timc-sllarin, multiple O'U, or multiple uscr
arnn~t witbout the prior wrillell c:onscnt ar MathSoft,

Hardware
PC's Limit.ed 286 11 Computer, Micro.soft Mous.:, Apple
LaserWriter Plus Print.er, HP LaserJet series ll Printct
Software

Xerox Ventura Publishcr, FinalWord ll, Loius Metro,


Symscft Ho<Shot, M~ lhSoft ~thCAD 2.0
l1dtrn&l't;

OwMr

AJple, i.JlffWrlllr

Applo Compute<, lnc.

ATIT,AT&T Personal
Ca~ullr 6300

Amo<ic.Jl Ti<lp/l<>'IG-llfld-..,.,T'"'~-aill
-----

COMPAQ

Compaq Coo1pvtor Corpo1a00<1.

Epaon

Epsoo knotica. lnc.

Alili Word 1

llar\< ol iht Uniooln, lnc.

HocculH Graplllea

~lotwlot

evm:.,11r Toc1vloio9Y.

C.Vd

lnc.

This manual was produced wiUl the aid ar the follawing


hardware and soflware:

Translat.e or Olbcrwisc alter the program or relal.cd


documcnw.ion witroul the prior ~ conscnt ol
~thSafL

S11 th1 ~""'


Umiud Warra"'J o //u
diJJutu pocu1 fOI' co ..pku r{onna.tWrc.

Af'f'"''"' '"'"

Copydghl Noti1%

Htwton-Paclwd, HP

HowlattPaci<ard Cctp.

uaorJo~ l.t1er.J.t

Plu1, u11rJot llri11.


1811, ISll PC, 1811
PCIXT, 1811 PCIAT,
IBll PS/2, IBll EGA,
PC-OOS, Proprinllr,
IBll Personal Ectllor

lruirnationll &snasa l.ladiinft, lnc.

lnlol, Abo" Board

lnlll Corporalioo

Ooc K.endall Square


Cambridge, MA 02139

Lotu1 1 U.tro 1
1.Dtulilnlll/Wcto1eft

Locus O.mipmilll Corporalion

All nhll rcsuvcd.

U.lhSoft, IAillhCAO
llS-OOS, l.llctoSofl

Ma:hSolt, lne.

PC' Umlttd, m"

pe, Lim~od

llot1hot

Symol!

Co{lyrigllt Q 1987 by Maihsoft, inc_

First prinling: OclOber, 198 7.


N:wwkd1tmeau: Art on page 19 acerptedfrom
docwnelll by Tloolnas F. Coll1Va, Univ. o{l/lfoois. Fig1Ve 9,
page UJ. ba.std011 tq111UDllJfromJolui G. Tru.:ul ofSUNY
Swn ybrook.
'

Micrnol. lnc.

Ventura l'ublllh

Vtn!ura Sohwwo. lnc.

Xwo1

X"""1COIJX"alio<I

<..;:

11

~ -

ntents

!]

1 ~l Ti
l ~ .: ~';f :d

IBJ

I~ ~ -!]

rm
ru

1 ~ !]

What is MalhCAD7 ...... 1


MaUlCAD fcaturcs . .. 2 I
How IO use this Uscr's Guidc , , , , , . J

GEITING STARTED
Chapltr O &ttin& up MatbCAD

ror Y our S:r-tm

7
Sysir.m rcquircmenlS ........ &
How to atan Ma!.hCAD .. , . . . . . . . . . . . . <;
Configuring MalhCAD far yoor print.er . 11

Cbapl<r l Thr B"'ic - L


First rinciplcs . , . . . . . . , .. , 1

About this chaptcr , , , , H


Thc structw-e af MalhCAD . , . , . . . . , , . , 15
Dclinitioos and variables l'.
Entering ~ .. , . , .. , .. , . . . l!
Regions ... l\

haative calculat.ioo.s ,
Ptau . . . . . . . . . . . . . . . . . , .. , . . . .
Camman<IJ .. .. ..
Ollict fcaturcs , , , ,

2f
2'
2_
2'

EDITING AND DOCUMENT FEATURES


Chapter l Editinc Equ.tiona 3l

Essenlial terms . . . . . . . . . . . . 3;
Editing equatioru , . , , , . 3:
Editing namcs and nurnbca . . . . ).1
Adding an opcrator . . . . . . . . . . . , . . }I
Deleting Opcrators , , , , , , , , , , J'
Pilrcn~~ .... . . . . . . 4(
Carnmands IO cut and past.e cxp<cssions . , , , 4 !
What to rcad ne:u . , . . . . , . . . 4'.1

- --..,

_ .._"--'

._,,,,,... .,st

it""''

~.Wii

._, ,. ~., <' ~-~.~~\' .-~ ~:

"''.- :: ,!

.,, ,+ '%.;,,.,.... ._. "''

'",.,

, '!." . l . :b'e

':
..

. (.

, .. ;,;;.......

:t.:.: :~_j
Table or Cnntcnu

fl. _--nr
_
.,,..

r 3 Edllinc Documenll , , ,
rsorkcys ..... , . , , . ,
mmanru "' movc lhc c:uncr ' ' '
py, cu~ and paste .
lcing SJ>1CC

47
48
49

SO
S2
in:h and repisa: , SS
: C<xnntaJltb . . . , . ~7

ndows ... S9
r 4 Tal , , '1

62
6S
\l motion cornmanru ..... 67
<I editing commands ... 68

l regions .....
11 bnnd! ....

r S Ooanntnt fonaallinl 1bd l'rlntln1 71


w lO prin1 1 documcnt . 72

"gins ...... 1S
1ch!Olb .. 7S
HICO

:apc ""'lUCllCeS

, , , ,

78

:r 6 Connnration, DOS, 1nd Mtmory , ,


lS acce.u . . . . . .
J<litoring availablc mcmory . , ,
1thCAD command fi.lcs
>ere MathCAD look.s Cor syst.cm files .

Al
82
84
SS
87

PlITATIONAL FEATURES
ir 7 Equatlons ud Computalioa 91
pes o cquatioos . . 92
octionJ . . . . . . . . . . . . . . . . . . . . . . . . 93

oces.<ing equations in automatic mode , 95


ocessing cquations in nunual modc 99
s.ibling equatioos ..... 101
ron

. . . . . 102

rr 11 Names, Numbas, ud lmaclnarle9 , 105


unes 106
edcfincd variables .. .. . 108
mben . . . , , ,109
ormauing displa ycd l"C$1JlJ .11 O
lCllplcxnumbcn and calculations . . , .112

Chapltr 9 Unll and Dlmtnslo"-' , , , , , .113


Defining units . , , . , , . 114
Compung wilh units .... , . 11 s
Displayingunitsofresults . , , , .116
Changing dimension nam~ , , 118
Chapltr 10 Vtctors 1nd Matrlett , , .119
Creating a vector or matrix ...... , . 120
Compung wilh vccton and matri= , , .. 123
Subscripts ........ 123
LimiLHJO &m1ysl~s ... 126
Array opcrators 1nd unctions , .127
Doing calcullltions in parnllcl , .IJI
Simultaneous definions , , . , .133
Arrnysnnd u!ltt functioos . , , 134
Chapt<r 11 Rangt Variables, llttatlon, 1nd Tables 135
Rnngc variables ........ 136
Outpultabl~ .... IJ8
lnp111 tahle. ............ 139
henive calculaons ... 140
SC<ldcd itcration ........ 142
Vector l\OUltion versus subsaipl nowioo 14S

~~
!~

J_

.J ~

- _

1e:

1~~1r.: :.
l !: .

Cbaptrr IS Dala Fll.s , , , 187


Data files nnd filc-access.Cunclions 188
Rcading nnd writing unstrUCtured files 190
Rca<ling and writing suucturcd (PRN) filc3 ... 192
Advantage. o using READPRN and WRITEPRN 19S
Rcading and writing complex data . 195

- m(~ i ~

l i

Chaplr 14 SolvlnR F,quatlons l , , 171


11lc root runction .. 1n
Solvc blocks .... 174
How solvc blocb treat equations 178
Outcom~ o[ solve blocb , , 179
Using the solver cITcctively , , 1S4

=
lit.:

l
r.:-11r1
1:

Tablo of Cont.mts

: 11 iiJ

Chapt<r 12 Opttalors , , , , 147


l..ist oC opcrators ... 148
Sums and producu ovcr a rangc . 149
Derivativcs .. , , , 15-0
lntcgrab .... , . , . , .151

[e : !!3

Clupttr 13 Built-ln FunctlO"-' , , 155


Listobuilt-infunctions , 156
Suuisticalunctions . 1S9
lntcrpolation funclOl13 ,161
Fast Fourier transform~ .164
Random number.l 166
1e unl function ....... 167
Condionals . . . .168
B=I unctioos . . . . . . . .169

m
l f:Elll tj

~J~

a
i~ -- a
LB!a

tE:.! :Q

,.--1 L1
1:-1 ~j

Commands .... 228

Kcy referencc .. 23S


Valid cquaon forms 237
Opc:awn .... 238
Built-in Cunctlons , . 239
Predcfincd variables . . ........ 242
Special charnctcrs . . . . . . . . . . . . . . . . 243
Suffes Cor numbcrs ....... 243
Cornmand-line options ... 244
Appcndlx 8 Error Mt958cet , l.45
Ust oC error mcssages ..... 246

PLOTTING FEATURES

Ap~ndlx C SIArlup Optlons

Chapttr 16 Plots , 19'


Creating plot .... , .... 200
What to plot . . . . . '. . 201
A1 limi" nnd nuUJtCallng , . , 205
Formntling ploU ... . 206

Appcndlx D Prlntn- Drhen , , . 15'


Printct driv~ and printin , .... U-JJ

( .. m --TT=1

C:-n-

REFERENCE
Ap~ndlx A MathCAD Rd'tttnct , , . 117

MATHCAD EXAMPLES
Chapttr 17 MathCAD Exampks , , , 213
Auid Oow . 214
Automobile braking . 216
Cornplex cootour intcgnl , , 217
Home mortgagc .... 218
Bode plot . 220
Polynomial curvt>-fiuing 222

:m

Contenu or your MamcAD dUk.cltcs . . . . . . . 254


Options on swting MaU>CAD ....... ns
Hard disk shor1cuts .... n1

Components o printer drivtn . . . . . . . 261


Ploncr drivers . . . . 266
Adding a printer drivtt . , ... 2fi1

1"
... 270

Ap~ndlx E Numtrical Mtlbods


A nolC aboul numcrial methods

~~
~

ZcroasaactororanurnCD!Dr ..... 271


lntcgnlS , , , , . , , , , , . 27\
Dcrivativcs ..

The root unctlon

.. m

Solvc hlocks , . _. ... 273

M.atrix openttions , , 274

INDEX

1
1

ti
!

1,
.1

------------ -

- ' - 111 . . . . . . . . . . . . . . . . .

:mmrll!WWW~; -o! .. ,~~ '+

. .

\;;.:. .....

1,

;,. .. ,.

'~ ~ i. ~ ~

..

- - ............. _

--- -----

~-

------=-=--

---

,,, ..,... _ _ .....

"" " ~ .. m!"!'!IH4Mdmii.t'1\ii'

;.;.~.'. .;' '"'"' ..;"....4 . ..,.......:.~ .. :. , :< . . ) ::::x'."~o:~:-:1 -.-.,~.-:..-...;~~. ~--~ :.. _--~ ,~ - --: --~---r"
J ..-:S ~-~""*" ''b;#;;;,i;a!';L:O'iMflei"?)!itlw< !e&'IHAf'H>t!i"
'4

--.;_---------------------------====:::::~T~~-~
,,,j
&blcofCorucnta

F"

\,Ei,fW:nsduhi' w

~-Bfl

Prcf.ce

~ DI!-~

mYmi1'll~lmlltB

The MllthCAD [X'Ogram is a unique ncw way to deal with


formula.1, numbcrs, u:xt, and plots. MathCAD is as versatile as
tlle most powerful computational tools and programming
lnn8uug"' yet 11> easy ID use as a u:x1 <:ditor.

rt~rJ ~J

~ ~

~-

.e.::1
:E--~

11

Ma~1CAD lets you lype equations as you're used to secing lhetn,


cxpanded fully on your screen. Befare MalhCAD, equations oo
compuu:n lookr.d Ji.ke lhis:

x (-B +

:E?'..)
.:E i~

SQRT(B~2

-h

aooc""'""'

The fcnnulas you ent<:r in MamCAD become pan of


lliat you can save fa future use. You can add te.i and graphs
and reamlllge llJG equations in lhe documen~ crcating a
compleu: description of !he calculations you make. Tiien print

out the documeni for an accurat<: n:cord of your work. Tiie


figure below shows a typical MathCAD sc111 combinin toa.
mathemJltics, and graphics.

JOlvc yow nwncriaal pruhlcms aml co11u11urncntc your n:sulu.

lliillil!I!ll2/:l'i&~!'ltt&m&~:.i.i:tf"i'i<?ifarm~Wff;f'
llnhuMOnlc Oaclll&tioM:

l",J<!li

Ovar """"

or " >ol nta ...

... apannlnv tho ranae

~~

:. u

~-=~~~

"g

11

:e
~ -- "!l

Me

COMpute

tho

u-

;: l . "

" ;: 19Q

r...,..

-e to " whe,.. " := J. l

" :.... rz.-1 -1]


t " 1

at wlllch thoao polntc are r ..chod "v

:. t

... -- -.!I

--

1-1

Jlcot 1] - coa( a) 1

"l

~--J.

_--1il. .

"

"

"'w"*'

OQ#WO
.

>
. .

~1~
4

&11

oscl 1 letor

hauln a coslno polctntlal anorvv, and plot H"'lr traJectorv.

_:m

....

!lit CP$..4ZAU

But MalhCAD is much more !han justa way 10 look ai


equations. Computing wilh formulas in Ma!hCAD is as easy a.s
writing them down. By ddining variableJ and computing
rcsults, you can use MathCAD ID sol ve your numerical
problcms. MathCAD combill<S lhe ekgance of ma!hcmatics
wilh the computalional powcr of yow PC.

2a

,r;;.m
e::------!)
1

i..:._j

This User' s Cuide is your key IO ll1e computationul xiwer o(


Mn~1CAD. Rcad on for infonnation oo how ID use Matl1CAD 10

Jhz - -4c

, D3]

fl "

X ;:

:~ ~-:-j

~.

- 4AC))/(2*A)

In Mall1CAD, the same cqwuion looks lile way you might soe it
oo a blackbo:lnl or in a rcfercnce book:

&,,..;,;.,"

'

___

......

' , ',

-~--_,,,_

thCADte-.itures ,, , ;: / ,: , .~:f$)'.i..:};(it~
: is a short li>t oC MalhCAD fea.tURS:

1rface features
Froo-form, ICta!Chpad-<ypc interillCC
MiJt l.Clt, mathematics, and nptu anywhcte on sacen

wy cntry of integral.J. raplu, and more complicatcd


consuucu: jUSI "fl in tllc blanb"
Emir chcing: tmll' mcuau flag individual equalionJ

Cut and paste Cor oquarions and t.exl


Split-sawi cditing: edil two fllea 11 once
Command available c. luyt, by name, aron pull-<lown

mema
Mc..nu<lriven onlino hcJp

>rnpulnliunal rcaluru

VeclOrs and matrices, including opcrations for malTi~


multiplication, malri;c invcne, tnnsx:&, clc=inam, dot
and cross product

Up to 8000 elemcnts pcr vector or mauix

One keystrol<e to encnie a plot, then fil! in the blanb


Unlimitod numbct of plots in each document

Set plOI size up to 127 linu by 127 colwniu

Ptol fmnats include grid lincs, logarithmic ucs, 13


diffw:m line and symbol options

Ooc ar more traCCS pcr plot

Text and documcnt features

UnlimiLCd docwnent size

Global nuugin scttings


AuumUic word

WTlljl

Prccimn: 1S decimal ligil.1 of accu.-..:y for compotod

Ploce te.xi anywhcrc in thc <l<x:umcnl

retullJ

Tcx1 blanda Coc l.JuKo amowus o leal

Units oC measuranau and dimcnsioo chock.ing


Built-in solver for &imulw>cous equalions and inequalit.ics
Complel numben and variablu

Dclivatives and integnils

Summatioru, products, and itcratioo


Ottal, decimal, and hc:ndccimal numben

Trigooometric, hypcrllolc, oponcnlial functiom


Swiscal funcons including li/\Clf n:gression, pmm.a
function, erC. cumulative oormal disttibution
Cubic spline cllf\'e-ftin

Fa.u Fouritt transform and invcrse transfonn


USC1-<lefmable functions

Pagc brean shown on scrwi


Print ali ti' pan of document
SuppaU wide range of ouljlut devices, including dol-mauix
nt.pllics printcrs, laser prinu:.rs, and plotu:.rs

Grr.cl.leuen

Rcads and write& ASCII data file.1, including PRN format


(colwnns oC numbcrs)

Input and output tableJ


Suppo<U Lolus/lntel/Microsoft Expan&d Memory

Spocificatioo

Exec fes and configwation file

Pn:CllCO

-r~
-- lli-3

_I _
- e..
n

.1~

--r:
Jl!l -17--r

~ --11

9 --

.iii

e::

l.,:

e
e::

'!!

~ .. :..!!!

e:
e'_

Mm. cut. copy, and pasie pieces oC iext

Other calures

-1

Plotting features

- 1
~i~:,;:;

,
:
:
4Witll.lhu~;'.rlM4\;,~;t;.m:AA,&.k\:e-f:f'eii'4}W.4i'

;fu&6%iaI'd
-. -:3

!!! - .. . . ,

Pn:CICe

. .....

11-

111

e;..-=

~J-=
1e ~-11....lll

~-

~!"
L

This Uur' s Guitk is divided inlO six paru:

li

To use this manual, stJlrt by reading the section called Gt 11illg


S1arttd, which shows how IO set up Matl1CAD on your computa
and introduces ali tlie importan! conccp13. 111cn sek:ct !he topics
that interest you in !he rest ol the manual.

11
1

Getllng Started

This scclion contains infonnation on how lO set up


MatliCAD on your sysiem, and a quick introduction to
MathCAD's features.
Editine and Documul Featuru
This scction describes how to edil equations and docwnaits
and lcads you tlirough 11'.e basic fcatures of tllc MathCAD
documcn1-s1yle interface. 1llis section covers editing
equali1Hu nmJ tcxl; loadiug, s11vi11g, ami priming Ma1hCAD
documcnts; and conligwing MlllhCAD for your computa.
Computallonal Fe turts

111is scction describes how MathCAD intellJn:lS equn1ions


wHI explains Matl1CAD's compu!Jltional fcatum: units oC
mr:a..'l:rncment, complex numbe.rs. ma1rices. bui l1-in
fun c.:tioru, 11mt1011-scMving, wu.J 10011.

To wukrslaNi how Ma1hCAD <ka wilh t qUaliol\J, rwd

1!

Chap1u 2 , "Edjing Equa1iol\J, and Chap1u 7,

"Equalio!U aN1 Compuiarion."

As far as possible, lhe topics in this manual are dcscribc<l


indepcncntly oCeach othei-. This mcans that ona you llJ'C
familiar with !he basic workings of the program, yoo can jusi
sclc.ct a lOpic o( int.ercst and re.ad about iL TI1c.rc i.s an c_uens.ivc
indcx to hclp you fin<l thc inomuuion you scc.k.

il
1

11
\1

]'Ju: manual comaitu txamp fu of how to UJt al/ o{


Ma1hCA.D ' s f caturts <ll\d ducnba tk rnost common
ttchniques and pil[a/ls. lf you wnn/ h<lp O so rruthin g no<
<kscribtd in IM manual, cal/ M athSofi' s 101/-fra TtcWcal
S up1nrt Une al 18f.OMATilC:AO. (In Mas.rnchu.rcru. cal/

6 11HT-IOl1.}

Mot1i11~

Fcalurc
111is scction describes how lo cn:att: an fonnat Matl1CAD
pkHJ.

MathCAD Exomplu
1llis scction contains prinloUIS of sorne samplc MatllCA!)
documents. Read this scction Cor ideas on how lo use
MatllCAD.

i
i
1

Refercnce

111is scclion conwins appcndices, including a n:fcrence lis!


of ali of MathCAD's commands, keys, buih-in functiOOJ,
ami :o() on.qll1is scclion also conlains nppwdtco on

MuthCAD 's numa-iail aJgorilhms w1J 1rinlcr drivers .

1
11

g:_a._u
~;_:
~

1 ?l&!i$iPJi~B"f..:;~.:
.'.9.: :; qps. '.t .. 4
"--~"-""""'~-....A'.ll:l!irft.'I~
~--- . . ~L.'1.,, i.W~t~r:~J::f@
, ..: ..... ...., ... .~1:&7.fl#~HVf1m?.:'ii!P'l!'(~Mt4t{PFt
..... . ..... . . .. . , ,_ .. ,. , , . .... 4.tH_
. ,<
.....

"' ;: .n ?P.

;;

:. u

* : '''

.J
--

'

< '

..

...
_ ,,__
;.,_,
-

_.;,,,_,~'.6_1'. H . _*' ~_
. :;~/_,,s=
+p' =
;, =~ =
~: ~ ~__j
-.: :~ '' ~

_...

"

...

;_
... ,,_
: ..

._
..

rr.r"'.

~-~~ll't
fr .f':;\ -=- ~
1

.: ~', ;~~. ~.:

. ,,::'.:

Getting Started

. :
t ~ .~

r1 il -~
1

IJI
3
~r
lli- :72

I~

1-

~ t:

f.,;: ;
1 :: r;1.,.,
0

'1111'*:0l:~S::";:"F

.)~!El:' . ,

- - r mr~
l'-.i-3

[!

1
11
1--

!!l

11
! _- .:.!!)
11

~ous:

Dos
llcdrlU [ARJ
Pri nt 01
Sclcct pri ntcr

.l ' C

xl : Z

. 11

!,

h -J11 -4ac
xZ := - - - - - -

xZ = 1

a xZ hx2 e = 0

Za

li ti -~
~ ~L 1ma _'.:ij

di ser! M

=h 4

discriM

=1

!]

11

!~ T - !]

-~
~--~-~

-- JJ -

>: . i
~,~.;:::\,!
~

b x1 e = 0

a x1

Za

l!

lJ.l!,~

t,~.

Execu le

I'-
_l B

r>-..
~. .
.:,.;.

{;i
. '.~ ..1

Check , .. shoul d be zero

Config s av e

(~ i=
~ !~

e := Z

b : = 3

a := 1

McMory

::::l!lC:::'u:.1.dJC:'!ITIIi!ZJ..:i !.1 \;. Ut

,IC [QlllT ION

[ 11

,; ,.
J ~ii,? :~.

" ""'

: ~

~--------- ~---

Mlc~~;~-t~~~.
~'1\)'fff*''?'
ftM'tt 'NCl'S'!'

a+ r ~ -o=+ !r

--

--

-~---

---------

:;

--

---

-------

---

---

- -------- - -----

--

.M~~~JiH~!\!iim~

--

111- . . .l"I

Setting up MathCAD
for Your System

1
Thls chapter describes how ID ICt up MathCAD for your
compute.- symm. Thi$ includes imialling MalhCAD on your
han! disk (if you havc one), coriguring MathCAD for your
computer's display, and sclecting a printer type.

Thi$ chapter coniains lhc following 9CC!lons:

:u

Systtm requlrmstnll
Hanlwa:e rnd software mquiremenls for MachCAD
llow to 11.art MatbCAD
lnslalling and running MathCAD

Connprln1 MathCAD ro.- yoar prfnltt


Scttlng up MalhCAD to run with yotD' prinier or plotta

'
'

-~

-~

--- - ~

.. . - - . .. ---.,.- . .. .. . . .. -~' .: '~


.

---....- ----- -~---

stem requittmenl!

. .,

1,:,~

,, -' ;;;

1thCAD rcquircs lhc Collowin hardwlrC and software:


m pultr

IBM PC, PQXT, P<:/AT, or compatible, indwling PS/l


Krica
1eratlo Systan
MSOOS or PC-OOS vu1ioo 2.I or 3.x
raphla Adapur
Adapu:r and monilor comptliblo with one of lhc followin:

----- -

---- ---

- - --- -

------

--------

Sec the Rtltase Nous included with this package for more
dew.ilod informatioo

.,.,

----- --------

- - --- -

- - -- ------

~ ~l' tlii"'rt"Matli,C~.D11t~~~~;,ii:.J.~7;~-;:i~ ,~ff

!f
I~

:i!I

MalhCAD C-Omes oo 1wo disl<s. 'le Syst<.m Disk c0<1l<lins lhc


MalhCAD program (MCAD.EXE) and W.fonifilu th4I
MalhCAD uses when i1 displays lelu:rs and numbers. Tiie
AuiliarJ Disk coniains l11e MathCAD Help lile, samplc
Mall1CAD docwnenu, an oll1cr useful files.
Dcforc you SUlfl using MalhCAD, mal<e a baclrup copy of eoch
disk.ell<:. Pul the original diskcucs in a >11fc pl<:C. Follow tlie
instructions bclow, using thc backup copies you ha ve made.

Rcplace the Symm Disk in drive A with the Auxiliary


Disk. Then copy all fes from lhc Au1ihary Dlsl: to L1v:
MCAO dircctory on lhc hard disk;
COli'lC

.l.;*.* l-'I

You have now copiocl ali MathCAD fes IO lhc MCAD direclOf)'
oo your hard disk.
For i11Jtruclio11J on how IO iru1a/I Ma1hCAD ,,a dtciory

'"''titan'"' MCAD dfrtCIOry, Ste AppcndU c . "S1arrup


Optiol\J."

IBM Colar/Gntphica Adapca; color or cornposi1.e


mooitar

lf you wanl to run MathCAD from a han! disk, copy lhc filC3 to
the hard disk as describal bclow undcr "lnSlalling MalhCAD oo
hard disk".

IBM Enhanced Gnpllic Adapt.er; any moni1ar


H=ulcs Gnipics Ca.ni; mooochrome moni1ar

lf you wu111 lO run MathCAD from floppy dis.i<s, skip lO the


sccon on "Chru1ging to lhc corrcct dis.lr. and dircctory."

Toshiba D 100

BcCorc you run MiuhCAD. you must cllAllgc IO !he disk and
directory containing lhc MalhCAD progr-.im and itisocia!cd files .
Follow the appropriate ins1rnc oru bclow lO run MalhCAD !rom
a floppy disk ar a han! ilisk.

AT& T 6300 acries (monocbrome or color)

Installing MathCAD on a hard disk

Floppy disk

~tmory

Sl2K RAM; also aupporu Loois/lnlel/Mic1 Expanded


Memory Spccificalion.

MathCAD is not copy prou:cted. To insta!! it on your han! disk,


just copy all lhe files to the MCAD dire<:tory on your hard disk, u
foUows:

>Ukdrlv~

Roquirea one S 1}4" or 3 1/2" disk drive; Wo suppccu hard


disks
Malb coprocnsor
NO! rcquiwl; lnld 8087, 80287, or 80387 supporlr.d and

nx:onunen<kd

C: (.JI
(lf your han! di.sic iJ identified by a lcucr othes tllall e,
substute your drive leuer for e in these insuuctions.)

To make an MCAD dire<:tory on your hard disk, typc:


NO

Prlolttt and plotkn


Supporu a wido fllle o{ printen and ploaen, includin lhc

To make drive C lhe dcfault drivc, type C: and pres.! lhe


Emukey:

following:

\MC.l.D (.JI

Epson graphics prinu:n


Hewlca-J>.cbnl LascrJec. LuuJet P!u.s. or LaaerJet

CO!.'l' .l.:*.* [.JJ

Hewlca-Pacbnl plouus

(.JI

CD

\lC.l.D [.Jj

Once yoo haYC sel:tal llic conocl d isk and dircctory, you ~n
run MalhCAD. Al lhc DOS promp<. iypc:

e:

Starlng MathCAD

ln.scrt thc S ysu:m Disk in drive A. Tiien copy ali files from
lhc Syslcm Disk lO lhc MCAD dircctory on the han! disk:

sencsll

.l.: [.JJ

Hard disk u.sen


Makc surc you have installed MathCAD in lhc MCAO
dircctory, as dcscrihed above. Thcn, 111 lhe DOS promx.
type icsc two commaR<ls:

CD \MC.l.D [.JJ

IBM Graphics Printer ar Proprinta

USUI

Inserta copy o( lhe MathCAD Sysu:m Disk in diivc A.


Then make A lhe d<:fault drive by typing J.: at lhe OOS
promp! and pressing the Enu:r l:ey:

Change lO the MCAO directory:

Changing lo lhe corree! disk and direclory

!CAD [.JI

lf MathCAD CJ1t1 run on your syslWl, you should sce lhe surwp
ICfCen and lhe MalhSolt logo (FiW'C 1).

. uci M"*"

'ffb'41 AA r o4 4FPf

~~~~~

.. " !

'..'. ..

-~ .~:::;:~
- :,

.. . " .

._

~-.:.'.:~ . .~L~ZJ
:'.:

D-0

Running MathCAD
Once you llave started Ma1hCAD, you can cntcr cquaoos, load
nlc, nn<I pcrform nny othu Mn1l1CAD opcrntion. To quit
Matl1CAD al any time nnd rctum IODOS, rype:
(Ese] quit (..J]

Whcn you <lnrt MarhCAD, lhc pmgrnm is rompicrtiy loabd


lnlo mcmory (RAM). 11 you run MarhCAD fmrn floppy di.<l:..
you necd not kccp thc disk in lhc disk drivc. You may wan1 IO
rcplacc the disk in drive A with a data disk lo hold yoor
MathCAD documenl!.

. ..

1.,'

-- t. c-1.w ,., -.i.aJt

'

..

...._,, ,. ..... ,.

(rll is die hcip kcy in MathCAD. Ir you are nmning Mad1CAD


fmm hnnl di<k, pre'" (Fll 10 v.c """ Mn1hCAD's on-linc hclp.
U you are rluming lrom noppy dhks, you nuut havc thc
Auxiliary Disk (or anothcr disk with lhc help file on it) available
In thc curren! drive whcn you press (rl l.

1tflC.AO tlar1Up WMn

tly wil<n )<JU start MaJ/rCAD, lt rccogllius )<JWs tldapttr and disp/OYJ lht scr~tn i~ rht approprlatt
s modt. MathCA.D '"1 haw so'"' dl/Jlculty
,,,~ lll'tu-comp<Jtihlt irophics card.s. lf you.r Jcrtett
or JJ..,J b/lnllnt chal1u:ta-1 whLn Y" Jldrt. yow
>t to ~cify yow grapllics card txpllcltly as
'd htrt. Flr.11 quit MaJ/tCIJJ by typing (Ctrl]Q.
ir/ M athCAD again with a "slash option," as slwwn
Jh/t:
t~

What to tpt ot DOS prompt

~Morwchr~

.!CAD

/H

lor/Graplcs

HCAD /C

iharactd Gropllics
j]()()

.!CAD /&
l::All /T
t:AD /A

fJMClvornt T~xt

MathCA.J) does rwt run

1 TJ/00

'>tndLt C. Srartup Op<lons, for mort lnformaoon.

l/you /111w 11ny rmblenu runnlnx MathC.MJ, w/I M111hSoft

Ttchnical Support 011-300-MATIICAD or611.m-1011.

.;1.11;1{ ~i.l\fo;f;.~;i-~;~1t1

/,_:rn~
rr;-, .. ~

I~ l~

(c!!=ft
r__rn
~-,..-:!!

111

~-3
~-::;

I! - -

1
~-~

fil"--...

a:: --1\

1
.1

~-~
E-..;

~ "tM""tl

Bcforc yo,. ;irinl fmm"MiuhCAD, you mus! sclcct a prinrer typc.


The 1"""in1er rype rcf MaihCAD whal kind o lnormntion 10
scnd 10 print tcxr and graphics on your printtt or plotltr.

1. - Jift

~.,:1ri1 r:-11 ,-

il2

rol

2. n t llilk.Jet mi
4. t..-J.t. , cat
l. toetr.Oe , PI ec1

U you save !he printtt rype in a configuration file, you nccd not
spcciy it cach lime you sUlrt MathCAD. Whcn you swt
MaU1CAD, ir wili nutomnticlllly rcad thc configurarion file and
use tl1e printcr rype spccificd In lhe file.

,. Oli:lbt.a~

1. C. U tt C-31!\

,,1

This scction dc.1Clibcs how to ~olee! a printtt type and how to


save it in a configuration file

Sdcctin: n printcr
To sclcct a priruer typc:

l'ir.!~ start MnthCAD. lf you ~ running MalhCAD from a


hnnl di,k, IDrt MathCAD from the MCAD dircclory on your
hnnl di,k. lf yo11 nre runniug MnihCAD fmm floppy di,k..
st.ar\ MarhCAD with a copy of the S ystcm Disk in drive A.

Nexr, choose lho sdtclprlnltr command. Type:

f\gul'9 2: Llll al

pn..n.

rtJ

U.e !he llJT'OW keys


and (.!.] l:eya to movc thc highlight
(lhc invmre-klco bar) IO 1he name of your pnnicr. TilCtl
pr= the Entcr kcy [.J) to 9CICCI lhal printcr.

MathCAD is now c:oofigurcd to -

your printt:r rype.

(J:sol . .1eot (.JI

MathCAD should show a menu o printcr typcs (Figure 2).


Find your prinicr oran equivalen! printcr oo this lisL (l you
d<m't .ce your printcr, ir may be beyond the bultom of lhc
lit. Try uinR!he down-arrow key (.!.]ro move lhc highlight

J>a."' lhe houom o( thc lisl. 1f 1hero are inorc primen on thc
list, this scrof the list IO show !hose atlditional prin1cr.1.)
MathCA.lJ sliows tht llst of prlnttrs /Ja.1td on lf'{onnatlon 111
tk fl/t MCAD.MCP on tk dlsl lf MathCA.lJ Ctul/IOI flnd that
fllc , lt canno t show tk list ofprintus.

Saving the connguratlon me


Once you'>e5CICC1Cd rtie prinlC:t type. you can saV<: lhat
lnformation in a c:oofiguntlon file. To savo lhc configuration,
lype:

(ltec) contiqan (.J]

MalhCAO pmmpu for a filcname; lhc dcfaull is MCAD.MCC. To


save the coofiguralion In this me. JllUS'.
(..J]

MalhCAD savcs thc coofiguntion file IO lhc currcnt disk and


dirocrory. Thc ncxt time you stat MathCAD, it ,.ifl rc8d this
ronfiguntion file and U9C lhc printtt typc you havc sclccltd.

.~-!~
...-1

,a;::--~

:l

11

,<;cm]ig~1!Jt~~~~G~o~rory~r prin.tr,:~ --;>::d.

~-3

Setting uv M1tl.CAD for Your System

l'-1 -

r 1 -3
tD_~

1.,;l'f~'~f;r~ ~'.t~. (~.,,

1. . . .

-.

1:

':I
:1

....
t:.~

't

p-w .. ET -- ,

"
u

--

#oii''=x~,-------t"'tib"
:i'. -in:i ;.\;J. ,k, . w'l.'1i+..\f.'::tls"i~u"r
.
'*'' .,'

---;--:-".'--1
' . . -:;::-;---:---
. i" :.:'.. : ..---- -

-:~ -

W B'ril
'*~
~

b d'Wt"'e ' H :1t


0

~'
!-r. i .il
"'1"'"
~ i :<]

'kJ,.

!! '

----~~-~-

-
- - ..............

1.cis.b
,;, ., ~"J

:1""" .

'I'hc Basics

" '

~ ~
~

a- ..,

.:.a

ii! -11 ,,,


.~

Thi1 chap<er dcs::ribcs cvaylhin you nc<id IO el suutal with


MathCAD.

~~

Tiiia d inptcr cooU1i1111hc [ollowi11K1GC1i111:


l'lnl pr incipio
Mlill1CAD' 1 de.sign ami hucrfocc

~-~

E: 1
__ ;i

Aboul lhls chapltr


Con1enu o[ Chapia 1; notatiooal convcmions

::l

Tbc 1lruclurt of Mat hCAD


Thc MamCAil scroen; documenlS l.Od reions

.1
~ lit"'
1~

Delinilions and variables


Creating simple MaLhCAD equatioru
Enterlne tul
Addin11 11()1<$ and labcls to document

~. r~iij

Rc~ions

[ -3

How cquations, iext, and plolJ mab: upa documeni

_(

lterative calcula1io11.1
Usin subscripu ID repeal an equalion for severa! valucs

!:.-Y

~~
~ ,-

PIola
Buildin a simple plOI
Command5
l low !O wo MalhCAD comnuuldl l.Od maiUJ

!__ r i

Olhtr realuru
A li.\I of Mu1hCAD' s <>lhcr foa lun:.> and whc.re to fowl 1h<1<1
in !he manWll

~[ .~
L._. i'

~l~

._-y

--...,~-

.""' ~,~<:" 7:?~::, :~~:~.{:{W

~--.~;; .~t'-'F.' .'''! , " "?

'

"" ,

"' .

'

------------' . - t

:-=1~

Ch'ltt 1

,[) loou simple, and it is. 11 was crcalCd tecording to


1i~n principie lo make it powaful, ncxible, and
""' In MathCAD:

rythln~

app.. rs In amillar nolallon. IC lherc's a


<!..'Vd mathematical way to show an equation, opention,
raph. MathCAD 11.'ICS iL
~I

you Stt Is "hal yoa &l Tilerc is no hidden


"1T"1tion; e.crything alp<Jll1 on lhe ~rccn. When you
1l it out. the oulpul lool! jusi liltc lhe ~=n display.
cr..al simple expressions, jim type lhem. MalhCAD
1 t/1r. $landard lteys Cor standard mathcmatical operations.

erra te compllattd ronstructs, jusi rJI In lht blanU.


creru.c a plol, in~!. or olher complicaied construcl,
press lhe appropriate key and lhcn fiU in thc blank!.

<:ullion reatures lrt modular. you don'I W811l to


a feature - liltc complcx numbcn, units, or IM!Iices1 c:>n jusi prctcnd il isn 1 lhcrc.
mmand art nallablt on ke,,_ b1 name, or b1 mena.
sce pull-Oowncommand menus, pres_, [rlOJ. Or,
cu!e commands by namc with lhc [J:ac) kcy. Many
nnrnncls are also availllble on Cunction kcys or control
'5 .

t numtrlcal alKorlthms are robust. standnd, and


11irtahlt. M111hCAD'1 numerical algorithms for thlngs
: imc~rnb, mauu. lnva,.1Un. and cqunon JtOlving uc lho
1t

nv,.ilnhle

~umdsud mclh<Mb.

trythlng Is documtnttd. Online help is avallahle al a


iChofthc !Fll kcy. Tiicmanual inclucltsmorcdeuiilon
the fcntwu, w1th utp-by-,.tcp i11,ttucliotu: nnd
Llnltive e.. mple.. All numerical algorilhms are
cumented. Al tl1e back o( tlic manual is a comprehen<ive
'erencc and a complete cmslrtfcrenccd indc._
tt suppor1 Is avallablt. During business hours (EA.tan
ie), call MathSofl's tolf.frce Technical Support line:
00.MATIICAD (in MassachusctlS, 6t7.J'n-tot7).

~ -1

~:: ~r

Alihut thl!fthapter -., M~1i>.-.\~~)~~~1'ikl'1~ul.1'1"<'-;1tt


This diapter provide a quick introduction to M111hCAD and
dcmorttratcs a few more advanccd Ccaturcs lil:c itcrntivc
calculation Md plouing. Afier you read lhis chapter, yo11'll havc
enough inCormation to begin to solve your own problems in
MnlhCAD. The rc.t o lhe manual dc.'!Cribes ali lhc Ccaturcs In
detail, so you can choose to lcam more about any scloclcd topic.

JI

. ..

!!!-:--1

/ta/ics rcprcscnl variable and Cunctioo narncs.

Thesti:udureofMathCAQ t.

-: ~.JI~ '0 ;...,~' '!~, '

MalhCAD b an edhor tltat dcalJ with equadons. Whcn >'" cntct


equalions, text. and plots lnro M.athCAD, you are creadng 1
d<Jcwrtt:nl - but unliko mlitmy docmncnl!, a M.alhCAD
documcnt abo calculatcs "'*1111.

Start MathCAD now, 11 you ha\'Cll 'I already. (For IMnk:llom on


how ID start Ma!hCAD, 1ee lhe prcvious chaptcr, "Set.ting up
MalhCAD fer Your S)"ltem.") Oiangc to thc appropriat.c disk or
directory, 11 lhe DOS prompt. typc:
)CA!)

[..J)

' '

You s'l<luld 9CIC thc mndard llllrtllp screen {Flgltte l).

...:t :

!-~

-- --_.:;a
i1.-=.-

Bold rcprcscnl! a command namc or error mcssagc.

~.

. 11
1

i ~~

~~.-~

Other key are rcprescnted as follows: IP9\1p(, [PIJOnl, [Homei,


and !J:ndJ are kcys on the numcric keypad; [rl), [r2J, etc. are
lunwon kcy; lltnoJ Is thc ll'ICAJl<l key; IDkapJ 11 the
Bockspoce kcy; and ITabJ is the Tab key.

,__JI

[CtrlJ. [BhlftJ, and IAltl are thc Cuntml. Shlfl, nd Alt


ltcys. Whcn you mun hold down onc of ll><U lteys and lYJJC
anothcr kcy, lhc two kcy re shown UJgcdicr, for cumple,

[Alt)Mor [ShiftJ[Tab).

- 111

When this manual shows spacts In an tquatlon. yo Mtd


not tyH 1ht spaas. MathCAf) automatlca//y spaus 1/ie
tqua1lon corrtctly.

'

TM illu.rtradoflS In this manual show dther w wholt


scrun or part ofthe scrun. In the tllustratWIU thal s"'1w
part nf the scrun. the scrttn Is tnlargtd sll1My and 1/ie
lefl. rlghl, or bottom ef 1/ie scrtt11 Is clll off.

1.1

:.JI.-

Indanted courier font is an instruction for you to


typc somelhing.

Llghl bracJcets ([ .. ]) rcprcscnl special kcy. For cxample, [J)


Is !he Entct or Rcwm kcy and [<-), [i), [->), and [.!.)are thc
rmw key. on thc numcric kcypnd.

"

The Duics

. ... .'.5

Courier font rcprcscnl! kcys lhe uscr lypes or tel


displayed on lhc s-:rccn.

command.

-,

I~

~=:3

This chaptcr and In the rcst of lhe manual use lhe following
noi.ations and coovcntions:

represcnl a filcnamc, dircctory ruune, or OOS-lcvel

Notations and conveotlons

SMAU.. CAPS

- -------- - - -- - - - --

;/;~~~~f?~:~~::~~ : ;\~}~7.(/}: :''(~ :.1!:'.~d~.

:.-:q:~;y.

. rfndple1t:lo\'i. \~dHh'ittt!i.ft~-t-;}1' ' .: . V:..1;.;11:. ,i ,_ ~

~-

~ 1 -~

111

I~ ~~
-~

:-

l ""

:~_

......~

~.~- ~-

..,, ,,
t '
t.I09 ._.., _ 1.1

flol-

~-

IWf

tu.rt

I . ,.,._ l rtl

rw

Wlr.

1: MolhC>.O lr.>Jp ocn.1

The MalhCAD ~rttn

-~

1-
!~~
l~-7-~

11

..

!:.' .

When you swt M.alhCAD, lt shows dio llnt 24 lincs and 80


c:olumns ola MalhCAD documcnL Thc llnhing umkrxorc ncar
lho top o( lho :icrccn ls lho CIAT:tOr. When you bcgin typing,
MalhCAD inlcttl tell orequailonl lhe runor. You can m~
lhc runor around lho docur1ICl1l with thc arrow ltcys.

r?r : ~ _,.,_ :': ::~~)/: : ~)1 \;, . ,,..' J. ,, :~:-<.

,. : -... . -; .,. ,.

;zjlcl!j!@j;i;, iA;ii1A"'ft14ihiJWjOO@iU11t\d\d,f'iifk1K,i,d<## '$'9.i!:+.I

l" j ,- : n , 11, '*

'

j
1

Ch"l"l
' lnvCflC video 1ui>e 11thc10p of lhc ICltlCn il IJle wvssa11
'r

Thc messagc linc lhow1 thc cUITClll filcnamc on ~ lclt,


lile currc111 line number ond column numbcr o( IJle cuno< oo

n~ht.

Whct1you1tan M.u.hCAD. thc.rc i1 no <.:uncnl filo

This c.tlculation demonsiraics thc way Ma01CAD wcvk<:

.,.,1

Ma1hCAfl 1i1.o1 frai..:1M>11 hu.u, huw.: kC'.U, mul 01h<'.1 ymhuh


to display a11Witm1 Oic aame way you w11ld wnic lhcm on

cut.ar iJ oo linc O, column O. lllc wurd 1utu oo ~"' niessa~c


: indicltu lhc documm1 il in aMJoma1k :alulu1lo mt1<k. In
1Nn1tic calculalKlll modc, MalhCAD pmccsses and calculaiu
h ~1ua1ion u

'" .. you flnlN' . rnwre , .1., manual

papcr.

t:ulalit"1 nle, dGIUlbed 11 U.O cnd ol l.l>IU 7, ''l!< ... 11001


l Com1taU11.i

almplr calcul11lion

15 - 1/10.5 >e saecn showa ..,hal you bave typed. MalbCAD compulCI lhc

LSwct (Figure l).

.....

u --

lt.m

MAlhCAD unilenlArMIA l'lf"OC~lrJice o '""'alion..


Madi( 'Al> li.1w1w1 to H'l1f111m th4i tlivhiou hd111r 1ht1

1Uhll M:Uon ami du:pl.lay1 tht1r.. uJallun1Lt:oul111Kly.

lhough MalhCAD can pcrlonn IOphisticalcd malhcmatic.a,


u can lbo we it u 1 simple e&lculalor. l'<r ellmplc, lypc:

MathCAD shows cquatioru u you mighl sec 1hcm in a book


uron a blackhoanl, cnndcd fully in two dimen.<imt<.

Al MKMl aJ you ly>e 1he eqnnls sign, Ma1hCAl>c1npn1 1


the re."1h. Unlcs. yrn1 sll'C1fy 01hcrwise, Ma1hCAI>
PflX:.CUCI and cak:ul.iatcs cach cxuuuon iU y(H.j cntcr il.
When you are tyiinK w1 111a1ion, U1e cursor l1x1ks like U1is;
J. This iJ an apNnd cursor. nic vC11cal pwi uf Uic cur""
shows whcn: Ma1hCAD inseru wlu11 you lypc: ~> 1he rlghl
o lhe cut><><. (This is uplaulCd in more delll~ io Chi1cr 2,
"Editing Equations. i
Al you lypc cach opcralO< (in lhis case, / and -),
MalhCAD shows a smaJI rec1a11glc (1), called a placti10kr.
Placeholders hold spaccs open for the numben no1 ye:
typcd. As soon as you typc a numbcr, i1 replaces lhe
placeholdcr in lhe cquaon. (The placeholder lhat appe.ar> 11
1he cnd o 1he equation is uscd fa unit convctsions. You
Clll inurc i1 fur now .)

To edil an uisrini tquaJio ll Ma1hCAD, ""'"" 1he i:ursor


IO lhe approprialt spot tn tite tquaJlon and tyN MW tlltfS,
digits, oroperasor1, or prtss [Bkap) or [Del). For more
j,(onnatio"" how 10 edil MathCAD tquations, stt
C/Qpter 2. "Editing Equations.

"r'-~
u-

r
r!. ,_ !J
[FJ
[f' -

11
11
1-

ll: - ~
le;
r

1-

1c uici

f}e(ln!tl11nsa~d. varlab!esri~:~;tr..,11 ~~~'.~~-.1t1!~1

i.,,

m
a! - .!]
11

m-i'}
I!: 1

rmr
-iiJ

:[!;_! ~

n;_JIL~

'll!:_jlllllll -J.\i

; ~ :!! ~'

:!-~

1m

11;- -

..

' ll
MIO : .....

ami uw; imC'rmC'di11IC! tNnh in CurthN fAk:11la1iouJ ,

In rhe rcs1 o( lhis c~amplc, you'll cntcr more e<t1mtion1 w define


anti 1nc U1t v1lfiah!G1 t (the lime i111CU.11114) ond ucc (thc
atrclNMion of Krav icy).
l>~l11i11:

v11rlnhlu

To define a variable, yuu enia an cqua1io11 in three mps:


TyKi the v1uiiihh; nmno.

f'rc>J 1he col1>1 key (: ). This means "is dcfined iu and


a1icars on Uie saw1as1 colon w11J w1 cq1wls si~n (:).
En1cr an eprcssion to define thc variable: eilher 1 single

~-~.

11 .

Fl{ure J : Equaliono 10 ciol'no aa: and 1

numbct ora more complK:at..cJ co111binalion o nu1nbcn and

pn:viowly dcfined vllliablcs.

Bcfurc you swt. clear thc equalion you cnltttd bcforc. Typc;

ir.a

2:AMm>lo-ln MdlCAO

11

r,;;;..,;r,.- . . --- -.- -- ---- -

111e real compuiauun powcr 111 MaU1CAU wrnes hom usmg


Vt!rinbln By <lefi11ing variables, you can link equations ioClller

~- -.:~

~ -

:r-

; --!I

l[
~

!]

..

t~:, y,.it;~ , , , ...d~"re#'~ .....~:~:.~. 1 ' :~;,.L.,,;i:,,.;, :,:.+.": ..:.::::

[l\ac] clan (.J]


Now define 1. To malee your scrttn look likc Figure 3, fust
movc Oic cursor to posion 2 7 (as indicated by tl>e numbers at
lhe IOp right O the scrttn.) Thcn type;
t: 10
Makt: surc you prcss a colon ( :),noun equals sin (). Thc
coloo 1.ells Ma!J1CAD 10 define a variable; an cquals sign iclls
MalhCAD to calculatc a rcsulL IC you malee a mistake, use
(Bkp) IO erase it and slllll ovcr again.
MnU1CAD documenu n:ad from IOp IO bouom. Once you havc
dcf>ed a variable lile 1, you can con1pu1c wiU1 h anywherc
btlow 1he l>'JUaUon lhat defines iL
Now enlCf anolhcr delini1ion. Press [.J) to move lhe cursor
beJow the fi.rst cqualion. Then define acc u -9.8 by 1yping:

acc: -1. 1 [.J]


FiKurc J shows lhc two dcfinilions you jusi mlCIW.

!!!.=~- --..
,,-~

;~-.:: 1~;[:~:_-~~77~"

Calculatin: results
Now that acc and tare dcfncd, you Clll use ll>em IO calcu!AIC.

Thc Cun;()( should be bclow lhc two dcfinitions. Typc lhis


equacioo, which ~cul&s lhc: dislancc iravclcd by thc Calling

body:

acc/2

tA2

(The CAl'Cl shown hae (A) rcpn:senlS rising to 1 powcr; to lypc


it, hold down thc [Shitt) ley and prcss lhe 6 kcy 81 the top ol

the le yboard.)
When you cnlCC this equal.ion, MalhCAD computes the rcsult
-49() (Figure 4). The scrccn shows two <kfwtion.r, whch define
variablci, and one calcularion. which ccrnpul.e.s a rcsulL

f3'"~~BJr~;~f:f~~t~;:~r:1~~~:;~525.].D~ .~~~-..JtJ

Ch't"<r 1

Enterlngtext ':"'i~~1-;,i;i ~ .1; .::~ f'". l"m";,\.~'6~~;;

_:

..-..

-1 1

r .. - .

r;;--~
\ .r:.-
.

11

t : 11

-..:l

\I r.:

-1-.1 ~

[~

MathCAD handlcs r.cxl as well as cquation!. Thi lci. you makc


note! aboul 1he cnlculations you are doing. To begin 1yping texl.
you ptcss the double-<uote key (").

:~

111 -!:i.

rE;'

e,

Move the cunor to the right o the equatio1u you havc cntt:rcd.
To make the semen look: like Fig= 5, start al position 7 30.
Prcss the double-<uote and type sorne text

~ ..'.1]

1.-fj

squation of 1DOtion
When you lype the double-<uote. Ma1hCAD .OOws 1 pairo(
double-<uotes on the scrcen. These quotes represen! the end! o(
1he 1ex1 you m lyping. A.\ yoo type m;lfC text, the righlhand
quo1e movcs to make room (5CC Figuro 5).

~
fllr.ll'O ~: C&l<>Jlolng - - - -

t : ll

..,.

.....

""'
- tt .....,.
t

E:~

;. ' ,

Re~ium1

l :e SI

1 !athCAD createa an ktvisiblc rccwigle IO hold '*11 reglon.


Thc rcctangle grows as the region becomes largtt (Cor exampk
ir you lldd Jymbols IO an equation or lext to a ~1 rcJion).
Figuro 7 shows tho rccwiles corrt>N.:c;ng to tho rcgions In

... :a ... 1

Fi&=6.

- t """"'
1

,.... _., ...,_

rn:iI no

':&'JI

, .. r.111 ............. - ' " '

CI:.i:!JIJ
lii:rn

11

~t:.ft]

r=-.-33
C.'.: 1 .
1!

~ !-.
1-

MalhCAD lcts yon CIUr eqaations and tcxt 111ywhere on lhe


ICt'CCl\. l!ach equalion or group of tcxt ia a N!llort. A Ma
document 11 a collectlon ol regions.

~ - -!]

~u-.ttt ...:

Whcn you'vc finishcd cntttlng !Cll, use the lfl'OW ltcyw to nKml
thc cursor out o( the text (Don't U!le the [.J) tcy; i!yoo type [..J],
MathCAD will inscrt a linc break In the texl instcad or moving
thc cursor out o the text region.) As you leavc the tcxt region,
MathCAD hidcs the doublc-<UOICS. Only the leltt remalna (ICO
Figure6).

~;!-~~J;:1:. '"'''
l

'1"'

1:
., ' I

) 1:
\"\

.~

J:t ..

:'r<;l

,r

' -(

ff7

\ ~

'

E -+1

flllUre S: Enl0r\n9 IOrt

To enu:r anolher lino o( texl, )ust press [.11 and continuc typing.

-'-l ~
-

Press:
(.J)

r-t

--...:~

Then type:

for fallinq body under qraity.

------lll!l!ll!""~,'!:.,.~:.,..ffl]JitEt1!f.Tlll*WAIW&NMKWWISPM

?.:

fl0'.11 I\: Atw lMvh-.g .t '9Qloo

1
~.:ij
~L~

...

F\gl"9 7: ~ -

""'nlOnl ol ~tor.

lfyow ""1111lo1tt tM rttfllltKlofor a dccumtnt. typt


(CtrlJV (llo/d dowft tM [CtrlJ ky oNi P"'" V). To ltitk

I~

,.

rutontlu atatn.~ss [CtrlJV ataln.

1'l

Thc OOcumcnl in Fig-<R 6 sOOwl IWQ tin<h or regions: cquation


regions and 1ext regionJ. The lhird k:ind or rcgions- plot
regions - are dcscn'bcd latez in lhi.s chaptcr.
~

-1

..)

---

lapt 1

llerJllveculculutlons

. .

. ~, ;'. .;:

'1at11CAI> can do rqJICaU:ill or lt.u .. lva calt:ula1itM11 u ~""ilY aa


nd1vidlUll ailculaUO\I. ~AD-. IWO "llCltlal kinda ol

'ariablu !'> perfO<lll i&cralion:


llH&t nrlabln laU on 1 ranc of values, ruch u aU lho
nwnbcn be1wca> O and 10. Whcncvu a ranc vuiahlc
appean in a t.blhCAO cquatioo, MalhCAO calculalCI u..,
o.uation noi jusi aneo. bul oncG far cach value ol Uic tanKO
varilhlc. Ranll" vlrilblu""' oftcn l1acd u subocripu in 111
cquation 11111 dcfinca mwtiplo valuu for. variable.

. - - --

- -'

1
Mllt

:e -1.I

1
- 1 t - -

r..-u .. .t

_.,_

, .... r.111 .................... ..

To compute equaLions Cor 11'11\ge of values, first = a rango


variable. In thc problcm ahown in Figun: 6, Cor e:wnplc, you
can oompuie resulls Cor a nnc oC valllCS oC t fran Oto 10.

ru"SI, chanc 1inw a ranc variable by cdilin its defitioo.


Movc thc CUl'IOI' IO lhe 0 in die equatioo t ; 10, U lhoWll ll
F\ure 8.

TI\O Huica

21

C:---r

e.. -#-

"

! :

1;

elements in thc vc:cta. Typc ldi tncke1 ( [) IO indicau: a


~bc1i>1. For cumplc. io define d,. typc:
t : . . 11

d[t: 1000+acc/2t 2 (.JI


4

Jo.-

'

--1

,.,....,,,_al

-"J"t l -

r.. r.1u ... ...,.. ...- ,,..u,

A.e "W lft '" yn'll Jf"llt (. IJ 111 UHrYf" lht" ('IH ~ll OUI (l( tht" l"<jlUlfi Ofl ,
Moll1( ' Al> t.ak:ulale! thc vuhw-.a f t H il. ( Y11u 11uay 11".41 lhn WAIT
llKhl fl6Lth quu.:kly at the upp<"S fl6'hl of thc ~:rr.cn 1111 thc

VAhw.c, onc lnr C'.Afh vnluc o ( f. 1llC CAua1ioo

[=t

O<

d '1\01141 look

hke thc 1hud <.<IW<>ct in l'igwc 10.


W ilh thc Cur>Ol bcJow lhc aua1ion you just typal, ll>ow lhc

E:-::::-~

YCCIOr d.

f\gul91: Preporing to edt !he oqualion t

10

c;-1-=
~ ~r.
C:::

Now erase lhc 10. Backspacc twicc:


[Bltap] [altap]

This eiascs the numbcr 10 and lcavcs a pW:cholder. You can


now defmc l IO takc on a range oC valucs from Oto 10. Typc:

, L.~

c:-T~!l
~- L~ .
~ 1

0;10 [.J)
MathCAO shows lhc scmicolon u two dou. The variable 1 is
now a rane variable. The saccn should look lik.c Figun: 9.

MathCAO shows UIC vec\Ol of valucs (Figure 10). The fst

valuc, l 1<>1, is in cxpooc.nlial (jlowC11 of 10) notation.


Agure O: Cak:ulting wilh 1 rang vana~

When you makc t 11111ge, MaUiCAD shows lhc last calculation


u a table willl one rcsult Cor cach value oC t.

- z
:tm-t

By using a range variable like 1 as a subscript, you can deflllC a


vcclOI' oC calculalCd valucs.

MathCAO CUIS lhc n:gion from the documenL

....u ... ot moti


,., h ll hf

..... ....,, te

l 11

.....

Fu.t. use the cut key, [r3], IO gct rid oC lhc table. Movc lhc

~L.l,.

'l'JO.l

""''
i""'
871.S

[r3J

~ E

l
~ ~:

You ca.o cut any region-texl, <quation. or plot-from the


docwnt:lll. When you cut a region, Ma1hCAD removu it
from the docwnt:nt and pul.I 11 In t<mporary storag<. To
pa.rlt it bacl in 1he docwnt:lll, movt to a.o onpry spot and
pr<ss the paste t<y, [F4l.

Now entera ncw oquation - a vector cquation - in lhc


document By wing 1as a subscripl, you can define sutCCSSivc

t~:

t :.. l l
: ....,

cur.;or into lhc table and prc:ss:

1.

-. ..

Defining a vector

e:.:-~.

L:

Type;

d -

. 1 .l .

!!_

VOCllJI.

Creatin: a ran:e variable

~--";:

calcula1ion takcs place.) llic vuiuhlc d 1w1w has a voctu uf

Vtdon hold multiplc vaha. Uyoucompute allCI of


1111wcn wilh a mo variable. you Cllll llOfC lhcm in a

This acctioo dcscribca how IO llSC l'lllc variablca and vcctor1 IO


do iterltivc calculalOllL

,.

lil'--

.....

'BZJ.,
i7'S9.,
i'8:l.l

su

Figuro 10: O.liang -

o1-..

Formatting a resull
You can sel the display lomat lor 111y numbcr MalhCAD
calculaia and displa)'$. This mans changing lhc nurnbct o(
decimal places shown. changing eponcnti;il not.ation IO
onWwy decimal nowion, and SO OO.

.Ff V?

il.ZWS.ii. 1t.Mttm#tta{WJ~:1~-~~}.1ff'fh f~~Jlff!7.t#f~B.~bJC~ff't ~: +;f. .

t ..e <t;z IPJ.t<!.JQ.. . .

1.

44 t

r',.,

.. ... -.,... 'T;~~f f ~-'/?::~rrt~y;:~~~~:r~:~Jt:'.::}~r.:. '.., . ._


'. :.:~::: :r) i~t;:~::.> ;;~:~;:~~!::~J.fN~: :_~
Ch'!"<r 1

;J.fiEiiiiiif:t~~~4fi~ :pli

-..::=
::--...
--1-;.J

""

.J.-"'J

:;...::l

!'ff

Lltlple. ~' s how to changc the vcclOI' in Figure l O so


ne of lhc numbaS dis;>lay in eponential notalion. Fkst.
he cunar anywhcR: belween lhe bnckeu. Tbcn typ<:

Whcn you ~ [.11. MalhCAD displays lhc numben in lhc new


formal J'i&t!!C 12). JOCO is no longcr displaycd in exponcntial
notation.

:=-. n

.- -.--

:J.!
.

t tcll.1 MnthCAD yoo wanl to format lhc vector.

:AO shows formal Jf>t:dflcmlmt on the top lino of tho


(Figure 11). Thc symbol on thio linc 11:prcscnl

ttlt-'lu.:t of 1ho 1fplay f4umni: or r,um11ie. pr means


siun ami ti meano "cpcienlial tolerance.

' : ... tt
MIO :

--t.I
-

A tI - l

....

C.-tl-

::-- ........
--1~

.t _..,_

,.,.r.u1.,...,.....,.,,...u,

...:- 11

fl\.I

...

""''

=-- -:n
=---:u
- 1- '
=-- i]~~

11.\, .

t : .

'Jll.'

. . ..

' R71.:51

-,'
.....

r.'i'f.,

:1-t
'

r..-u ... "'...,,_

twhlll ..

..,__,_.,,_tte

<llJ. l

MI

1 ti

. ... .

,.._.

fll . l

f1QUl9 t 2: Reoull ol tormllt1lng lho <hplaY"d-

1'5.''
'1:1..,1
92'.U

.....
""'

~;~

lr.aJ.1
511

!:-~

... 11: fonn.ll apecil\olllon

keep numbcn !rom di51'laying in e>poncnal notation,


111ge lhe CJ<pooential UJlerance. Righl now ttz3, so any
nber grcatcr Ltwl or oqual IO HY disployo in exponential
1111ion. To ch.an1tc n . typc thc foUowing:
fttJJ ,,/t-dHf1W trttHA(h tlmeJ
1+-llt-) ...
10 >lll cursor jUJI afrtr tht J In
l-1.

1 .,.

~-

- -!

~~~

"''''''wu- ,,,,,,.,u~,,., .T.

~---

C.,,,it IM f<>rlftdl lo rta4

t'
f.11

r- - -:-.:!

F.nt,, IM MW fn'"""

- - -----------

. w

w _

::

;; -
11

: ~1

23

.1
Plot,t~~1j;~~~1~!~~" $~

.,, -

,1 '-- ,. , '

:.~(

...

This scction d=ribes how 10 plot !he points alculatcd In !he


previou~ !CCtion.

Creatlng a plot
To Cl<'J\10. 1k1t In MathCAD, pre,.! !he 11-alcn key

<

OI

(Shltt)2), thcn fil! in lho blanks. Thc plot.s ""'drivcn by ningc


vmlohlr,1: MnthCAD will plot 0110 poinl f<l' cach valuc o !he

ningc YRriahlc """' In 1ho plot.


Por enmplo. herc' how to CttAIC. plOI or"' vtnu! I, with onc
point r-- eoch value of l.

The cursor is on !he plaoeholdcr at lhe cer1tcr of tbo boaom axis.


To plot ton this axis, type:
t

The othcr 1wo placeholdcn on the bOltom .. ;, are ror a.rU //mlu
- the high and low values fer !he axis. MalhCAD leu you fiU
In numben fer lhe9e limits. lf you leo.ve them blank. MathCAD
11111om1tically fills lhcm when it crullCS the plot.

d{t
To - !he ploc. tho canor OUI o( tllcl plot rqlon.
MalhCAD calculllCI ni ploU !he points (Fiure 14).

... .....
:

'

MIO : ~.I

-.

: . . . -

;'2:1.

1 :e l a --

t1

m.1
,..
..
"""'
11111.5

a....au-" tt
r... r.111 ........... .,..111

s..itt- ti ..ti

, .. hllh 1 .................

m.,

I"''-'
I~: !

...

r~" 1:1 F mpty pl04 ntQkln

.
f

'':'

:sz:u

i"''

1'815.. 4

IU

:o

'
.1

'&al. 1

IM

'llU

lm .s

:t

.,,""'
..
..:,

t ,. . .. 11

,.
i:'
!~

' : .. s.

MalhCAD hom an cmply plot ttgion (Figure 13). The


placeholdcn represen! places to "fill in !he blanu.

!f1
~

oquatiOll! you' ve cnicrcd and lyp< an 11-sign:

. !

Now move lhC1 cunar IO tbo placcholda on lho len ub 11-.1 typc
whll you Wllll ID show dicte - d,:

To ctt:aie 1 plot region, move !he cursor to tllcl righl or !he

-"'l't

~:-.

m.s

':
TheBuics

el"'_,

']:sl
A

!.

il

>t.

Flf1.n 14: PloC


MathCAD pfou the points. ronnecu lhcm with stralgh1 fines,
""' fill1 In lhe mlulfts u!J llmlti.

f
1

Tlw half-bro..km"' 1/w btflnn/Jlt and tlld o( 1/w 411J 11"11ts


In Flt"" U INUcou 1/tol MotltCAD 1w flll'd In 1~ 4111
/lmlu nM-tlc..U,. Tltt lttrlfMo<Ull &1 not f'P'P' o
prtltlotdJ.

.,,. ~-,-~..,

---~~ .~=--

.M

"'-' i"'.o.-c-"---->o --"''"'" ........ ----~-

. 1, e : .. :, . . . . . ~,y...
.
i
... ;
"'".; " .. j

- Li-.\1""'
. -u4q
: rL
, .(. w
. ...
+it,,......
" ' f ,,AerlL
' '
!.;;+ L,,,,,,beM
re*'it 'l'!to
*'' " rt!utow1"
i

24

- ~-f~

se Chapler 16, 'l'/ou.

Formalling a plot
Thc plo! in Figun: 14 il lhc defaull plo!: 6 lincs high by IS
columns wide, witb lincs conncctin llle points. You can change
lhc plo! ~ and typa by /orllt4llill1 lhc ploi, ju u you wii<z

formaw:d numbu.
To formal Lbe plol.. mi IDOVO lhc anor U.ID Lhe plot. Thcn iype:
f

MalhCAD shows a plot spcciflC&tion ai lhc messac line at lhc


IS).

IOp ol lhe SQ'CCll (F'ipre

Backspact 10 erase 11tt 6, 15.

15,30

Changt lltt plot sptclflcaJlon

Enttr 1/u iuw p/01 speciflcatlofl.

[.JI

MalhCAD shows lile new plo1, 15 lines high and 30 columns


wide. Preu [li'qDn] a few times to scroll the scrcc1. so you can
sce lhc whole plot When you scroll the scroen, MalhCAD
revea! lhe pans ol lile docwnen1 beyond line 25 (Fiure 16).

....

""5.1

'lllO.t
!l!S.9

82:1.

759.S

r.a:u
"""

;. -t.I
:~-

__.,
[.....

.....
.~-~......""'m.
W .I
111

...,u
... u.
r.. r.111,. w,,...., _,,.
e1 ..

]=:;J
A

Flgurt 15: P\oC _.,..,....

N wilh the Oflllal spcciftealion for a nwnbet, lhc componcnts


ol 11.. ploc IP""iftaLioa ~in-1 chanocleriJtics ol lho plot. Fot
example. ry~ specifica how lho poinu are connccl<d (l IO
oonncc1 the poinll wicb lincs), and stJt is lhc si:zc of the pl<>1 in
liPca and columna. To malu lho piel bier, lype llle followin:

(+-JI+-]-

Use lhc menu key ([rlOJ) ID scc menus ol command.s and


tllen selecl commands lrom the memu.

Press [!tac!. then cntcr lile name ol lile command.

fuss lhe appropriaic function or conirol key. (Many


commands, bul no1 ali, arc available on fwiction or control
keys.)

i1

t=_

--

, . ij

.
,,. _

p1o1

MathCAD documtnu a1erod injlniuly downward aNi to 1/it


rlhJ. Yow c01t scroll liJ su ttiffertnl parts of a documtnl /ry
movlng tlit curwr off lltt lcft, rihJ, top. or bollo'"
boundary o/ lltt scrun.

;;--[ e:..:-~

~~6

1
1

......

..

""''
'2.t.'
r.'i,.,
.....

lm.s
tlZl-'

"'rs"'

>11

~.

r.a:u

111

,.,,,

,JI.

ftgurW 17: Mot>CAO"'"" ........

Menu commands
To save your worlc on a disk, use lhc save command. ThiJ
=~ a disk file wlll lhe exiension .MCD
You can execuic the save command from lile command menus.
To :iee lile command menus, press Lhe [1'10! function key:

When you prcss !he 1rlO1 key. you sec lhc MalhCAD main
menu (Figure 17). Each wonl al lile top or !he screen rcpresents
1 group of comman<b. Tiie selecicd tem (System in Figure 17)
is in nonn.al lel.l. while lhe rcst of lhc ni.ain menu is in invcne
video.

Each tem on the 10p 1ine of the sacen reprcscnts a submcnu. T


sec the submcnus, lUG lile (+-] and (-+) arrow kcys on your
keyboard. AJ yoo movc rrom onc ilcm to lile llCJll, the
corrcsnldiog submcnu a>pean at lile IDp 1cn o 1he ocnx:n.
Figure 18 shows thc submcnu for File.

....
~U-rrrnwcii:mmfiW.1Cm
f1\.i

#'ttl}_~,.-

'-

.......

,,~.

r11 ....
,,..,,.

Jlm,

~L-

......

'--------~

JJ,

~:::::

eia-6,15.

.....

~l.~
e:... ,... !!
1

.. 1

,;

'1.15.1

e:...-!..<J.

/'rus ltflarrow tnoug!t timls


IO pUI
}u.JI a{~r IM Jj 111

';

.....

This section mows how 10 execuie MathCAD commands in


each of lhcsc ways.

[1'10]

,,.,,,
Agu .. t e : - you aoroll fle ..,,_,, you c.n -

Then:: are lhree ways ID CACCUIC commands:

;- '

~1'

L.~

111

Comlriunds :~~:u3;'91; ~~.1r}'~"!;.~V~~,>w~f..:i5' ..t.t\ i\" ...t.,~;~

MalhCAD has a foil Sel of command.s ID conuol how it


inlUjlrets equations, lhe way !he screen loou, and olllcz aspccts
of your inlmletion wlh die program.

~-L~

.i-.

. . . ..

i3

~: r:
~=p
[

921,,
I 18'17.S
' ;. . al

~r~

[Bkap] [Bkap]
[BkapJ [Bkap]

w rtad alzel5, JO.

'.

. !_"", ' ...: . ; . ':'. . . . : .: ;..";' .".:.'\.~0:- .:


' , ~ :
J:.,u11 "W11,bA itt1'1ildtkB+#10;'.'&1etsNWwe;,!Jel!l+>+d.p1--..... "'hlgpi,,1ti1.1
1M Uuk

Cha>t I

For dL1ailtd ir{onnaJJll 011 crtali111 llNi/onnaUlf plou,

~ :

Fig<n 11: ~ 1or Ale

.-----..~~~-.:"'."'~----------------
..
~ ~.~;

:--..,,,..~-~~-

--.

~~-----~--.--------~-..--~ ----~
-

r ..:. . .;

.-"~ "'~?J~r:~2'.'.!!:t":s:~:1>J~':~::;;-;2f~
Chapttt I

,., move thc highligh11en or righ1 IO sclcct Fllt. Your scrccn


01Jld look like Figure 18, with tl1e ubmenu for Fllt showing.

About menus and command

To tsc~from mtnu.r ONJ rtturn to thcdoc1Un1:nl w/lhoui


auuting a command, prcs.r ,,, (JCacJ hy.

You can sclcct from command mcr11n cilhtt with thc arrow
keys (u in the example abovc) or by lyping the lirsi lcuer o(
lhc command. For example, anothcr way lo sclcct thc S&Y<!
command is lo type [1'1 O] r S (for File Savc).

l( lherc 's a one-keystrokc shortcut for a command, it

>e currer11 sclcction in tha tubmcnu appean a. a highlightcd


video) bar. Move the highlighl <lown IO San on this

O\'CT'Se

cnu. To sclcct lhc Sne comma~. xcss thc Enter kcy ([.J]).
lathCAD prnmpu you thc iop ol !he~ (ora lilenamc
19).

appcars on thc mcnu. Forcxample, (F6J appean on lhe


File menu next IO the word Savt. This means that you can
prcss [r6] as a shorti:ut for File Savc.

~gure

,....

.....

Tite A In command mt/lllJ reprtstnts tite Control uy


(!Ctrl]). For uamplt, (AQJ apptar.r ntJrt /O Quit /111/ie
System menu. This mtan.r that [Ctrl]Q Is a shoricuifor
the qui! command.

:995. l

'l!S.9
'21.,

lm.s
sz:u

.,

.....
""'

'8:1.l
811

Whcn MathCAD prompl! you for anything on lhe mcssage


linc, press [ll:ac] if you want IO abort the command.

Whcn MathCAD prompu you rora lilenamc, you can


alwa)'J enlet a DOS slllmame (for cxamplc, . *) instcad.
MalhCAD will show you a nolling mcnu or cxisting
lilenamcs. ~ Chapter 3 for moro infonnalion ou thi
featurc.

i
,.., . . __ _ _ _ _____J

....

Aguro to: MmCAO pt0mpto lar a ftlonamo

To save lhis lile in the cunmt disk and din:ctory, enter a


rnenamc:
CRAV [.J]

MlhCAD savcs thc me under lhe l\llnC OltAV.MCD. (MathCAD


.ou1oma1ically addJ thc .MCD e>laulon if you don't rpccify
othcrwioe.)

To exocutc a cornmam.I by name, instead o( by menu, press


[!Cae] Md cntet thc command name. You nccd enter only

enough letun IO distinguish the command from 0!11tt


com mands. Cornmands names are not case SC11$i tivc.

For cxample, herc are sevctal oquivalcnt ways IO enter thc qui!

command:

[FlOJ 8 Q
[!Cae] QUIT [.J)

Ustflrst ltllcr In mtnu.r.


By -

(commandJ ort ""'

cau sa1.rt1/w:).

[JCecj qu (.JI

"'"KA

By namt (nud nnly


lt11trs to disrlnguish // from
otlter commandJ).

[ctrlJQ

I_

Co111rol-uy sltor1c111 for qull

, ~~T:
.!~ 1 ~

1~

i !1

l~iJl

f ~-!-61

e'. .
. ill

I~

! ~;J
e;- -!:I]
iE

~-- .,

- ----- -----------......-.--.---..........,.,_______~.

r:-"I

n:;-r-MI

Whcn you'rc using commands and mcnus, kccp in mind lhc


following:

The Buics

Printing

Thc prlnt command prinl3 thc cuncnt documenl To U3C the

prlnt command by name, typc;


[l' ac] print (.J]

Warnlnt. lf ycu dldn't .rtlter a prlllltr, MatlrCAD shows


this messagt wkn you try to pri111: No prlnttr Mlecttd. To
stltct a printtr, IUt the Mltclprlnter command a.r
de.rcri~d In Chaptu O. Sttti111 11p Mat/CAD for Yow
Sys~rn.

'"""

""5.1

M. 4

1"55'

.. I~:~
11z:u

.....
m .!

.i-.

'83.1

811

'

:- ii

:e-~!.~
~~!:
~ ! -: ~.

1
~-~
I,
~-~
~ -!---J
.~

m,
A

....

Agui. 20: Prompl for print eommand.

Tho prlnt command promp13 you for lhc print arca (Figure 20).
To print lhc wholc document.just pre.u [.J).
Ncxt. MathCAD prompt.s you (ora printa dcvicc. HN is lhc
default ~ (.J] if your prin1er is connected to the port called
PRN. (For most conliguraons. this is cooect.) lf your prinier is
connccted lo sorne othcr port. cra!C the PRN and enta the
correct printer port. for cumple, COHl. (Ir you havc no printet,
pre.u (l:c) 10 abort lhc comman<I.)
lf evcrytlng is hookcd up com:ctly, MathCAD should Sllrt
printing out y<ll.I" documentju.u a. it appcan on lhc ICTCCll, (Jf
thcrc's a problem, soe Chapta 5, MDocument Formatting and

Prlntlng.j Wbell MalhCAD ha llnlshcd prind.ng. it posu the


messagc Prlntlnc complettd 11 the top o! lhc scrccn.

__

..,...._.

/;.~~~==----~~====--

....

f ,.

__-

----..,....-----~ - - - - ---.,...., - ..., ..,..._...,...

---- - - -

1;

,
\
' .. . ' .!
01ap<a I

Olherreuturn.

,,,.. '.'

This chaptcr has IOUChed on only 1 fcw MalhCAD C4IUl'CI.


From l\en: you can Ir)' OUI MalhCAD on your computa oc o on
w lhc rcu or lile man.W..
Herc's whuc LO lcaru aboul MalhCAD'1 Olhct Ccaturca:

Editlng and docu1t1a1t fcatures


Edlt1n1 equatlona, o.apta 2

Cut, palle, aad IXIP7 Chapu:r 3


Starcll aod replacc. o.apta 3
Wlndows, o.apta l

Tul n1ion1 aDd lat baoda, Chapia 4


Marlns a11d pace We.u, o.apta S
Prlolin&, Chapta S
C111tom MalbCAD ccmncuratlo111, o.apta 6

JfM1l l"ourWr tranaoruu. Clw1>tcs 1)

Condilional< (ir), Chaptcr 13

Random oumbers, Chapta 13

c~

Radin1 aod wrllin& ulemal dais, Chapw IS

Crealln1 plol.I, Chapta 16


Mol forma1lln1 (cbanio slu, Une lype, loe plols, tic.)

Chaptal6

Operawra, preccd.-., alld panalbeaa. Chapta 7

Vaer..Ulilled fu"""-'. Chaxa 7

Aulomac aod muul calculatloll mode, Chapta 7

l'or111.111lo111umben, Chapia 8

lmaciaary and cotmpkl numbers, Chaplt:r 8

Vnluolme111urc-.Dlaplu9

Dlmensioul anal7*. Chaxa 9

Vecton and malric:a, Chaur 10

llralloo, Chapea 11

Tabln, Chapea 11

Sums and producla, Chapta 12

lk&rall and dcrl...ilna, Oiapea 12

Stslislical functlOlll, Chapcu 13

Cublc splin lnlerpelatioll, Chapia 13

,7

t..,

Editing and Document Features


1'

!_1l

t "'.

t , ~.;~.- : . .

[~

Solin& slmullaneoua ttuallons, Ctwpta 14

Plotting eatures

..

E --~

H.': ., '
.:" ' - ..

E-~
L ~

IE~l=~

!~

1
I[ ' -~
_
l[-J
...._.
llb-~

1[

2
fo
id
10

t -T0'

-Z n -

', ''"['.fo \] [, ,, ]]

45
0. 25
0.2

Center frequency
Durat ion

L.i tency

_~. ~::";' \

H ;: fftlhl

0""1?1<'J

l:Jj

..

.n ..

. l.

"Note thdt, altl1uwh the spectral ener9~ of u,., u.we r.uo,11l l"'d -; .1l tl.t:
'cdrrii:r' fre<1111'11C1 nf ~l llz, the si<pMI is . ..-:-+l;~G;I'2

m;m (: . .,,,.2..

mt:z;: .un ..... rnr;~':";i

:.:.~

i
1 --

1 [:.,.

I'

. c_::..::i

~t.:>

first, a tran~ient uavelct is defined, and its transfort1 ls co~puted:

~r:

I[

Compulational fcatures

,-r-I"

~~

2:

..!.. ~ .,.

..

. . ::.::: i";. :'. ~!: .

:~

. .. ..

__

... -.:1

1:1'.:

1
1

-~:;.

..

'

~ -.:'

>:

l!-.1

c;----:J

In

1.
.

_,

,, t

Editing Equations

:ri, .e-. ---a


e;
-- 7"2
l c -- ~"12
~"]31
lfE--~
~.

;~:- ~

'e~

-:-:J
1 e:---~

:~~! !j

-;u111-1

1~

~
[~;.J ~
! 11 .
i r-:= ...::

' 11
r-~~ 11
ll_::'~! ~

' C'

' ,.. ~ .. ;:_!!!


!'111 ' 1:-.
t

-::.

j , ~ -

' .._..

c:..J.l .

MalhCAD reprcsc:n11equa!lonlill11me ~onal fomut


that i.t as clase as possiblc IO standard mathernatical notation. To
edil such an equation, roa mldt posillon thc cinor corroctly lnd
lldd or dclcic thc appmprlaie nmncs, numben, or operaun.

Thi.t chapccr explaina die ltl1lll and conccpu you neod to lnow
10 edil equations. Thil chaptcr a1Jo explains how IO YCW an
cquation as 1 strin& o( keys llld how to place lhe cunor in thc
concct spot In 1n equotioft 10 edil IL

.~'

Thls chaptcr conw,. thc Collowln1 ><Ctions:


Esscnti.l ttnnt
A li.11of1m1111-.1 In thls chlptet.
FAldnt eqwallou
The equatim u a suin ot ktys; pi.e lng tilo cunar llld
edltln

'.'

P'.dlllnt. "8- .... aumbtt


&llting namcs .,., numbcn u you """'Id r.1111ut

Addln1 n op<nl.,..
Ways IO edd n operalOr IO an ""btlnl oquatJon

Dtlttln1t opttllorl

How MllthCA O reinu:qims cquadOll! whcn you dele le

opcnun

l'llrtnth...s
Using perenthcaa to regroup equatlons and
strucltR

Commenda to C1llt-" plllte nprndoftl


The lnad, IDCDpy, llld lapastecommonds

Wht 10 ttld eat


o-:ription o die chlpun !hit follow

. - - .H. .

' . .

1.

!
]

----.

33
Editin& Equatioru

---.lp{<rl

tl11llvrm~

., '

;, .

1il acclioo dcacribu lhe LCmU ....,.in lhiJ chapccr.

.... ...,.

A docimal numbtt likc 3.141~9.

lame

A varllblc or runctioo name dial appcwa ill 111 cquatioo.


)pr&IOO'

A 1ymbol lhat pcrforma a ownuicaJ cak:ulllion. likc ..- or


+. Each opc:rawr hu a key dlat yoo use co 1ypc it (far
cumple \ ror. squarc root, + ror 1 plus ain) and 1
c:h&nlclerislM: Vlllhical llJPC8'WlCO 00 the tcnlCIL

Top-ievd operator ot an t.1prcsslon


11w: main opcrntor in an cxprcssion. Fcv example, i an
CAprcs.sioo is a fracliun, 1.hc U>l>-lcvcl upcuuor is lhc d.1v1sion
(fraction har) Cor lhc fnu:lion . Mllny ediling i.ukJ (like lhe
lncul comrrumd) use Ore to>-lcvcl opcra1n u 1 '"l11111dlr" for
tlie whole e prcssion.

!'recedence rule1
The rules by which MalhCAD decides which opcntiOlll co
pcrform fst. Each opuacoc has a charactt:ristic pree<&tnu.
High-prcccdcnce opuaton are pcrfonned flfSl. lhen
low-p=dcnce opcraun.
MathCAD s most comman operators, 11.Jtedfrom lghcst
prtctd.tllCt to lo>WSI, art :

()pffand

Onc ol lhe objccu acled oo by an opcrallJr. raccora io a


multiplication, ierms in lldditioo. w:. IC 3 + 5 appcar1
io 111 cquation. 3 and 5 11e lhc opcrands of lhe plus sin.
Opcnnds can be simple oamca or llUlllbcn or more
complic.ted expreuiona.
Billllf7 OJ>"rator
An operuor lhal tW:I twO ClpCl1lllda. Conunon cwnplcs are
additlon, aubuaction, mlllliplicllian, divisioa, awl rai.sin IO

apowcr.
1

Vaar7opcrator
An opcratOr llw U.U. ollly ooe operand. Commoo
uamplcs are aquarc l'OOl 911C! abx>lu&c valuc.
Placebolder
A srnall l'CC\lllglc (1) lha.t latcJ lhe place ola miuin
opcnnd or opcsalOr ill 111 oquatioa..

l!.lpraolo

A "weUormcd" combilwion of operalOrl and operanda.


WcU-ormcd in Us COlllCJl lllCllll I combination tbal
MatbCAD can cvalualc..

SubKripts (/)'J'<' CJ
Rlaln to 1 power (/)'P<' ~)
Olvblon (/)'pe/)
MultipUcatloa (/)'pe *)
Addltion or sublractlon (/)'pe+ or -)

1 , .,.

C"""

equ.auon in ill new Conn.


....

I_
1 1 1l

~ 1 ~
~= ~!:!:

[[ : ~
1[ :,

ill

1!
l~
l
. 11 ..

1111 :;.rA. 1ion o 1l:in1 how t.o think ahoul c.diting cquation.s in

TI><. imxrtanl st.ep iJ lO place lile curs<Y in lhe appropriate

MathCAU.

posmon. l>cpc111h11K ou whctl\C'".t you pl~c thc cur~ )( on a name


or numhcr or on an opcru.lof, MathC/\l) wall hd1.01ve d1llcrc111ly

when you in$CJl ot l.klcte. You cuna.lit any o lhc followmg

Keystrokes and equalions


Wheu you typc 1ut cuation, you 1ypc ii

parU

a. 1 string of key&. Sorne

keys. like lcttcrs ami digilJ. nUJkc ut l""ts ol 1uu1><.1 untl


numben. Olhcr kcy,, liiuo *, rcprcscnt opcta1An.

MalhCAD tums what you type in1o an cqualioo by using thc


rules ol prccetlence. Prrcetlencc also de:erminu how MathCAD
displays thc cqualion, since lhe display rellccU lhe ordct of
opc:rntioDJ. For cxamplc, suppose you ly>e:

Thru of MaJhCAD' s opuaJors- raising to a powtr,


subscnpu, a"'1 su>a.scri111-art invisible. Allhnuxh th<y
u/fecl 1h.e equ.ation. you cannot set thcm
1Ju: sertas. To
pul 1ht cursor .. o,. ont o/ tM.it op<rntors. nv1w tM cursor
IO the blaN: spact ju.si to thc ltft o/ thc c:qx;n<nt, swbwpt,

"

l~ 1;;

[[ '.-. f]

[!,;_-......:1 :--,
~

1~!:g
~

.ll

------~
.

or s~r.scripc.

3. 3.811
%

Ll

'l.
id-~

To e<lil an opcrawc, ploce ll><- cursor anywlrcrc on tllC


opuator. For small opcnuors likc 1 plus sign, jusi pul tlie
cursor on !he opualDI'. For biggcr opcralllr' lik.c a fraction
bar Cor di vision or a summation sign, pul llie cwsor
anywherc on lhc visible part oi lhc opcrauir.

1110~2+3

Figure 1 shows 1he rcsulL

tLj a
[ [ :1

o the cquation:

To c.d11 a mmle , .. numht:. r . ploc.c thc cursor on any lena or

digit in the 1uuuc. ...- numbcr .

11'

As you edil lhe cquatioo, MalhCAD reinu:rircu lhc


kcyswkc scqucncc 11CCording to pr<ecdcnce and shows thc

Wanrinf. In addion IO names. ruunbers, tllld optrators,


equariolU contain /ou o/ blali.t spaus. Yo ctlll't pMI tlit
cursoron one ofthcst spacts tllld tdil
tquaJioll. lf"JO
pMI the cursor 011 a blaN: spoct tllld try to l"jpt or delttt,
MathCAD shows lhis mtssagt 011 the mtssagt line: Cao't
edlt blllnk sp ~ct. (Exetption: ; thcrt i.s a blank spac< aJ
tlitfrorJ o/ a name or numlxr. MathCAJJ ltts )'O p"1 thc
cursor thert and add lttttrs or digits 11/ tht front o/ thc

ta

u.e

Figuro 1: ProoedonOt dolOlmiiwl ~ ., equ&lion lo ClOfTlllUl9d ltld


dloplayod.

MalhCAD rcrforms thc powct fl!Sl, tlien thc division, thcn lhe
addilion. The display rcflccts lhis: the 10 and lhc 2 ore shown
IOgclhcr ll thc denominalO of the fraction, but lhc addition is

scpanu.c.

Editing an equation
To edil an cxisting cqualion, foUow lhcsc stt:>S:
a

or nwnbtr.)

Thc resl of lhis chaptet shows how w plac.< lhc curoor and wh:H
IO 1ype ID edil names and nwnbcts. add opcr.uon ID oquotions.
and delcu opcrnwn from oquations.

Place thc cursor al lhc spot in lhe cquation whcrc you want
IO insctt OC delete.
Type a lcUct, numbct, or openuor co lldd co thc cquauon
Or, pre.u (Del] oc (Bltap] lO dclcu.

IE<41P.

tW.WP.f.!MP:. ..S?;;:s.-ff.PJ>? 's:t:' , &f ;tq 42 ( . 1 -?

zq; ; Qii.%

- e

~---.....

.. .

----

Ch"Pta 2

ditlngnamesandnumbers:~

.:..;r. .;.,~; ~ . <

iting namc. and numben in M.alhCAD is as easy as cditing

"Adding

an operatclr:":~~,iq- \,A;., . ~~ il!,-.;;'1;1~~ ~<',1'.'~

This soclion shows how to do lhe following:

add a binary operntor al\er a name or number

edil a namc or number, loDow thc!C stqn:

add a binary operator bcforc a namc or number

add a binary operator bcfo1-c or alter a wholc cxprcsslon

Place !he cuoor al the oomx:1 place in lhe name or numbcr.


Thc vertical pan ol thc J.sh.apcd cur.;or should be al thc
spot in !he namc or numbcr wherc you wanl to inscrt or
del cte.

Typc addilional letu:n or digits to inSM inio thc rwne or


number. Or, fl"$S (Bkap) or (Del] lO dclcte backward
from lhc curror. (In cquations, [Bltsp] and (!>el) an:
equivalcnl lO cach O!her.)
trc

2 shows an cumple: changing .7S ID I0.7S.

1 J.'n 4.'n.

t. Put
t ...

t ... ..,,..,,. Jut Mf"


iechI poi ot.

Adding an operator aner a name or number


Onc lypicJI) way to edil an Cprc.Mion is lO add a binary opcrator
(likc + or /) aflcr a namc or numbct.

To add a binary opcnuor aflcr a name or number, follow these


~
Movc !he cunar to lhe cnd of lhe namc or number.

. z.

hpe 19.

Type lhc kcy lor lhe operntor.

MalhCAD insens !he operator anda placcholder (1) into the


equa1ion. lf neces.\llf)', MJllhCAO will rcinternt tho
cquation based on !he prccedence or lhe ncw opcnlOI'
compnrcd to lhe cxisling opcrnlon.

Once you haw added lhe opcrator, fill in thc placdloldcr


and complete lhc equation.

Remember: M.alhCAD inlelprcts thc cquation ba5Cd oo lhc b:ys


you lypcd lO enu:r iL When you edil an cquAtioo by odding an
openllor, M.alhCAD insetU lhal operaior in to lhe 9C<1uence oC

keys and rcinierprcu thc cqua1ioo accordingly.


figure 3 shows an eumple: dividing an e:iliting varilblc by
ronstanl

.. 2: Edllng nume.r

[lfii -- -=~

-m
r~3i

[~

--

Editin Equationa

3.

:: 3

:: 19

X ;:

..--!]

1.

e :z a Wx 4

IL~

By presslng die [Ina) key in 111 cquatlon. you changc ID lhe


llutrt curscr (l). Since lhe "21ical pan of thc cunor is on tho
left side, anythlng you lype is in9Cftcd befort thc cuntt1t cuno<
position.

r.t .............. .,..

To insertan optt.ior bcfore a name or number, fullow thc;ie

~ :...-~

llcps:

--=';~
1~=-34

:: 19

:: 3

X ;:

[J!ii-jj
11! :-. !i

JI

Z. tire ,- , llatliCAJ ai-.


a placohoUt'I'.

e : a -x -1

111irf11:~-.;rj1

:i: li

~ .. -~

1 ll. 7'

add a unary operator toan equalion

11 _:2

.i. ;: 3

e : -x 4

1 ~li_h

JC

:s 1

3. tu -:z
.,....u ....

to

caoorlm

U.

!~ 'T-~JJ.

f9Jl'I 3: Otvldng by a oonatlnt

1e1!4.

lnsert mode: adding an operator before a name or


number

,~!~
1~!!:::1
1~J!~.

Ad<ling an opcntor bcforc a name or number is ju.t likc adding


one afier, except l11at you mus1 fll'SI pul thc cunor at thc
beginning or thc rwne or number in IJUtrt mo<k. In insert mode
whal you lypC is insatcd beforr the cuncnt cursor posilion
ln.tcad of aftcr

~''"~
~s-!::f"9"'1' ........

L1a222

""'"""'~ -

To pul !he cinor in insert mode in an equation, presa the [In)


key (lhe Okey on thc numeric kcypad). M.alhCAD changes thc

curror rrom J io L
Thc usual cinor (J) is caDed an apptnd c11Tsor. Sincc lhe
crticAI pmt oC thc cunor is on thc rigll side, anytlling you type
is inscrted after thc cum::nt CUDOI' position.

m2aa:ua

Move the c:urJOr ID the llnt leuer or digit in thc 1111T1c or


number.

Prcu tho [In) kq to flip lhe cursor inio insen modc.

Type !he openlDr. M.alhCAD insem lhe ~IOI' bcfore !he


rwnc or number. M.alhCAD abo u1 ... :: a placcholdcr
bcforc thc opencor and reinterprcts lhe equation accon1i.ng
to prcccdcnce, nccemry.

Move the cinor to die placebolder tllld type a t11W11e or


number ID romplete the equatlon.

Pll'ft 4 shows m f'Ulllplc: lntatlng a ll!rm be(om 111 cxiJdn&


latn.

Wh<" tM c11nor bt l!utrt lftOde, pren [In] a1at to fllp


lt baci. 0 ~nd mod4.
.'

.. f
~

.;,; .<.,J.H <) ..-.' ,-;: ~ ..::';

1 .:, \ : : _

; ' __ , -

_:_.. :.: .. :::;:: .

,: . -. . :,

_:_; _

L'<tb e&+:. j 1t1ffn=Sfii+i }s :,.;~' ;, b;bize'iri_:;'f "f'Zi1'ltn*1f"i+i .;.. H)u@'frdfiltif,ffw!diHrdkhf ;;~ lit n;}il

- ]

t , ,;;

36

Cho-2

:. a

:a 18

D :

a a. X

-X

D :

a a

l.

r....

CUMM>r,

to .

=a

:. 18

lfthe cursor Is I~ irutrt mode, MaJhCAD ltUtrts 1he new


opuaJor btfore the ating expression irutead o/a/)er.

:. l
11.. 1 to llp

n ._,.. ClrAr80r

;. l

-- . l
1

,,..,.tt .

2. rr... to
pl118 alp Won U..

Hcrc BrC some cumplca

of how IO add an O{>Crator afl.Cf a wholc

ex pression:

lf you pul Oie cun<w on a fr11<:1ion has und lypc a phu sign
(+), MalhCAD pulS lhc plus afl.Cf lhe wholc fraclion.

lf you pul thc cu"'ir on a squarc-root sign and lypc an


asterisk (*). MalhCAD puts thc mulplication aJ\er lhe
wholc squarc-rool ciprcssion.

lf you pul lhc Cur>or on a mulplicalion do1 and typc a carel


(A), MalhCAD raisc.s thc wholc product IO a powu.

Figw-c S shows an examplc: raising a producl IO a power.

:. a

a :a 11

z
0

:a

A X

~ 4: IN1ing. -

...

: 1

-l. 4

3. "'- 0&rwor to

.---:a- ia
~ ,. Je 1

:a 3

:a 1

l. l'llt cunor on t i - ln.

it .

..,............. lpe

.,, xir."'9 ......

:s 1i

Addin: an operator aner an expression


-. ;. (ax)

:. 3

11

:: 1

%. Jy,.

-ta ra!H to power.

To l<ld an opa-alot llla a wholc expcusion. CoUow d>CSC S1q>S:


Put thc cunot oa lhc lllp-lcvcl opcnla' of lho expression.

Typc the new ~


MalhCAD appcadl thc new opcntor afta lhc cxprusion,
adding pascnlbea iC nccessary to pruavc the cxisting

= ta

:. 3

1 : (a> 1

F1U in lho pi.cdloldcr to complCIO tho equation.

:a

3. Type "J" to coooplet ti..


..... t ....

[ .. 3

!~
= ! ~
L--r-

L~~;..:'.,~bK(:H

.~'. /;;;,:...W- .-,th.'k.~, , 41: ' ,


a:aUil

Put thc CW>Or in thc appropriate plau. You can pul lhe

on a nwnc or numbct. to ap>ly thc unury opa-alOr IO lhc


namc or nwnber

on thc wp-lcvcl opcralOr foc un cxprcssion, w apply thc


unary opcntor w lhe cx~cssion (thc opcraior and its
opcnnds)
on a Cunclion name, to apply wwy opcraior IO lhe
funcuon and iis argwncms

x ::

:z3

l.

"'te.o.-- ..

wr.

al,.c:.> ~. &U 1

mw1111;:iI
a :a .li

:a 3

..WJ. <d.

lt

;e 1

z. rr... "'

to n
'""'ar root to ...,.

unary O\>CIDIOC IO thc namc or cxprcssion.

figut9 7: Appytng a tqU.,.. rooc 10 .,, eapt...aaon

Figurc.s 6, 7, and 8 show sorne c:wnplcs applyin squarc roots.


rr:p:;:NEiI
a:.sta

:1- :111 1
1

:a

UI

: 3

;a 1

~- -

11..Cx> ~. lHl 1

,.
&

1.

"'t cunor o-o -

:a 1i

:. 3

z
f-~ aln(l

:a 1

Z.4Z3 1

:. 3

-l.

"'t cu.- oa

;z 1

"w to
e,uare root to

Z. p,....

x:z

~ ; z3

- . !P<> 5.llU
z

. ~ ~11-.<>

appl1

MM.

ij

2 ....... ""to
9'f\I,.. root to f

Rgure 8: "Wtrlr'MJ a IQl>W1t root ID a b\dion

AQutw 8: Applyinq a -

root tl a noma

figure 5: Ralalng ptOGJol IO -

Typc lhe kcy Cor thc unasy opcralDr. MalhCAD applics lhe

E! :J

. ~j.1'j

cursor.

e-
L . . '--~

~ !_ill
1
L -i!
c;J~
1

.e ,. ' !

!f.~'l1 l: Jll 1t~ I

Addin: unary operators


To apply a unary opcralOr likc squarc roo! or absolute value IO
an cxprcssion. follow thcse steps:

'---- .

--~

-~~~~~~~~~~~~~~~~~~~~~~~~~~

r---.-!j

ij

?h'nol't".; 1 )

E<lin EquatioN

-- -- - ~-------

.1
...
e::- -Y

expression. MadlCAO al.so acaiu a placdiolder to o with


lhe opuasor.

c.--..-,

[:a~

MalhCAD has a spccial cditin Ccature that allowa you to add ao


opcBJOr befare ot afia wholc exprcuion.

~: : [-~

- - --

t:; l=::]
~- l

.J

. . . . . . . . , . . ..

, ..

.......

. . . . . . . . . . . ...

..,..., -~r

..--,. , ..., ..

,_,~

... ... -. .- -- --.-

: :,:

~~~~~~-~~-;T0~'.~7ZJ72~:~~~22 ;::~:~-~:'.::;: :::~::":'. :::LT:'~~.j, l


Ch"l'tctl

:~::1.::;
re::.-~-~

tetlnaoperators~. ->~..kil~i:h~;~:~.~\~~-'1 ,,i~i:) i:N~'7"~~~


1 scction ~ribes how

ltll:H' "

;: u

deleie a urwy operan

Typc a ncw binary ope1a1or, MathCAD rcplaces lhc old


operaior with !he ncw ooc, rcinierprcting !he equation
ICC()fding to tllc rules o( prw:d<nce wilh !he ncw opcr11lor.

'"-1 '

l. Pul cunof'

I~

"

;~;

11!:

11t1l :Hw ... ; :1 1

h ,, J

::

a -11 oln(xl
z

le::-- --iij

1. - lll<op) lo . . 1.to
Of'9'" a t.or

1 1

.~

pl IV"

dele"' an<l n:place a binary opcraior, follow lhese st.epS:


Put thc cuno< on lho opcraior,
f're5' [Bkpl or [t>elJ, MalhCAD shows an op<raror
placthcldu (an open l><>x) in place of thc opcnuor.

;:

a-~ alnhl 5.041 1

a ' ' lY

kting ond rcpladn: nn operator: the operator


1ceholdcr

IO:

dcle1e and n:placc si op<r.llOr


dcleie part oran equation (M opcrator and onc o its
operands)

h ,, J

~--.
~i:!i

,, J

gire 9 show1 1111 cumple: clwlging an additioo to a

;l 1ln(xl

;:

3. ' " " ....... ,. to


repl aes a,.,.ator.

To 1um;/alpha inlO ; , pul lhc cunar oo the las! o In a/pila


and pres. [Blcsp] !ive times IO dclcie lhe namc. Then press
[Blcsp] once more to dclete lhc placcholder and the fraction
bar.

Figure 10 shows an example: delcting lhc dcnominaror of a

fraction .

L'i~

lfyow rklttt 1111 optrator placthcldu, MathCAD rll/IS t~


o~rands rogtrMr.

""

Deleting part oran equation


The most common deleting opcration is to deleto an oxnior
and one of its opcranch. Follow lhesc sieps:
Put !he cursor al !he end oC lhe name or number you want ID

dele le.
PrcS! (Bkap] or [Dl] IO delete the name or numbcr .
MalhCAD shows a placcholder whcre lhe number use<! ID
be.
Pre"' [DkepJ or [Dell once more. MA1hCADdclclcA1hc
placeholdcr arul tllc opcrator IO which il wu anached.

-----------*1!1111!11!._.!!. .

1Y

::

:: J

o I P"ti

Put thc cinor 111~ on lhe opcraior.

Ptcss [Blcap] or (!>el]. MalhCAD dclcle3 thc openror,

Figure 11 shows 111 example: deleting a ~uare root.

M. '.

q.

fll-1?;Jll. i11J
A

:# ti

l. :& 3

X ;:

l. l\at

a.-

"tri.."

at..,. ..r

olo<x>

!JiRVI'lft!1 1I

1 1.1 1

a :z Ui

"

,,

r.t ..,,,_ ... .,.....


1,, . '
.

. root ....... .

T.,13

=J

";~

. .
":.

)'

. .. ..1...

. ~ .

:a 1
'

I~

,, J

1a

:=

:: 1

lri.& : 1a

l ...... [llbp) s uto lot .1,i..

',~

J[~]

>
-.l~ .-: i. . .:

"

;s. 3

X ::

fi

i'' .,. _.. ~; .. ...

::.r t

: 1: f~ .__ . ,..:

~11:~-"""

'
~. I

&lph& :: 19

3. ,,._. lllkopl aralft ta


lot. ti.o tlvlllao N.r

"'

.:: ~
AvtJrO

..

i. ,....;. (~;: lla~M:AI j

.r . , . . ..

.,

:: 19

1,

' ..,..- ti...,.... root.

oln<x> 1 1

9~
~ -~

&lpM. :a Ut

)( :a 1

::J

.1

':1'

&

...
e;.~-

Deletlng a unary operator


To delete a onary opcntor, !oDow lhele sieps:

'

E- -'i!

AQv,. 9: Delellog and 191>1acing on operalDr

Toddete "+3" from the end oan cquation, put lhe cunar
on lhe 3 and press [BkepJ lwice.

~~.!~

1btn>ction.

Herc are some exampleJ or delcting part oran equation this MY:

I["-:"
I~
' :: Ui

Editing Equ1rion1

placoi.aUor.

'' De!.ung 111edonomina1Drota balon

~!~

~~r

'!I!l!lf.lllll_
'!',"
!. .,,\':'.,:'.l!.tf's!'lJ)l!'fb'~,~~;~~"~~'r,~f,',1t'Ntt'~ 9ii!t~

".! _fyf_ ~ '. }'. ., ~ 4 ~+. 1~ - ' ~

'

"' 1'

. :.

'

' .

: .

~ ~:'h '\'<Ji.>::

. . ;,; . .

1M,w" e..: .. Jt-,f\Mj1i!i1!;ild!ftl"A'W

Parentheses .

'

: ':'

..i,,,4.:.0

> :,,

IO pr=rve lhe existin& SU'UCUU'C befare making addiooal


Cldill to lho ..qllllioo

'

~-~ ~~ :--- .,

]--~-

t. ,, : ' ""''''' :,,:.<t2~


..

1
-

z
La

3.

1.

1.

Pre (Jna)

to put curaor

JllOd, ttr...n NW t.o


the fro t ot .. UI"
In lr..rt

'

lf you wllll IO roup opaations in an cquation in w1ys lhal


diffcr Crom lhe SWldard nccdencc rules. you musl add
parcnlhaes. Owuidct lhc 1<.eyllJOl<ca lllCd U> type I~ 'cquatioa:
)'OU mUSI IJUcrt parcnlhcleJ lnlO lhU acquenc:c In 1 WIY lhal
achiovea lhe duired CJ'014lin. Add 1 leA porentMaes befare lhe
flnl thin you want IO roup and a rihl parenlhuil iu lhc lul
!hin )'llll Wllll IO fl'OUP MalhCAD reroups lhc cqllfolion arid
chanes lhe dupl.a y a:oollnJy.
To inlU1 parcnlhcsel Cor roupin, Collow lhcK 11qJa:

l'rclS ( Ine) ID pul Lhc cWlOr in instn mode

--3
%

z. rr

E:1
El

E-f~l

left ,., u- 1.: (

111.~

:5

[. !1_..,)

- - . i. 11
z

caaraor.
O

"J

tt

f"I\ U\19 c::unor

---
J}

l'rul l Ine J 11p11110 pul thc cwaor bock ln appcnd moda.

l'rclS lhe rihl pllUllhcsil ley: ) . MalhCAD regroups lho

eqwition.

l
_i._

lfyo ry~ a rizltl parttUhats whe11 there Is /IO matcint


lcft part.ilusts. MIJJJCAD will not add tlu IUll'NJtclud rizlrl
parttUlusis"' tlot tq"'1do11. lnsttad, MtUhCAD ""'"' tlot
'"'"" "P 10 the /IUI lewd o{paretUJiau. You
iU
as a slior1cU1 far""'""'' fro111 OM wl of partlllhesu to
tlot llUJ ll"" tqwuio11.

'"".u

4. To 0011tplt rr.-.o.....
prMa a rl1~t ,.rentN1h: )

[11z

Mall1CAD muy hi<le parcmheses when you move lhe cursor out
oan e<uauon. Tius happcns when u.. grooping is clcar wilhout
seei ng lhe parenihese.s. Thc parenlheses are sull lhcre: if yo u
move lhe cursor bad:. inU> lhe e<uation, lhey rc:ippear so you can
cdillhcm.

--z
11 3

.'''

3. MM you .,.,,. tM ou.rsor


out, " I hCAD M d" ti

, ....u......

Matl1CAD includu a horu:u1 Cor crcatin a pair of porcnlhcsa:

u.. aposuwhc key. Whcn you JllCU lite apostrophc (' ),


Ma1hC AD puu mrenthcses around lhc appropriaic exprcssion.
AJding parc11t.hC$Cs in thU way is ju~I likc &Mltling a unary

ox:ruull. To pul parcmhescs around an expression. Collow tllCSO


Jteps:
Mnvc llic cursor U> lhe appropriaic place:

.QIDU4'.UttJ.W~J~3StMJMt1.M!i!.. . ... ..~/~ ~.-ii',-l-:{:.'-.1..! :rA:"r:~{-:~r:;: j\f. i~~::::P~.d:~~~~}:K~/!~ . ~

on a nwnc, numl>cr, OI' pWl:eholdcr, if you wanl 10 (lut

parenUIC&CI arounJ U.e IUllllO, numbcr, 06 plBCChohlef

.J~

on lhe toplcvel opcrator lor an cxm:Won, il yuu war~


pul ti' e.xprc'l.ion in parcnlheseJ

on a unction nwnc. you want LO pul Lho Cu1\CtM.m a.iM.1


irs argumcnll in parenlheseJ
Typc an aposuophe ( ). MalhCAD puts a set ar parenlhescs
arounJ lhe numbcr, ruune, placcholdcr, or cxprcssion at lhe

l. ht

f - 1ln<xl

l fl7'.'\1:

. : : 3

<: 18

;:

z
z

cm ~ .

z.

<tP -.

"""

~.IH1 1

P-.-. apoelro>loe ( '>.

h(xl 1 1

Figure 13: Adding ~ W'CIU"ld a -

11;~1:il:ffH

.i

: J

a : IW

x :l

l. ht c:urtCW

at \Md

01I

41vh l o.

kr.

~.lHl 1

l
l:l!iiifi::;;y - - - - - - -

~:J

a ; LW

.;:

111: : 1

l. Pres apoetro,M (

[}] si< xi

) ,

F~re 14: Adding pom>lhoMe around an ""~

c;w"SOI'.

~- ~ ~

Figures 13 anJ 14 show sorne cwnples oladdin parenlhesel to


ancquation.

IL._l-:.l

-_L

!:;-L_i
,. ;: ~,' ' .

::f

::1

;; J

1 ~

: : : :: .: ,,.: :::..

Preserving structure with parentheses


You may wanl IO add prarcnlhcses cvcn when lhey don'tchange
lhe cxisling sLruCturc of an equation. Once you "ve addcd a sel of
pusenthesu, you can edil inside 11..m wi1hou1 affocling anylhin
ouiside, Of edil ouiside will1ou1 al!ccling anyllting inside. 111i1
allow you 10 edil paru o tlic cquation wilhoul worryin~ lhal lhe
procc:dencc rule will cl11u1ge tl1t: suucturo.

: 1.i

e:_ r

f9u'O 12: Addinv p . . - .. .,, -OIOO

1#05-CN

~-

,,::~

.Cl

an cxpression taller than onc linc.

~e -

opcra1 ID be roo4JCd_

l'artnt~sts are shown as squar< bracuts lf they tnclose

l -

. o;. : ';; : .,.." . -:

l!.t.hlU1' l:.tutioo

E,.,-.

Movo lhc cinor 10 lhc be&if\llRI O lhc lfll llllRC, nwnbar,


or opcraior in lho upn:uioo to be poupcd.

Movc Lhc ClnOf IO Clld ol lhc lul l\lllle, numbef, 06

rr~~-=,::~=

Lr~~

3. l'ru ( loel agalo to fllp

(18

l'rclS lhc lcl1 percndlcaia kcy: (. Thia inacru a Id\


pwenlhesil bclons lllc cunor.

E=p

ThU scction dc.11::ribca bodl way IO ux parcnlheses.

Addin: ~~renthesa or :roupin:

~.:_f:

e:r1

Fiuro 12 shows an examplc.

Thctc an: IWO l'CUOOI to use percnlhclct in 1 MaibCAD


cqualioo:
IO rcroup cxistin opcntio<u in ncw ways

yq':I ,

Expandin: parts of an equation


Adding parenlhcscs is useful to cxpand plll1 of111 e<uation. Just
use lhe aposirophc U> pul pam1lhescs aroU11d part ol lhe
cquation. lhen add lO lhe exprcssion wilhin lhe pan:nlhcses.
MalhCAD expands lhal cxprcSSJon. bul does l10l disturt> lhc
suuc1urc oC lhe rcsl of the ctuauon.

. !'

'

'

..

' :J .

~ ; ;'!" .r "-.. ~i~ ~}

1.'. :W fi-1-.J

---- ~-------

.-.... .:..::.~::-:::.:"::::~: ~::' ' :::;r:0:~;;'??:;"'.?. ':::;:i;" ~. :~


Chapier 2
1 15

and 16 show !'><o CAamplcs: 01;panding lhe nwncrator


ction, and epanding a ploceholder.
~

lll

:= J

;:

& ;:

-i.

%
f

"
- '

,~

:: 1

1. Ph"" cu,...,,. cm rl -"old.,.,


1

11.S

::: u

,,

JI

~-:.!'lQ

"'-:m-?S
re ,_
_f.;.

--(~

:.r. l

:' 3

)( ::: 1

2. l1pe polMJp!.e (')

(ilJ
z .

%. trn roatrophe (').

;: J

---~ 1

' l1re z llothCAI

o.

tu,..,.lat".

15: Expendlng N "'"'""'"'ola hicon

;' J

~ [5 - .~ 11

,, 1

( :>

~:::11

,,11

i r ... _~
p__
:12

:~

1 1

:: u
19

''J=I

:rfi-i::l1

.,e

43

Edi1in&Equo1i<m11

Commands tu ut ~nd paste expmsions

nll..

.. :z: 18

:::s 3

{.z ,;n<>)

:.: \.

1. ht ...-- ""
elther ,.Nmthe1l1.

18.415 1

)( ::: 1

Co!ll'1n11,......,
lnlneqwlion.

INCUT

"

3. hre ":!-""7" n.thCM i-,.


ti ox....-alon lo the

_.n.1.
Flgv111 15: ExPMdng. placellold9r

Editing and deleting parentheses


Once you havc ento:cd a maichcd pairo( parenthcses.
MathCAD trcats them iu a unit. lf you pul !he cursor anywhere
on either parcnthesis and type an operator, MalhCAD appends
!he operator after lhe set of parcnlheses. lf yo11 pul !he cursor
anywhere on eilher parenlhesis and press (Bltap) or [Del),
MathCAD dclctes !he pair of parenthese! and reinterpre !he
equation without thern. ll's nol pos.sible 10 delete only one
parenlhesi. an<l leave lhe olher.

Figures 17 and 18 show sorne cumples.

:~

. ~z ft( >] - l 1

;:

z. r,,.

.3, ftolhCAt
P!"'NO arter \he Hl
ol' ,...... ti......

11
!!E::!~

l!J!.:::-";11

;~'.lit~
--~

;: 3

. {/ 1ln<x>) 18.415

.... .

...

l~:::t

.,.......num
lnto tianl. IJ*ll Of 1
jilaolholdor,

!: 1

'

'll

l. ht .,.,,_""
elther ,.renl1111l1.

[l'loJ I e

[ct.rl)(l'l) or
!Eal J.Aaut [.J)

[1'10) I X

[ct.rlJ!l'CJ or
[lha) .Lnpaot. [.J)

[l'lOJ I

reglon.
;, J

h<ll

1 1

::

Z. l'ren llbpl to
telele the Ml oC
...... t .......

Flgv11118: Oeleting - -

___

~~-----'[

[ct.rlJ[J'2J or
(Eaa) J.A-ior (.J)

:i
'j

To delete lnd move whole expresslon.I. U!JC lhe lnc:ul, l11rop7,


' 1
and lnputc commands. (Thc "ln".ln lhcsc romrnmxb Is short
ror "in-region." since lhcy wort within a single region.) AJ a
shoncut. you can U3e lhese commands with a single keysuol:e:
[Ctrl)[1'2] for IDC091, [Ctr1)[1'3] for IDCUI, and (Ctrl][1'4)
forlnpute

l~

~r::-:-.::::

llE1llJ

INPASTE

llE:

~~~

ii ~

Hcre are lbc steps In cualng and plSling expressions wlthin a

a :: lY

:11:1
1r..
JI
g --::m

:; lQ

ICE'fl TO TT1'l

1: :

The lncut, lncopy, and In paste comman<ll

''ll.Rolll!

.cuc.,._...111
~

Agu,. 17: Edillng .,ith - " ' -

le .. --....,.

parentMtsn

:: l i

::- ..iTJ

r-~:1--.

COMMAHOSll
TllS SECTlOM

INCOPY

:~:i~

1. ht aar9'0r a. -X"

lU

;, J

1Y

";~--,.;;!.~
---.F-

lli."'"' ..,,,,1.t":.' ~~ ''""':wi~r~;ic:'lt' .;;~,..~f r,~~~2l!i'i~:'.:\:'.~~~"1?;N".illitf.'


J1 r~ \'.:;:~:.~,;~;~~~;: r~t_(:~.t~:~~:~ ./~~~~ It~:t~L ~~~:~~~ l f .~~~~lW:f~J~i;;;iJ.~l:J~;~~~?f{~j~

Movc lhe cunor 10 the ex:reuion you W1!1l 1D cUl or copy,


a:cording 10 the following rules:

To cut or ropy a variable name or nurnber, movc !he


cunor anywhere in !he name or numbet.
To cut or copy ., exprcs.tion. movc thc cunor to thc
~leve! opctlllO ol lbe CXp!C$SOI\.

To cUl or copy a function lnd lis .-gumcnts. move lhc


cunor 10 !he function name.

!'rea (Ctr1)[1'3), 1hc lnall key, IO delctc !he exxcssion


lnd movc il to a lemponry SlOOlgc buffer. Ma!hCAD
- dcleies 1hc namc orexprcs.tion at lhe cunor. lcaving a
placeholdcr. Uyoo W111l 1D make a ropy of !he cxpres!ion in
temponry sionce whhoul dclcling it, U!JC lnrop1
<1etrinr201mleldoe111C11t.

-_-_-_-_-_-~~~~~~~~~~~~-

~!IW&WUU

. 1'~.1 . .,r. .E:)L:f>, ' \i

" ;, :. ,..;.4;_11

" ''

'dd"V fi'i.j>,. ,\. .

_ f:~
"' ]

;;;.~ ::. I

1'"

t11-..11.a l

Movc the cursor IO whcrc you ...ant IO pasie the cquation:


eithcr 111 cmpty spaco tdwcei1 rcioos oc a placeholdcr in
111 cxistin rcgon.

~-

You can pasu w sanui t.:<prtsston as man y times as


desiud by using the lnpaste ley several timts in difftrtlll
placts in yolU' tquatlons.

,. 3

;.]- . ~ r.

: l

r.. ..,

(U. , , _

.1,.1.

:a 3

!!:

:a l
l ....... !Ctrllll'3J. JlotM:IUI
QIU U.o ..
lM

...,..u ... ,,._,.., (,._

:. .;;

![

![

V :a

:a 3

f. -

a :a l8

:.

: . r. -.]l

l. ,,._ !Ctrll!f41 to
.,.... .... lut ""'

Figuro 20: Pling ,_ olljllW&lon- .........

-~::i

Chapu:r 3, "Editing Documents." u:lls how ID movc cqualions


and iext around within documcnlS. Chapcr 7, "Equations and
Compulallon,- u:Jls more aboul how MathCAD compulell
cquutio1u

!! a
!!jj

l!:c~l!:iJ

[[ !! g

.w11atcread.nexti_I . . x-' ';' ., --:2t.:r:/r''"

This chapu:r describcd how IO t<lit equations. Read thc chapu:rs


that follow for more information on cditing and on equatioiu.

[[~~-Y

;. 1

1. "'' - - ... pl-hol .....

:. 3

4l

11.(fini 1!,..u1i11n

[[ 11,. D

~ 1Q: UUlg lnout"' - ... olljllW&IQn


a :a 1i

.. ;, ..

-----

~~-r-!j

:a ut

Lft:f!

1. ht cunar o top-tevel
ror .., ........ " ....

.,.,....'"

-1

~- - ~

To pasie the cxrcssion. pus [Ctrl][r,J, the lnputc kcy.


igurci 19 and 20 show somo cumples.
.. :. 1i

_....]

;;;

---~~~

uw ~-~~ ... ..- - -

:.w. :~r .e,,,; .#1:: ~.: .:;-,,-,...,~~..-~-.-: ..: .~ .-:. -.'".::,,, -. : . b-.~I

- - - - - - - - - - - - - - - - - - - -

,..te

!f

~- !]

~t!~
JI
.. =

[l._.-~

I~

.,. . . . . ..
,

!.,

' ~ ::.~ ..:

i ' ,. ~ ::.

..~~~ l

..k~r.~;i:Xi)~w

---

.1.-,..~~

~=~-

.. :i~, ~ ~::~:-.~-.;~f~.1::LY~~:j~: ~:~::_::-':}~1~::}\Timr:1~:}'.t~1;:'.:'.:1::z;r;~1-rrt;~;;f~1:~~

. ,. .

~~;.\. ~ : ~bl 1m ~,~~-~~~.!~ ~,~ :~~~~<-~ ~"


~-~~

r.-f1 -,::

Chopt,.2

~--1

,. ,

Editing Documents

~ -~
~---~

~;::jl

i -~=--;
~

=--ii
lil__,,~

This chapcer describes how ID movo lrOUlld in doc..,,Cllts llld


cdlt lhem, incfudinc canmands that make spacc, scaroi aod
replace, loed and sa~ cut and paste. and split lhe JCrttn inio
two windows.
This chapctt contai111 lhe foflowing ..:tkm:

Cursor ltty1
Arrow keys and O!hc:r l:eJ1 to move the cuna'

~ ~- ~.J!S

Comnu111<1J to lllOff !be c..._The cotoand matt~

'.:;; --::11
1c_I

Copy, tul, and pMte


Commands IO oopy ni lllOve ~gions

Makln11pace
How IO open ~ lpllOO In a docame'1t and dcal wllh

. l.
~

,._ _:!J
-L!I
1

l-1.1."'!!
l~~~

l~
1e

~!!.-~~

~11

l ..... -~

. 11

OYCrlapping rcgionl
~andnpbla

Commands IO find text and make global dwlges

l1
;!

t
/
1!
1

Ftle commands

Loeding and saving document files


WIDdOWI

Spfit9CnlCll editlng

~~

:~.!~
1_1
''.

,1

---"'

#' -

e'

o'P' :

i'

"*"*''#3

C'

, :ti

' t

W'

f, 1

r t:!m S

d' Ir ,/L

JI'

"

.,

'1 .

.J t - r
i ~

:".

MlllhCAD ~SI!$ cursor keys (lhc keys on Lhc numcric keypad 11


thc righl of lhc keyboard) and Lhc [Tabj key IO moe Lhc cursor
bclween reioos and wilhin regions. Hcze is a comilele list of
keys llW move lh<> CW'50r.

fJ1l ll~; :

.~

(Ta.bl

1.1ow on11>(oic:lOIUiM .. opeaMd diftdOI\.

IC Y'"' uiovo '"" n11 iuM 111 ''"' rilin 11( 1hr -. ir<n. th.-. '"" 1111u.111
a;mlls lO :lhow yuu more. 'l11c pO):lhon UllltLalor at lhc LOp righl

lhe screen always indicatcs lhc cursor's CWTenl line nurnber


and column number in the documenL

o(

AfoihCAf) docUITll!nll urt numbcredfrum rhe lop /cfr. J'hc


iop liM u linc O, aNJ. lhc leftmoll colUJM iJ co/UJM O.

~~

e~

1
C~
.1

[j

(llcDoJ

......,. dowo 5 lineo 11 a lint.

l~<litPqlJpJ

........ LI> I0'4 ol PIOt

{~rlilPqllQ)

........ down ~ ol PIQI

~- .. ~

~ 1.
t. ~
~ 1.
c.._ 1i]

........ ltl lontXI li><:NrlCltr llb liop.

{~rlll-.)

l.low lt(1i lo OOll 10 d\llact llb """

1-1

Uow lo btgWril ol curren rogion. Uai'tldy 11

1
E:~
1
~. 111_ij

~-10.,_o.1ogion.

......,. lo tnd ol curren

rtQicn Molr..arly 11 tnd,

-lo~ ol""" region.


[~rlll-1

Uciov.o.norlO

(Eclqoto llno {.JI Ot

apooiad pouon"

[l:ol <J<>to l 1ne col (.JJ

Scdlobtgiri>gol~;- ClnOllo linl

1;-

llQion.

[~rll[IAdl

Scrol to tnd ol do<umonl; ..,... wnor ~ looi


IOQIOn.

,;

In IGI: 11111 ""* lno.


In oqualiun"' plal . ............. .,..... feglol\, wilh lol odgo ol rotlon.

....

e.i-~ -anar loccUM

-.ni.i

apooiad

lEo)a>v. 1Jn31 coJ, (JJ

. ...
.. __
,_ ..

r1011: 11

... 11t1-1~1

._

"'"''* ..

J : "

1w.u.:

:1 r:.
J

: "1:.:. ..1

1
"1
,
J

"

1.11111 ..... 1..1 1 - n

"= -

'

~.~..

Ji ~

... . , ...

:JSJ
.

F~u ;i .

Sor-..n .,.,

U411lij

..

116' u."'nmatw.I

The move command


The movc command ocrolls thc docurn<Jll 1 spccifioJ numbet of
lnes anti rolumn.s, laving lhc cursor 11 lhc same spo on Llie
icroen. The cuna position indicata' ctianges by lhc indicalcl

~-b

11 ~
~ r,, }.

V~,
:~.~ ,;;:~;~;
.~i,~~~:~ti~:ih<~eI
~l.};.;;::.; -~)~::
. '. :."'. ,/. ...- ",
r,
'i.~::.;.'~. i:J"r.tilf>'"''
~h,,J'r..t.f~M'.'f.;~.,,f..
:. U,,t,,:,,.~ :,.,x.~
..L,(;,.i,_,

- r\ l t
..

J :' ....

.u11y in dw: umo l(;l.-ivc


1ioili1 on L11e screen; L11e docwnent scroUs IO pul thc comx:t
linc anti colurnn 111 lhe cursor.

,,.,, ""'

H..

comuumd. Notkc 1Juu tlWl c.:unor

lfyou glw unlyone numulc 1JTtumcn1 (fur aamile, (ltcl


11oto 10 (,JJ), Mollh<' ,\/) "'""' th (WStlT h> WllUflll l)on

:-

lllllCIJlJ. . . . . . . .. .. . . . . . . . . .. . . . . .. . .1'.lllfillrn J

... 11 U l"*-1:

if you 141t thc &olo command withouJ any argumcnu ((EocJ


11oto (.JJ), MathCAlJ prumm you/or 1114 /Jnt and co/UJM
togoto,

hlthl tele......,.
:

Figure 1: Sa"'1 bolo<t .,.in( 0010 oomtnard

(Ecl 11oto 10 20 [.J)


l'gurcs 1 w1d 2 show die :IUCCO bcforc llOd Ilet usin U1e olo

"-

r-

: I fS5 1
1

JI

~ 11 .....,

..... ~1 ...

frltl-~flcl..t

For example, supposc you Wlllll IO movc thc cuna IO line 1O,
wlumn20.'l'ypo:

cu
....11 o1 ..i.-1.

1~

1no11: o

11lc 010 command moves lhe cursor LO a specified line and


column wilhin a documenl. You can spocify a lille nwnba O< a
line and column number.

1 -- .t

: 1 e.el
.. :~ 14 I

~i~

. : :i,.

1 1

MlttlllOllU a..111C

llEHU

Uovtcun.orn

I~ ~. i]

""*

'' ilgl.u!.i, ,( 1,

11

IUlllJ,l.i.l!l. . . . . . . . . . . . . . . . . . . . . . . . . .. ...:....,Trn

MOVE

11 '].

i' tt' '

L~ ~

l.low LI> 5 lintoll a W...

.1.~<'11 .-

doo.mQrllby

llop.
(llcIJpJ

' + ,bid

J\ :. 1

The goto command

"'"'
a.-regicn:-

.,,;,,

_. .........

... ! l I

GOTO

linao ll'td a>lumt..

(Hold clown [llUtt) and pr.a [Tal>).)

,, ,.,

KEYS TO TYPE

r==~!l

In
-bad< - -IOPflYOUI placoholdor.
In loxt
tqutllon OI plot.
ltl lo""" 1Cklwwltr t.lb

[SAdJ

COMMANOSIH
THIS SECTIOH

t.lbllOp.

" ' ' ,'11

Cun11111lftd1 lo muvo lllecuno ~' '\;'!' ''

"'"'

ont
IO ne"I pllai/loldtl.
~regicn:..,.. ~lo nexi 1~1CW

In loxl: l!10Yt lon..rd


In equion OI plot

[lllUft)[Tal>I

' -l

_________ -----

"''' "''"""''"

<-11ptff}

Cunurkeyit

{~di[ ...

l ' ~),
;;,~'

..

\~~,;Lft~{~:Y.~~:(if: ::.: ;(.: '.~: :1T:'d};l:;:,;~::H.: ,>,,~\ .;~, .

. ~ ; ;.....: .

,1 ;. .

,_ ,. _,,.,~.,.~.\'~~ . . :, ~ .:.~~:! ,~'/~~\~5~~;~:'.::,~: n.::: .!r:x ~~:.:


i

...---, ~- ~r' ,':~ -:.~ fi ,~x~\,. :.~~; .~~:~~ -r.; - ~.:-~, ~.:'."'.,'...J r_-,_;-'!,.'~?1_,_1~"~,,." '

'~- ~.: '.~~;~~j 1r::

.- ,

--

. .., . .. .... """ ...

1'.

E<litln& Documm"

. . .

..

.,ti. ..

' ' , " .. . . .

"'

~.

{;j

" .'

Chtpt<r)

l><r of linc.1 nd cotum"'. Po,i!lvc numhcn o[ Unes and


11u1~ ~mll l\itlwn nnd In thc righl in the ~x.ument.; negndvc
l)('H :Ktt1ll 11p 11111 lo lli.e Id\ ln 1ht: 11nt.:1unr11t.

""'"

li'W!Stll?'JljW.

[J:ll..Tl

:1. "

Jt

~
-

.
-

..

lf:l
i,. 3: -

l>odorumlf!l

fl'll or
Jltoo] out (.JI

PASTE
~flt.glon

{Fil "'
(bol paot (..J)

r101& e

[1'10)& lt

(1'101&

llJ

ir;-.

nJ 1.
aJ

You can mah multlpltcopitsof1Msa~rt1Jant,,


prt.ulnR Ir t 1stwral tima In dl/ftrtnt spots In IM
docu-nt. llowrv<r,you can pa.tttonlyt~ rtglon most '
rutntl_y cut 11r r.op1,,1, rttfrm.r pr~vlmuty Cid or copltd

r~

tlli@

ut.lng _ .. oommond

" .1
1 - . CM ,....

''

llcrc' s an cample o u.lng cut 111<1 paste. Supposc your


Mnd1CAD documcnt looks llkc Figure 4. To movc the lint
(ormul..a down bdow the definitiona o V." R. and T. move lhe
cur.;or into 1hc <quation rcgion for !he dcfinition of I' and presa
fr3 J h> cut <~ ti"' e<ua1kin. Afltt you cut out a rcglon,
Matl.CAD leav..1 !he cur>c>r ,.hct'c the uppa lcft comer crl lhe

t !mi L

This scction descri~ the copy, cut, and peste commands. To


copy, movc, or delelc a rcgon, follow lhesc steps:

Put !he cur.ior anywhcrc in lite rcgion yoo want to cut or


copy. You can cut or copy a lCXt rcgion, an cqw1tion rcgion,
ora plot rcgion.

Press (r3J (lhc cut lcey) to cut !he region from !he
documcnL Whcn you cut a rcgion, MalhCAD copies it IO
temporary SIOnlgc so you can paste it again. (U you want IO
copy !he region to temporary storage wilhout delcting it,
press (r2], lhe copy kcy.)

ll you want IO paste the region baclc into the documcnt.


move IO an cmpty spot on the .crttn and press (NI (the
pastt lccy). MalhCAD paslcs !he region wilh iu upper lcft
comer at lhc cum:nt cu~ l'O'ition.

M
-

Let.

r :. ,,.,

- 1

.....

L(,tal

Ma1hCAD provides sevcml ba.,ic gruu~ of commanlis fuc


nMivlnK rr.gioM M<~1n11. r.opy, rnl, fttul pPI drk1r. anti move
rcgion: ln11trttlnt nnd dtltltllnt crcatc or rcmovc h~111k tlnc1
In a documcnt. 311d rtdlplay an<l Mparate dcal with
ovedapping rcgions.

t ,._.. 1 : . --.e

WlWIMtt ...

rrgion 111td to ho (Plv.urn '.\).

JMN.

( ...... , ... 1

t.L

Co111111111111' lo movr rr:lon~

..

no lonxer avalable.

'

f1tol oopr J.JI

r..-- -i1
.

!L. mj

ooPod.

:JSJ
........
:

(1'2)

.,,..~

Jl'9YIOU.tyo.Aor

..-~
u- ...
u ... .,

or

....... oopr wtd'ru

OelelO l r>Qion"""'

...HU

KtYft TO !Yrt

COPY

CUT

~ -10 [..J)

cur,.weiKl.suponline 15,column 10(FiKwc3).

.. __
.1-t

COMMANO~tf

t1n!itC110N

'""JXl"'

:>nmplc,
!he mcs.,.gc line shows that the cunor is
ne 10, coh11111\ ]O. &.1 in Figure 2. To move thc cunor down
'"A' ami 1cn 10 tolumns in 1he docnmcnt. type:
(llac)

Copy,cut,and paste), .~"~ d ;~~'u:> ,1<,.<,h

.....

Mlat

-u
11

.... -.

... 1

tat..m -

gie ....

, ,. --;-J

floo,.. 5: Ahor uolnQ lrJI to <llA ou1 fMt ""'"'"''"

e~
1 t L

l(ll>e.v ard presa (NI.

... u

Ltt.

J ll I I .~--

Now move lhc cunor down ID whetc yoo want lhc e<~1&on ID
MalhCAD pu"'s the <quation into the
docurncnt (l~gure 6).

1 l"2 1

'.t.

lllJILCMLlll

&-1~1

WtWl.ttl._

al U.

L<.litJ

. . . 111

Mlall

-u .....-.
111

Flgut9 4: A document befan> c:u!llng out the f'nl -otion

... 1 llUZS-

......
Lat.

'ta tlmL

! , .. . . . . : . mr:&I--

........'

(a lh

' ! ,,., .

-, :--

'
1

Mt w1.cua 1

u.

. . . .

LIC.J.J

-'11

-u ., ... _.'
111

~ 8: AJW U'll 1141 b p.,,.

...-1n1o

- m:ull~lr
1

the docut.-l

a H

t
'j

------------------- ~!l
_,;

- -

. . , +J

:~;:~:::~,1Tr:;2;:,:"::: !f; -. (:~~."~:.~~~-.

ki~:;~

hiCt + b d
1

,;_ .:

$2 .

In paJliAI reiollS, 'JOM C4'I s~tnes obscwe otlou


rtgions or pares o/ rtfio/IS. Use IM rtdraw commOIUI,
[ctrl)R. to bt"ill1 tJie display "P"' do.Je. To s<paral
owr/appin1 reglo11S,...., tloe aeparate commOIUI. Set tloe
llLll uction for a ducrip1ion of rloes commands.

;,J

ChaptcJ3

Maklngspoce-

. . .:

: '\'( ':

'''\{.

,.,.,-:r >:,

COllMAHDSll
TKSSECTION

ltfY1TOTYPE

llEHU

~ 1 ...

'-='r::_-r

k'IM1tb1WW.in1

""""'.....

[ctrl)lnJ "'
[ICol ino-rtli.ne (..J)

[l'lOJI: I

LI

(ctrll!FlOI ot
[ICoo) debt.li.ne [..J)

(FlOIE D

(ICol -parate (..J)

(rlOllC 1

DELETELINE

................

OtiololAonl:-

SEPARATE
llepw111~

NQKI' .,.

-..-

..................
REDISPLAY

trio a

lctrllll "'
(llool r..d.J.oploy (.JI

ll

i (. .

'

--------- - - ---- - - - -

,.,..-r_.:-,..,-.._.: .

-......----.-

'

- --

.. .

.:~~;_:.'~:;.. _,:~
;:;;

'j."u o "" 'el""iHhF Ma 'f""

r1=

IC !:!

![

iJ

[[ .'

Jnscrtin and dclclin: lne5

""h

To insal oc dclcLC space in your documcnu, use lhe lnsutlloe


lnd dektdlne commamh, Press [Ctrll(l'!I) (lhc lnsutline
kcy) to inscrt blank lincs in a document. Prcss (CtrlJ[l'lOJ (lhc
dtl<tdlne uy) 10 dclcLC blank linos nxn a 1.lo<:u111oot.

Foc ClUllllplc, look back at Figure 6. The rcgions around lhc

spacc

equation for I' are crowdcd togelhcr. To add


bclow lhc
equation roe/', put lhe cursor on lhe line bclow 11 : arvl prcss
(CtrlJ(r!I). lfyou hold down the [Ctrl) key and prcss [r!IJ
lhru times, lhe screen looks likc Figure 7.

!....:=~

[[ i.

~-;
1

~-:ij

[- L3

..

.. -

_ .,

tf .

IDOI.

...

.:;~~:.~=-=~~:::-------

.,;, ;

~: ..

\g

. .....

Y : . 1.ML

: J l 1 t

...

_,

.IBZllS6.l- -

~J

;. 1 1

...

_,

1 : . ~---

f : . :ITJ I

r : :JT.1 1
r 1. m at.

hl U

r : - -

u.1\ Wl11Hl.-

U.

, 1.ltlt.

... IUI

1.1 c .1.>

-U

-''

......-.

.-.. l&Lm -

U.1\ Wl-' ll t.M


w IL
a..ot
- n
F1Qu,. 7: /UW loooning lhrff blank llnM

F\gu<e 8 : IJW dol..ung twlk llnM

Whcn you press lhe insertline uy, MathCAD pushcs ali regions
thc rcgioru bovc thc curoor 11nd the rcgions below Oie cUI>OI'.
(A rcgion is considcrcd below the cursor if ita upper lcfl comct
is to the right of the cursor oc below iL)
fo do~ up emply spacc in u doc umcnt. move 1hc ClU1IOI" \O a

bt..nk line an<I prcss )Ctrl)(J'lO ). TI1is is tl1c deletcllne.kcy,


which revenes lhe efect of the lnsertline kcy: MalhCAD
dcleu:s the blank linc, rnoving lhe rcgions below it up onc line.
Foc c.umple, to delete the empty space undcr the title in Figwc
7, move lhe cursor therc, hold down the [Ct r l ] kcy, and prcss
[rlO] aew limes (Figure 8).
l'rtssilti [ctrl][rlO] has no ef!tcl on a /ine rhal
coincides witlo rloe wp ofa t1gion. This pre~llLS youfrom
u.sing [Ctrl][Fl0] 14 make rtgions o~rlap one anotloer.

Separatn: overla.ppng regions


M you movc and cilit thc rcgioru in a M uu.CAD <kx:umcnt.
they may cnd up ovcrlapping one anothu. J you ITlllU changc.1
that cause crrors in an equation, lhe enur rncssagc.1 may ovcrl>
othcr rcgion~ on 1he screcn. Overlappit1" rt:g imL tkwl'I intcrfere
wilh eai.:h mhct' 1 cAlculMaons. btu thcy li..J nuskL Uocumc.nu twr.J

to Wldcrsland.

To scparai.e ali ovcrlapping rcgioos, use the upante cocnmand.


Whcrcvcr 1wo rcgions ovo-la>, lhe wpanl< command will
move onc or the rcgions. along wilh evcrylhing below it, down
until it no longcr ovcrlaps with the odJa" region.

Warninf. Tloe s<fXll'al< command can liovtfarrtac!Uni

effecu, sinct it can movt '"""Y rtgions '" rhe doc1UMnt. lf


)"U wan1[111er control, titloer

tL tloe in.str tliae comtnaNi


to add spact or ctU aNI pasr~ rloe t qua!W.; so rhey don' r
o~rlap. For uamp/e, 10 st parart twO over/appiltg rtgiof<S,
ptU IM cwsor on the top line of tloe lowu of
rwo rtgiof<S
aNI illSITI blank lines U11til bocio rtgions are fwlly visiblt .

,.,,

Figure 9 shows a document wilh sorne ovcrlapping rcgions. This


CigUIO shows lhe boxcs that define thc rcgion boundarlGl so you

:..J

.( "

N
r:,..-vPI' fi~ -~~lt~. r.;-."W'?
",' Af.
-' b.T..49$9.I<

>~DGff.fAFWfW.;Pt; i.4.t?P.mn,4R.,T,C,"' --'t::<l"'lllf~i.


.
"'I .-...?

..

Lata

r'""
~:.; l -'.""1

, _;

UM

....,
r : -

~,.

~=t

-~

Y i a L

.. ':-'::!
~
~

--~; ~ --

~PW
IKAL gm 1.111

bclo w Lhe curso r down onc line. Ti s opens up space betwecn


..: ~;i

:.::,_::: ,.

Editin Docummll

;;: .

INSERTUNE

.V

---~- -

WU.
-.. 4 -.4. iPfJA ....

f ""' , , ,.,.

1.\1 .

------- - - e

t~~T:!~~~~f'.7PF~'~;,;;-:~Y~'.:':~r'~',~:'~'n'''3:~
'"""3

~
can sec how lhe rcgions OYCrlap. To scperate lhe ovcrlapping
rcgiom, typc:
(EecJ . . parat. (J]

Figure 10 shoW1 how MathCAD scparnies thc rcgions.

1Cil "'t ilii!!llli:.l

1 ... il_.-e\lo hon!b J

Redisplaying the screen ar'ter error mcssages


If you gencrate an error whcn rcgions are closc IOgcthcr in a
documen~ the error mcssages for onc cqunon may obscurc
othcr rcgions on the scrccn. You can fu this problcm by editing
lhe cquaon that caused the error.

Afltt you fix the problcm, you may havc to use [Ctrl]R (lhc
ttdlsplay command) IO show thc paru of cquaons that had
b<en obscurcd. When you typc (ctrlJP., MathCAD redisplays
cverything on the scrccn.
lf you want to sclJ3flllC thc error me.o;sages from lhe cquaons
they ovcrlap, use the lnstttllnc command. Don'! use the
1eparatc command to scperate regions with error messages;
when you lll thc mun, thc cquaons will havc large gaps
betwecn thern.

-TI.
J! .... -;)
- 1-

1~

:-q

l~"fl

'.\'-fMT'UIW

lflml ..1'1

51,.,...th 1i1mJJiJ

Av-- 10: Ar... ..,,"""11 N "'O-

11

Searc:h 1uid repise~ , \.


COMMAHOSIN
T1tS SECTIOH

. . ,
-..Sii

KETSTOTTPE

SEARCH
trld1eI1crn.nen
doclmtnl.

ot

JI :a 191l
.. : lt I

(ctrlJ(1'5J Of
~ocJ ..arch teirt [.J) Of
(J:oc) ..arch -tut (.JJ

[rlO)Z

M : lt I
lll lW"

F\

:a . 1

REPLACE

a..n ti
, ... ...
.

To search for a string of characten, use (ctrlJ[r5], thc 1ttttb


kcy. For cumple, to ocarch for ali i~ of lhe leuen lb in
a document, type:

g::!_y
~-:-~

w..1111,. r.-.:a

trtctloa cm(flct-t

flopilcfapocifood
mttriflnrwllll

(ctrl)[J'IJ or
~o! replaoe Cut cut (.JI

(J'lO)Z A

,_

C-to-w

,';

lb [.JJ

MathCAD scarche1 forwanl from thc cU1TCnt cursor posltlon for


a region coolllining thc lctten lb, whcthcr in te.t or in m
cquation. 1f it !inds such a region, it moves thc cunor IO it and
prompts you to .ce ifyou want to ocarch furthcr (Figure 11).

:ar
J

fz1

t.-

..

.-.,. .. .....
..

Yoa can respond to !he prompt on dtc m=age linc by typing:


+to sean:h for the next lmtance o( thc string
- 10 :an:h backMrd for tite ncxt lrutancc of lhc Slring

..Yodler dlaxter (for eumplc, .. arrow tty) to stop

ICllCChin

iCtrlJlr5J
MalhCAD promptJ you fot a strlng to oearch for. Type:

Jl

lt :a

tlJ!tairlal:

J ,. 1 . 11

fW.tl:

tHhl ..Wc1 -

Figuro 11: s...cting lar a xt 1"1;

d~
1

,...,, .. ot ....11
"'' .t tan

1 :a -"(llS .,tJ

'

_,,,_

llUl"""'IU -tic

llEllU

~~

~-!~]

1-1-11-1

s~

Editing Doc:UJ1-.:;;1-.,

MathCAD's search and replacc commands work in bodl tet and


cquations. When you scarch for a stting of chanlcu:rs, MathCAD
looks for that string as a variable or function namc in in
oquation oras text in a text region or text bend.

~:.:;)

~ !-!:l

. . . . 1.

; , ... IJ~~ .... ~\,~,.~1~~,:~"'(;,,:

~.:::~;:~: ;.};:~=~~;~~&g~~ff~~~.$L~~:.~~~i~~1

The search command

g-:.]

~
,_,.,.

" l'- ' :.

L .i

--- .. ---- 1

.1
1cfl
.:1

~-- ]

Flgln G: Ooonnenl- ~NO-

. ,. ;

[r-:- -J

E_-J

~m1

rtilwi!Uiii1Ii1

.
19-;j

[:5~<::~~ ~;!': :: r:t,:

--

I~ you

precede the tell sning wlth a minu. sign. MiiihCAD ..;u


scarching ba:k wri For c:u.mple, to JCM<:h bncbaro Crom
the cunor for thc leuen frlcdo11, typc:

lt.lr1

[ctrlJ[r5J
-trietioo [J]

MathCAD scarches ba:l:ward Cor frlctlo11. Press -

to

continue

11CarChing, + IO m-cne di=tion. or any other key to stop.


Wanalrrt. TM onn:b commtJJtd Is cau-mutrlw.
Lowcrc<Ut ltttcrs In IM S<arch sirtn1 da not match

.,,,,.rc1JS#: lettu1 U. r/w doc,.,,..,,t.

Sellrch and

repl~

To .can:h lllCf replico.- (CtrlJ[UI. thc ttplK< l:ey.


MlithCAD Mwaya rept.cea startin& rrom ihc current cunar

P<"ltlon.

~
.

~1

.;.~

dt

!h

'"

.~: .;:.'')

# '

' ~ t

..,

: ...,

.,,,

,
>

f 'b

:l

\t:

b"

,,

W*MW'
j

,'\te

For cumple, IO rcplacc iNw>cCI o( the name uc with s, rypc:


[etilllr'I

MalhCAD promps widl Searcla Cor. J'ype:

;. u.

'

Type y ("'yul IO 11:place lhb l\llance and o on IO tlic ne.u


onc.

;a -

:.311 ...

:. Lm

1Mlh1 Mlosltt .....

.. '". -r J .. ,......r J

.........-

:a 1

lt..rl _.,_ ........

: 1

... -.1...u

Tyvc D \110") IO aip lhi in1u1n<CJ and o OI, IO ll~ 11Cll

ano.

Type q ("quilj IO ak.ip lhil lllllallal and 110p sc.vchin.

Type a ("allj IO rq>laco LhiJ inilanc<S and ali~


l\IWU. wilhoul lunhu promptin.

.
'

:. -t.1

1L :

... ,._

.......

.r .,... u,

~: 3
r=:3
:E - 3
:[_. .1i :E.

I E.-J~3

111

:. Lll-

:Ej 3
l[_;(':J
1 11 ~

l .. lhl Mlml\t W

.. -r1..,. ....r1

'

'Y" 1J. A.plwM\Q .. Wlltw.... ol o.o wHh

._t..

:. u. .. ;.u

WUal i11u-

~o

Mt'

~,.u

111

L:

E~3

l.ttlI CDMttl-

MathCAD scan:hc.I far lhc f!ISI insWlee of thc namc 11tc in ICXI
orinan cquation and movca lhc cursor LO iL TilC prompt ll thc
IOp of th... :'rcn (Fiun: 11) ahow1 yoor choicca:

!'.!

"'1tJectlh Jtotl"

W w.r ulte

Tbw MathCAD l'Olnpll with Rcplact wllll: . Type:

..........

_j ',,"'--..-;..-r. '""'

.W l'M:I

lt1fll!t .1.111!

a.llhUc. -

a.111.u- - rw-.J-UI

>o

'"!''"')

'6.

. kvt

''[ 1
~
11 -

-u-., ..

1,i.

[ ;,

.......1... u.e1.-1"'

..

'l ~=l~
t-.J~ -~

12: C00"'4o-uoitig ~

l'iuro IJ ahowa lho .-11 ul cJioosin in l'iwc 12.

l..

IO Pf)IPff N ., .,..tl~M' M 'l.

e\

A4

>ti

en

>I

'

tf

' +

--?
]

-g

< ' H

* "

1:.1; ...., o ...,..... ....

MalhCAD complmly wilhou1 reloading lhe conligurntion file,


use lhe rucl command. Typc:

FlleCl!rrinandg,.,;:1"'*"';"~ "''~'"''~i 'l:w~~'MW, :( .,.,


COMMANDS IN

T!US SECllON

(ll\acJ rt (..JI

llEHU

KEYS TOTYPE

CLEAR
CIOOl'""""t

[ll\o] ol.. .r [..J]

[r1or e

[lt_a o]nat [..J]

1r101r a

documtrnandr~

MalhCAD clcars thc CUJTCRI documcni and, inslad of rcloading


lhe conliguration file, rcstores M.aillCAD IO all lhe sun<l:lrd
system dcfoulls.

Qlflfig1.nb0nfi&I.

RES ET
Ro.o<"'""'
document
dtl
.... '"'"' "'

LOAD

nor L

l.o.OOwmn

[r~J

lromadl<i W..

(EoJ load tt lnrn ur


t.trnme (..J)

Df

SV
S.vtut..
dottxtlt11thU. r"'

[rlj

OI

lltoJ rl

ltrnm

.1J

1no1r

APPENO
~""il.io

"'""'dowmonl

(Eol PP-nd ( l l e n m1t or


t.trn .. me (J)

1no1r

Loading and saving documenl files


MalhCAD saves documents in files on your disk so you CJlll
rctricvc or edil lhem IJUtr. Prcss [r6 J (thc savc kcy) or use ll>e
save command w savc your woO; in a di>k lile, Prcss [ 11'~ 1 (thc
loud kcy) or use tl>e lo11d comnumd lO looJ an c.isiing
M;it11CAD di>lr. file. l101h 1hc c<n111u11d mi !he 111..d
command prompl for a ftlcname.
M nthC AU nrnlrn lnrul, p1ttl1111u11n wrll 111 filrmvu n . You uu~
1pct:1 fy 1fo;k nnd d11cc.:tncy rmmcs, for cx:u11 plc,
t::\l.X.X.:.~'LUUJ" Me .'IJ, i11 1npu11\0 lo 1hc, Jlft1111t111 ft tht1 lcwul,
savr, and append command.s.

llw: la.si fik.name loadcd or s.ave<l a ppc..a~ 1.1 thc cuncnl


lilcnunic 111 the lcfl of 1hc m= gc line (s. FiKure 14 ).
MntJ1C AlJ u .~ lhiJ lilcn.-m c u a lld ~uh . Wlu:n yoo U .l t(; ti~
u ve command, Mall1CAD shows lhe defaull filenamc aflu Lhc
pmmpt Savr u:. To MiVC th.c documc.ll urnlcr thc: dd a uh
filcname.Ju~1 wc.u (.JI. To U'VC ti umkl aoothcs na.me, hold
down [ BaclcSpaceJ IO cn,;c lhe curren& f~cname M\d cntcr L..,
ncw tilcnan>e.

Clearin: and rescttn:


To clur the cnrrcnt cJoc.;wnc.nl anJ 1uut uva wilh a bhulk
documeni. lypc:

(ltc] olear (.J]


(Allcmativcly, 1ypc (rl.OJ r C U> !<'lect Clur frrnn 1hc File
menu,) lf you havc made chunges to lltc curren& documcn1 stnc.C
U>e las! time you savcd il, Mall>CAD prompu you lO mue sure
you wanl to clcar il. You may wam to savc lltc 00.:uincnt (using
(r6], as dcscribc<i'bclow) bcforc you clcar iL

Onct >"" have cleared a docWT1CnJ, yoM CtlllJIOI r<cover any


changes madt sinct the /a.11 time )'QM :saw:d.
11,c cl~ar conmuu1ll au1t11nu1il:illy rcloutb ll1e t:tmiKurallNI filo.
)111 u i/ you l1111l 1es11111cd Mall1CAD. lf you ww11 io ckut

,,- *''

"*"."f'i'

#,

- w ..,...i....~--...::....-_.....

?f- 44EW ' . ; C


.UQ,\WWWrq e

*' o

u: e

'

'

__ _ _ ....

____. '...

__..

,~~

.,,..

,,

_.,

. ,.

..

------~-- - ----,...- - ~ ,

>

,, ,,

....

_.

, . , , 11

. ..
.'&' .:. ..

. ..

"'

.. .

~
.;:::::-:;J
l11pttt l

- ~- :_ ~
llR..flll Of MortOllU ..-1.-0
...._011

or

"'"1111)91\.1

_.oc;,

.... ,., -"-

" : .- I~
. . : 14 l
M I 11 I

":
'

1
I ...

"., .. ,,, .....i.

,...., .r

JH......

,_
..
,._.u..:

....,,.

jI

~ 14: lMa.<'""',.._ _

IUll D. 111.D

... :. 11
" : i

c.nstJM.te
1ftl.tr:~
'1>U. rr:t

1 -

1
I

I ft UB ....)

l.tU ..Me

....

ft : .......

._.
_,.
,_
,...,..u.:

..

-- - ~ "
..

Jl

txJtn.rion yo 1~cif1.
/fyo saw to afl/tlfOmt //ial alrtady aistson tht dJJ};,
MothCAD prompU IO mt1U sur yo wa/11 ro awrwritt tht

j \ : . . .. . . .

I l

~-~..F\tfl
1;

Flgu.. 15: Sa<lllng dl<r.tory

You uin move thc cursor up and down in thl.s director)' as you
would in a menu. lf !hctt: m more files thlln fil on !he sctten,
MnlhCAD lcl you scroll lo new ones wilh lhe arrow lteys or
[PcUpl and [PcDn]. To .clccl a rilcname, movc thc cursor 10
thc rilcname and prcss [.JJ.
To U!C thc dilcctory saolling fcntun:, fint U3C thc load or
apitnd command. Then. when MathCAD prompts you for a
menarne, cota one of lhe following:

The namc of a diiectory. MalhCAD shows ali .MCD mes in

u;iJtingfll.

lhal ditt:elOf}'.

lf yo art currtntly tdltlng a docwnt!"' anti JO try to load


a lltW one . MaihCAfJ ,xompu you to bt sur yo W011t 10
discard tht currt1t1 doc~lll and reploct 11 011 tht scrttll

A swnarnc (that is, a name using thc DOS wildcards 1 Cor

with tht docwnLlll yo asltd to load. lfyo load rht ntW


filt. MothCAfJ di.!cardJ tht [lit'!<' IWrt tdlring.

Nolhing; jusi prcss (.J] without 1yping any name. MathCAD


shows ali .MCD rile$ in thc curren! director)'.

one charaeter and * for severa! charocten). MathCAO


shows ali files thal mau:h thal swnamc.

The scrolling directory

The ap~nd command

(( you don't k.now !he filename you W111lt IO lood, yoo can use
MnthCAD's 1crolllnt dlr.ctor;t fearun: IO find a me on lhe di.t.
When MathCAD proinpt.! yuu !OJ 1 rilcname.1ype and prcu
{.JJ. MathCAD show1 a li!l o ali lhe MCD files in lhe curren1

To combine document.s. U3C thc apptnd command. To append a


document rilo IO thc end of.the documenl you.,., currently
editing, typc:

IT:'.':.---t~

[&ac] append (.J]

.[ - .!IJ

. 1

-~

'[

r:::!il
ill

!:""- -

lb:iahntt

.,..,...u

lfyo don'/ Jf'/fytJll UUnJlon, MtJihCAfJ ap~nds tht


uwuton .w n toan1fllmomc yo Nltfor loadlnt and
.ravllt. lf yo tnttr a filtMMt wtth a difltr<lll txltn.rion
(for tx.amplt . UNTf'.Ull!P), MathCAfJ 11.1ts tht MMt anti

llhl _.,lal -

J : 1
l

.....att.elopiollof lhol<ftI

....

J ....._
"' .. _
f0f'"C9
tlOIA!not..t

at'1.rtet

.... tl h1t..,..a1:

J : .....
1

. . : U

: .1

..uu-1.....,.11
~t

41~

"'"'""''~
frhll OMCrtch..t

.n

,. :

L-.
r-!1 ~

=- .!])
t.

F-w -.!)
C-. -

E:.:: .ij

~!~
c!liJ
.1
E-..
1

59

f;li1in Documn1,.

Tiien enter thc name o< lhe MathCAD disk file. MathCAD adds
thc document file IO thc end of the curren! documenL
Yuu cn u.e the apptnd commnd to combine .ovcral
documcn11 lnlO orr. long documenL

Wlnduws
COMMAHOStl

--

TltlSE CTION

SPUT

......

."' _

un ron"

MEHU

(r'7) ,,,
[Koo] oplU (.J)

[rlo) w

lhpllt~

(~r.J{J"I)

(J'lO JW O

--"'-

ar
[ho)Dnpllt. (.J)

(J'tl et
(Kao) ewit.oh [..J)

(J'lO I W J

~\ ..,_

..

~
....... ..,.a1
UNSPUT

__..,.al

bono>Tl-.

SWITCH

......

Splittlng the 9Crttn


Whcn MathCAD swu up. thtte , only one document on lhe
tc:rCICI\. By splittins die llCrtell, you can view and edil n.o

.
1

clocumenlJ at once. To split lhe ta=1, preu (r7 J (lhe 1pll1 tcy)
or use thc 11pllt CXll!lrrund. MathCAD splits the 9C1ttll iruo two ' I
'Windows by aeating a IOCOnd messagc li re 11 the cmttnt cur90f
posilioo (Figiro 16). 1be lop window shows lile doc..nent you
werc womna on. 1be canor movea to thc boclOm window.
whcre lhcrc is a new empty docwnenL

j M athCAD olwayt 1t11n1 w boaom wtndow t "'41111al


calcidOl>" llflO<:k. To calcwlatt,
cwsor to tht
borrom wlNlow tutti ~u t/lt ale! ley. [r9 J

'"""'he

~:.;~

~
t _- l .l_-:2
L.~

- ,1 .

1.

=-~-~

. ..1,f. xi~ .;~;;;:Nrit .~2~~:.;,,;.L~.i;~} . .


. .
r
~~~===-===::::~::1d
~ :;.:J, f:=y~
... ...........
~1~
----- ,,,..............,;;,.&... ;,

-..r111 ti UllUIU- - l l C

:
.. : 11

n :.

.,

111-1w-

--ca..
o/...._,
..w1 ...

,~.,, 11.oe
Wl"f (ora

(rleil...,.tl.t.t

I - IC~

Warnlnt. Do llOl lry to edil tire samt documtnl In both


willdows. Although MathCAD allows you 10 load and edil
lht sanv docwnLnt in bmh wiltdows. il trtats tllCh wifkiaw
as a separate tdlting sesslon. Tht changes you 1n1..U In"~
wtnJow are not rtflected In tht othtr wlndow. lf you edil
1ht same documenl in both wi"'1ows, you crcate lwo
INc1mu11il>it vtr.f imu of tN .umv. 11cun"'"'

h.UlI ..WI

When you cut 1 teMm tom a tlocument, you c;;m paste ic


anywherc, eithct in tJM: same docun1c11l tw 1n authcr ,1<x:u1ucnt.
IC you split lhc screcn inlo two wimlows and pul diffcreni
doc.:u111cn1 in NM.:h window. you can u~ cu1 ami pinLr. lo ropy
rcgions rom one tJocumcnt to no1her. h's oh.en cuuvc111c:.111. &o
collcct common eqwuions or unil delini1ions in a "library"
documcnL Whcn you llOC<l onc of lhesc cxuations, spli1 lhc
ICrten, load lhc librvy document. and pa.sle lhc desi!W equation
inlO your documcnL

(lbc IWllda kcy)

' -

lM swildl command.

Edil in cilhu window. Movc lhc cw... IO lho dWrcd

window and suut typia. You can lo9d, savc, and clcar
clocwnenll in cacb wiadow indcpendenlly, Eacb window
ecroliJ indcpcndenlly.
Chango lhc ldaliw siJica ol lhc windowa by moving lhc
ICCOlld mcuagc line. MoYC lhc cursor IO lhe line whecc you
wani io spli1 lhc s:rcaa and prcu [rl Jaain. MalhCAD
moves lhc sccond incaae lino lhal divida lhe two

:~

J-

- ..
:

Text

[ . 1~
,

e~ ~

Texl in MAthCAO lk..:u1ncn lJ COIOCI m two v.111lclic..a:

E- :3

L ~

f"

1~

C r~
L ~

e_

Tul bands are seis o linc.> in your documcm dcvo1c


cxclusively lO lel L Tocrcale a le.\l band, lypc (Ctrl JT.
Tc xt bands behave more likc a con vc.ntional lext editor r1
wonJ>roccssing prugrum . Te.u bam1s urc uppropria1e orlarger arcas of texi. such as tltUSC in a rcport or lCChnicaJ

wper.

Ua.splil lhc screen. Togo back IO a single window, presa

'ffxt n1tlon1 aro x.m.111 an:..as in a lk X:umC"m 1J11H conwin


texL To creale a texl rcgion, lypc a douolc-4uo1c (" ), Tol
n:~ions are hcl pul for polling commcnu and la beis among

This chnp1er describes ways lO crca1e and use texl regioru and
IC.\t bands in your MaihCA D JocumcnlJ. This chaplcr also
dc.scribel MalhCAD 's texHditing foa1ures, incluing !e.a~
Cor cuuing and pasting pi~ of LCXL

[;~

e!~

thc (.(uu11on111uJ plou 1111 MouliC'AD1Lcx11mcuc.

:3

windows.
[CtrlJ[r7J (Lhe unsplil key) oc use lhc unsplil command.
MalhCAD discanlJ !he documcn1 in lhc bou.om window and
cxpandl lhc lOp window 10 fill lhc wholc saccn. IC you havc
1lOI savcd lhc documml in lhc bouan window, MalhCAD
prompu you lO make s.n you wan1 lO discard iL

e~~

ljUIW 1': 6111 IO-'l """' - -

"""' you havo spli1 lhc screcn, you can do any o lhc Collowing:
Movc lile cw'' Crom onc window lO lhc 01bu. Prcu (raJ

:O".w\.r.4: .. ~

This chllpter includcs lhc Collowing scctioos:

Tu:tnglons
Uing small piccc.1 ol le.\l u IJlhels and notu
Tv:tbands

Cscating bands o ICXI tliat ww:h across lhe documcnt

i :3.

Tv:t motioo commands


Comrnands for moving around in ltxl

E~

Tv:t edltin commands

1-

Commands for delcting, copying, moving, and uni.ering

pieces O ICXI

[;_. -=B

t~~ : !J

& UZ(PJ?

Z#lii&.14 . 4.. G . A. .. 4 : P 5 kt 11

J.

#- I
..

'h"GilUSrwY?TS~~:s:"Jti;;: ;9~} -

-- -;nions ~~~~ .....~' ~- ~"; ~~: ~ ; .lff ~i:~~ ~~~~Jt::: 'i~


:ction cleocn"beS hDw to cate te 1'egOllS ...i how 11> use
:AD's 1.1111J1T1-.ir: ...,,.i WT"al>-

tingatext~
ogions 11e deSigi>od to haid smal1 bits o{ tal. Tcitl regionl
eful Cor~ bbels or cocnmeats to appcs around and
1 lhe "'l1'9Ol'S llld ploCs ill 'fOVJf doc;unalC. (l!
~ lO
rith ~ JllD(JQlllS o( 1eXt.. - te bsn<1s. .. dclcnDcd in
XI soction.)
:;ate a IW~prca !he~ kEy ().
CAD sho.., you a U ol double-quo4C marta at the
111 cunor posi tioa (fig= 1). These doublo-quOIC maru
!lCfll the bcgittnin& anl lhc cnd o( die text region; yoa rype
~ them. ~O UCZIS ~ )'Oll IJPC bctweCft
qQOle nwb as a te commenc..

'"

:W# 1'.WMfWI

wwwWWW

....,... . . ..a...............~~
lllWU

........

Chop<.

To "'JI> typin& IOI md lta\'e the IOI n:gion, jusi me the mrow
~ IO movc the cunor
o{ die ICXI region.

"'

To cdit an citisting text regioo. movc the cunof bsclc in11> lhc
r.r:xt rcgion and inscn or dcle1e 1ext. (Funhc:r cditing commmids
..-e dc:ocribcd in the ..:aiorl oa "!citt cdiling command.1" lacer in
thischa~.

_,

l'\,Oll"""""

..
'"

:. u

, _ _ !

DI !

..
.....

.ft

: .M't

......-. u. ,....,.. ,..,.

;t.l

.1---

... ,,.,.,,_.,,,.,.,,_,.~i..,.."""'1CAD--

_,

roo iype in a te<t rqion. MathCAD insertS iex1 at the cunor


1 moves !he sccood doublo-cuOIC ID ll1llke room

ror !he IOL

rnc1t ... t

t.

1m

:l.'l

~~

E_!-3
g

:..~

.-1.i._

,-1
L.:

:u.
.. :.u

..
-

.... :.1-f;gufw 2: Tert ~ -

a hotd llne -

: .11

: .111

':t.1-1

6.3

"'"" lhe

CWlllr t:1

it md prcsw

[Del].
n,m rJlllftl

n- ...._

U}'Oll SIJllt the 1ext reion ~ ~ colmnn Olnd


thrce c:oh:mns 10 tbe Id\ ol e line lcngtll. Mal.bCAD sets

U you SIJllt within dlnle colamm ol tbc liae lcngtb or


beyond it, thcn MMbCAD CSW1CX lel me "'tlll tl>lt!in 10

lhe wnp margin IO coincide wilJI !be line le%1gtll.

coincide wilh the 1ioe lcngtll. lnste2d. MlfbCAD 9CO !be


wrap ms-gin lhnl the widdl o{ !be ICXl regiOI is "
columns, ~ " is !be line lenglb..

'

Whcn wrapplng lex1, MalhCAD oar:mptl IO b=k lines the


1pOCCS bctw=l w;as. A$ )'Oll lldd IO or cdit !be leXl., MalhCAD
rewraps the ICX1 8CCOrding 10 !be WT"I) m.-gin. Figure 3 shows
bow the wnp marin brcab lines ond l::ttps cbe ll:Xl iD a colmnn.

~
~

..... ,..,.n.t

--

. . . , _ . . . . . p1,. .............. ,......,.._, ..

--tle ........................ ..

_.....,:

=-11.

- :. a

":a

:. .ll

,.._ : .1--

: . . . . ..

1 :t..l1

J: .. J"'U-*\ loid>CAO- _,,.,. .,...,......, ...

--~-

lf :roa imat or delete 1e:11 in cbe idcle ola ICU rqim. ,.,..
mar end up wit1110<?Je lil>es s1au:r mm ocbcn. To rewnp aLI
chelines in !he regioa. preu [Ct.rl)lr (!be JllStil'y axrm.rd).

Cb.anging the wrap margin

rcx-. lat rqion

To dlange dio wnp marin foc a aeu regioa. YQCI mast l<l its
'lricll. Then:

""" wtf)'S to do lhis:

To m.a:e a ICXl rcgion n:mTOWtt, axm: the anor ~


in lhc ic.t regiOI and prcss (Ctrl ][.JI (hold clown the
[Ctr l] key lnd press !hc E!t1a' b:y ). 1-WhCAD ti:tJ a """
wnp margin at !he
anor positioa and l'eWnpll lhe
ll:xl IO the """ width.

'.'!:I

1 ~

,......~

u.._.,. ..mn r1.,.

,..-......,_.n-.

When }'Oll create a leXt rcgion. MaJiCAD ICCI the WT1l!I nm--gin
dtpending"" the =rent line lea(tb.. (By ddmlt. !he linc lengdl
Is 78 columns. hui you can chqe il wll lhe lir>elntttla
command, d=Jibed lu:r !l1 lhis cllapa andtt -re:u bmds. i
1-11= is how Matl!CAD delcmtiaes lbc W'l1q) amiD fara te::a
regioo:.

.......:

.........

Automatlc wurd wnp

r;=-~

1
G-1~

on.

exl ~ the ccncr a;ipc:irs as a fla5hing undencore ( _).

qc:1.rtn ti ...

- - u. ...... ~

E-~ . -=3

EYtt7 text reg;o.i ll&I a~ ..,,,.tt- U you rypc bcymd !tle


wnI m.&rgin. MalllCAD mnoma::i::3lly-..pz die 1a1- lllll is.
IJ<aU thc linc and swu a ncw ooe.

d~

...,...__. , ... '4 .. .tu.

To delete a bad linc tJtt.lc.

E;!~

........
nw ,.,. n
..... .,.
..............u. -'"
...,.,..t
n ......

m
~-- 3
.E
[_::mr 3

To break alinear smt a ncw linc in a r.r:xt n:gion. press {J].


MathCAD insertS a /tard liM l!nak in the U:Xl rcgion. The tmd
1ioe brcalc appcat"S as a left-pointiag triangle whcn the cursoc is
in lhc ~t n:gion (fig= 2). (Thcsc line bft:aks are called liard.
10 distinguish lhcm Crom lhc 10{I liM brt<W dw MathCAD
in:sc:ru whcn it is wrappin leXl mtomll!Xally. Sce -Au!OIMC

t>

~.~

-i1

~:i!I

T1t<t double~rt 1"0ri:s on IM :cnen att tlier-.: only to


dtaw -,ou rltL auttt oftlie cwrrru tut nfiolc. WMll -,o
,,.,,.. 111< cursor"' of tot nfion. Ma.dtCAD /Udu IM
doublt~uore tnOTC aN 1/low1 f.:t tM tm.

,._.-.-n-.

":

TUI

- ltl

To cOJtAOt lt""" a ta:r-.:fiolc 111 prvsiitr {.J]. fo1uruur


kaw IN rat rtgiOll 171,.,.,.;,., J.t cursor O&d willi tite
arrow U'f1 or orher U,..

word wnp." bclow.)

.....,... u. """"""' ,e,. .C rw n.u


,, . . . . u. ........ ...-cin,. ....

w------~

To mab: a iext rcg:ion cirber wid<r or tmroiYt:r, me tbo


w>dtb rommmd. Typc:
{l:sc] width [-']

I
~lhCAD sbowt )'(JU !be curn:nt widlb o( the to:t repo.,
(figure 4). ~ tbe widdl witb {!!l:ap] and ena a,..,....
widlh. (The ..ndtb is measar<d in c:olumns or c:bancl<=)
MalliCAD rcwnps lbe 1a1 rcgicm to the ncw wdl! (Fi!=
5).

To lnOWO IU1 reglo11 IOOMW spDI. U.,s ({r3J tutd (r')).


111-.S

IN CIU tutdpasu

COMMAHOSN
TltS SECTIOH

...u.:

----"------...i-.
. . . . ..
--
-.... .........
-

iEXTeAD

........... f"llP'W ........ ,., ""


.,cttt ....

n.-... u.._.,.

C<ooll llxt i.>d.

.:.a.

'

..

-:.u

..

'""' MdlCAO,......,.. .......-.

. ].

:. .

'

:.,

r.. n.c

n .. .._ .... ._. ....... ,, ,...

_ _ ,_,t,..cu.

,_,

._...._.frlctt11MH

.., ..........,

:.a.
-:au

.......

:a .ll

.... :..1--

....

l .

:at.-

Fig<n5:s.mtl0Xt~- ~IOawidd>ol30

R epnllcu o{ bow yoo calllC a ICXl reion 10 wap, MadlCAD


anainulDI lbc lwd line bRab in d>c reioa.

,.

'. ~:.~i~(:4J~L

MEHU

(CUl~"'

(rlo)r a

---

&.o)~ cols

(.Jj

{rlO)W L

Creatin& and usin& text bands


To acalC a iat band. lllO\'e IO an cmp<y linc and type [CtrlJr.
MalhCAD shifts the cunor IG colwnn 0 and crcaleS a ICXl band
ltfCCChing aaoss lbc llCl'CCO Crom 1JW11in to marin.

Wbcn you use tcxl bands ill a docwncni. imqinc dial the
documenl is dividcd up illlO borizoolal ballds ol diffcrcnt lypcl. .
Within lhc tcxl bands, lhc docwncnt bchaYCI likc an ordillll}
ICXl cditoc. Bctwcen lhe ICXl bands are baods COOlainin
cqualioos. plols, and sm&ll ICXt rcioos.

0ooc )'OU haYC cn:&ICd a ICXl band,, you call lype lllD l jusl as
you woald wilh a ICXl rcgioct. The wrap mar!l Cor a ICXl baad is

a MathCAD documcnl IO lhe odlc:r. Tbcy diJicr from fCXl


reions in lhe followin ways:

.........

----"___.............
..............
........

ICEYS TO TYft:

Text bandJ are dcsignod for ICXl tbat SU'Cldlcs from onc edc oC

hw.I u. ......- ,.,. et

V' :. ' ' , ~.' ~

Text bands vs. text regions

pi"' .S--

llAll-

e;::

UNELENGTH

Slinelonglhtor

.:.

:.111

[Z.Ao]~(.J)

...... a . . . .... -~ twt.l..e. rnctt.-l4

.........:

;Texi b~nd!( ~ 'l':, ;;;:

Text bands stan in colwnn Oand cxrcnd for lhc full line
lmgth of che pagc. lf a ICXl band occupics a line oo die
.:n:cn. cquatioos or plolS cannoloccupy tbc samc linc. lbc
ochcr iegioos musr. be citha lbove die ICXl iegioo or bclow
it.

Text bands pusb odicr rcgioos out oC lhe way. lf adding 1CXl
causes a u:xt band to ovcrlap cxisting iegioos, Ma!hCAD
pushcs !hose iegioos OOl ol die way. In this way, tcxl bands
bcha"C more likc a coa\'<:Slonal tcxl editor. Similarly, if a
ICXl band shrinh as you dclcle rexi. MathCAD pul1s die
iegions bclow it upward to fill lhe cmpy spacc.
MailiCAD doa ""'ac""2lly mav< the other rtgiotU Wllil
JOll move the cMTUJt' out of the tui bond or (}p<! [Ctrl!N.

dclcnnincd by lhc line lmgth (sc:e "Scuing tbc linc lcngth.. OQ


lhc DCxt pegc.) lf you type IDOIC ICXl lhan wiU fit 00 a IllC, the
tcxl wil1 wnp,justas ia a ICXtiegion.

Tcxt bands are dcsigncd 10 U:cp a consWll amount oC spece


bctwccn the last linc o( rhc lt:Xl band and die fint iegioo bclow
it. Kccptng lhis spacing coasunt u you cdit 1llOUld be
lftlC.COllSWDllg, so MalbCAD wails uncil you prcss [Ctrl}lr or
D>O"C lhe cunor OUI O lhc ICXl band to shift die Olhcr ieioos out
oC lhc way. !.$ you ldd or ddcte lincs in a ICX1 band. you shwld
oa:asionally typC (CtrlJll to adjUSI thc spacing of lhe band and
lhc odia iegions.1! you '.-e addcd ~ MatbCAD wil1 shift the
ieions below lhe rext band downward. lf you' ve dclcu:d lCXl,
MalhCAD wil1 sMt tbe i:egioos bclow die leXt band upw1'ld.

'"

As t a 1a1 rtgio11, )'01<


ituen liard liM brtab lit a 1u:1
baNi to /ore 1he tm ID brtai: al dtsirtd placa.

Figures 6 and 7 show a docwneru bdorc: and afitt adding a ICX1


band.

Tcxl bandJ are appropriatc for crcating rext in a rcport oc


rechnical papcr. A docwncn1 wilh rex1 bands migh1 be O<g8l1izcd
as follows: A reu baod irurodocing the sub jea. followcd by a
group of equatioo i:egions. plou. and small rex1 iegioos
(commenu and labcls), followcd by anothct tcxl band. and so
oo. Tcxt bands and groops of cquations aliernal.e as you move
down L'>c documcoL

' f~l~~~l~s1~~w~~,~ s.jf,,.'.;(;;w.0;:;~<i';~''".


. ...

. ,:,J
-.
Tr.

.~f , ~ .~~

- ..

-.,: :. :;. : l~-t_:::::'.;2 '.'.::<.'~'.. ;::'.;. .- /..~:';'(:;;(;:;:;1:::r:::tS2J


Ch"!Jler4

l_,_,.. ,.....,_,ir:.;,

1M

zw _wmrw

'-Hte

flf--c:

. : ...

.. :
-

.. :.a

..
..... :.-

; . ti

.
.ta-

~"''"'':

.ltt

!t.-

... --n.,....

w:. ....

405,
1--., ... l ..
t i....

J:MMffttw

"'*t Uo

C:.:. :i.

-~

r ,.... .
IL .:'

3.

'7;:I

[~:J]

. ~~I .. ~

~-

!i;:::.!~ 1 ~~
II~

- :1 .. ...

tl
l"=V"itill, 1'7'tl, ,..._ D:zn. f'lr ,._.,,,

H (.... h

t ..

11 k1-1 ....,.'- . . - Hf'Yt ...,....1.u- . . , . . . . ., . . ......,..~

n. ...........

1 : .M -

'1t1I ............ .

.......- n.. ,..i.

1 . ........... ,WJ , t-.j

rn )'? rw a"" bmwl ..;ch IM [r31 uy, MaihCAO


"es tM tnllrt tut band and '"'"~' tM rttlons bdow 11
o fil/ IM spac<. lf yo tkn po.stt tloe lt:rl band on a
.A: fint, MathCMJ pKS!oes tM rttlons bdqw 11
mward tq maU room for tloe tut l>and.

U,"'""'"'

Telllt mutlon l:ommands


COMMAHOSIN

THIS SECTIOH

fRwAAo

lntlirpretmOYn. .

c:ommandl 11

ll[NU

KEYSTOIYPI!
(ctrlJI' .,
(Eo] fontard (.J)

rno1

(ctrlJB ot
[ltao] baolcward [.J)

[1'10] '

BACKWAAO

lnltrpro!ITIOWITI1I

oommandl

--...n1.

Movement commands

,,

In addition to lhc m:row lceys, MathCAD undcntands the


Collowing commands to mo...c lhe cunar in tet regions:

[ctrlJlf

- ~'!
v1

[ -~

L~~

" :

67

Tu l

'-t.._.. ,.,.u....,._,"'... ,,... l.

.... ....-..
....--. -6 ~1- :

-1

rt !::l! .g

- : .lt

:n

Wltl-.1 t l l f - U ....

:1 ::-:

.
= -

"......_.: =a

u... r,..

Whcn you change lhe linc length, MathCAD ICWnlps ali exlsting
ICl<l bands IO lhe ncw linc lenglh.

r=-~

e::.:

1: 11.tt>ro oddng a lut t.id

1Wlle.tl 11

[he] lindanqtll [.J)


MathCAD promp13 for a ncw linc lenglh. Entet 1 numbet of
columns (far cxample, SO for 1 6().column linc.)

Tloe llnlngth co'"""1.ltd a/ftcts tat bands only. lt lw""


tfftct on t.dstlng ttxt rtglon.r, tquadons, or plots.

.. ...1. .

.n-..1.rMcrt1...t

Setting the line length


All let !>nn<b wmp al 1he '4mo column -lhe column ~I by tho
llntlnith command. Thc dcfaull line length is 78 columns. To
changc lhe line length, type:

....

,.... ,1___

' ll

[ f-r.-:II

'I

i: [~----:~

[J!_ll
td!~

~~
11-=l

Kty

-'"'
"'""" "'

wool.

[Ctrl]L

MOYO oriO lne.

[Ctrl)9

MOYO one Nfllenot (Mnlonoos .o;i-~11-yor.


k>low"9chsoeurt: .1 ? ).

[ctrl)P

... tnab.,. hsd ..... br* llllowod by. 11*'11

Mow one peraQl'lllh (pow&Q!'Phl end wlh IWO h.d

By defaul~ thcse commands move yooforworrl - to thc ncxt


urd, for e ..m ple, or lhe end o thc region. You c:11t clllnge lhis
by '"ing lhe backw1rd key, [Ctrl)B. Afttt yoo type [Ctrl)B,
lhe tet rntMion comrnandJ movo lhe cunar bactward in thc
rcglon. To rcume moving forwanl, lype [Ctrl)r .
Por cumple, to movc forward 1 scnience ph11 throc words, type:
[CtrlJr

(l/MI alr~ady movlnc/orword)

(Ctrl )8 (Ctrlflt (CtrllW (Ctrlflt

To move llftck ward to thc bcginning o( the Pftlllgraph, type

[Ctrl)B [CtrllP
MathCAD movcs the CUDO< IO lhe l1nt chlracltr In the cmrcnt
paragraph.

Toa CcJll a/so"'~ tite ['tab)


orotllld In tut
n1w n.r aNI tut bands. 1),,e (Tab) ro"""'' /orward otw
word, (Sllltt][Tab) to,,.,... bad OM word. [TabJ IJ""'
o/fecttd by [Ctrl)B aNl[Ctrl)r .

-M! " ,.M

_ __

__

1
:.'

~;

---

- -----,..-

--- -- ----~-- ------- - ~ -

,. .

! ~l:

11-rul
1t::::. -~

_ : _ _ - - - - - - - - - - - - - - ---- trrr"trrdelc!C the marW W.I and copy it to tcmporary s1orage,


To
exhdilingcommands
,, -" .., ;'
prcu [CtrlJ[r3J, thc loc11I key (Figure 10). (To copy !he
< "';

11A1AHOSlf.

IS SECl10ll
~RK

..... ...i ..
Wltlrt

--IOI\

(ct.rl!J: "'
(l:oolrk (.J)

CUT

ICOPY

""-*1
~P"5T_E

llEllU

11.EYSTOl'fP!

['1'10]'1' 11

[ct.rl)frJl "'
(l:ool iaout (.JI

frlO] l X

(ct.rl)IJ'Z) Of
(~c) iaoopy {.J)

frlO) l C

___

..,, !>-..Ir
>Of\OllOICU.

:ooER
*""m1tDC*lW.

Jct.rllfl'4l "'
(l:oo) 1JopHt (.JI
{l:oo) - e r (.JJ

[.:.-~

Markin:, copyin:, cuttin:, and pastin: text

IOClllOl'ropy.

Press thc mark kcy, (Ctrl)X. M.athCAD marb thc


clww:tcr 11 lhc cunar in invene video (bla::k on a brihl
t.:kround. likc IS 'f iD Fiure 8).

Move the cW10I' ID tbo el\d ol the leJl you wanl ID delcic.
Utc any "'" ...000. commands you wllll. but k.ecp tbo
Cll110I' wilhiD tbo 11111 n:ioa or "'11 band.

Pral [Ctrl\X aaift. MalhCAD hihlights ali oC the ICX1


bclwccn lhc mar\ .Id lhe cunor (Fiwo 9).

;. 1L

[?'

.
..... --

:U

~ .. : UI

' :.

:.

-.

"'*

.... u ...1

,.,.,..,, _.

\AJ'-,....,...,.........

u. '"...,... n.1 .. ..._.kiola.

Flgon a: TeXI r9gion wll111*1< MI

'

.. : 111

:U

1 - 1 - , ... "' ...... -u....


... ............-1 . . . . . . . . .

.,..,. ""'' -uoa ,__. le,.,.

.-..,_,.

.,.1. ""''""''

e,,..,..., "'>ol

u. ..........,...

id!~

r.-

...,.t..

r.-- u.'--\.._.

,-1.u ~ai . . ,,......,


l:J9-:tn. {M "-"f ..tW --'la O
lrl .,.,.._,...,,,. te U. ..._. .. -..i

,.._

~u-1

1..-..--u-. -

,~

.r ........ :

u.,....._..."'"'~

.>t.Z-

Aguf9 11: UalhCAO ,,__ 1llO xt lnto

. -..1-n11111n t..

a,_ plooo In IN,.., bond.

lf JOU marl bo1it ends of piece laJ and llun decide no1 copy
or clll 11, you '"" wunarl i1 agaill. l'r<ss [Ctrl!X agabr or
lhOW 1he cursor 0111 o/ lhe 1a1regwnor1w baNl.
MaihCAD unmarts 1he marud 1w.

"'' -u'"
'9 ..u.. u.._.,... _._.

.,.... ; ~ Uw

twt. ffll _,_..._.:

:. u.

... =

: . ft

.. : UI

11

,.._ : .l - -

:.....

' ,. '

..

................ -u... ( .... ' , .............,..., ....,.._ ..... rt-t


~-u- u u. ...,_,._ ........ .s

rw .us.u-1 ht. .u ....... u..

IE-~ .!a
1d!j]I
-_u

1 :a t.I

lo><l~on.

1ci!:ru .
\! ~
I[

"llc;:.a,U- h ....._

--.& .,.1.,)

(ctcl!J: agaln, MaJhCAO melM "".,... In flO

..

..,

. :

.. : UI

,.t: . l -

1911\fl (l'\:JW"--+tlllo 1'1'1) 0

n.1'9 ......,._

.. : . 11

_.:U

"'T~h

rlnt

Ji
FlQuro ~ : Whon yw -

;. 1L

__

i. W
.-t!o"
ta tM ~""''' ,.. .,., . ~fJjfl}H
~
onimmrvnmn3:.
'

..... .r__.......:

:.

,.._ .&--

[[-:-T

.,.._ ....._ u.A C__. I U. ...,...1. Ml-) ~l-


rlr.t
..,,.,...1-t1 '- tM ~.,,. ....,., ~ anllc.tl.,... a. ui... r,... t
UoG1t
rruAa ..
1m>. ~

-rt Rlobul ..

l'.:li 13ii

: 1

ca : .SI

: LL

'"' .Ulu-1 1.r....u .., ...

. 11
l![-Ti _:~

"' : 11

U.1 ta o/ ......,._.:

re!~
.l I

,"''

lu.-J .... lhe "'-'" ..


.....1.. .....-..

-. ..u .. t.

~~

lt::.D

no'l' e
IW .. o l - :

69

Tui

-:1

documenL Whai the cursoc is in the place you wanl the ten
to appcar, pre.u (Ctrl}{r4], the lulpute kcy. MathCAO
pastel the ICXl into tht. tell rcgion or texl balld and rcwrapa
i1 if ncccssary (Figuno 11). (Y ou musl pas!C tcxl into an
exisng lexl rcgioo or ICXl band; you cannOI pasio tex1 into
the cmpy spacc betwecn rcgions. You can crcate an cmpy
ICXl rcgion, if neassary. as place ID palle the ICXL)
~ llM U l'aui .. -"~
. . .t1 ..t.e ............. .

To dclelc, move, or 0091more!hanonocharacletoC1ex1, U1C1 thc


mar... IDCOP1, lacvt. IDd lpaale (X)lllllllllds, u dcacribcd
bdaw:

rint. movc thc cuncr IO thc bciwUn& oC thc 1a1 you wllll

!L

U you want IO pac thc W.l most r=ntly cu1 or copicd into
a new spot, movc the cursor to the new spot. Y ou can pas!C
ICXl into any cxisting ICXl rcgion or texl band in thc

['1'10) l

To delclc a single chanaU In 11t:11 rcion, prcaa thc [altpl or


n>-ll kcy. [altpl (lhc kcy witll lhc left-pointin arrow al thc
"'I' rigl11 of thc keyboud) delelca lhe clww:la befort thc cursor;
[l>ell (thc puiod koy m dio auaw:ric ko)'l*I) lklclCI thc
thancw oi thc cunar.

ICXl IO lcmponlry atoragc wilhoul dcleting il, pre'-' 1hc


lncopy kcy, {Ctrl){r2]. insicad of [Ctrl]lli'J).)

- - ~---

r.r-'-"9.,, ,.....,_:

n.1 .............

:. >ti -

Ag.n 10: .,,,_ you pr.a (ctcllirll Ml.lhCAO -

......1-n- ...~
.... .....-11111.

6Wrythlng from tite ""'1".l ID the cwrr"" cursor posirio1t .

Kup In mind 1he lmpor1an1 di.s1lnctwn b<1.,.,cn 1he cop1 .


cut, and pa..lt co"""'11\i (fr2J. fr3J, and (Uf) and 1heir

cowturpurts/or tul tJJt.d ~'{JMJtifJtV. Use copy. cut and


pasle IO delclL or mow: wlwk regiortS or wlwle laJ baNis.
Uu incopy, lncul, and lnpllSlt in IUI IO delcic or '"'""
uu ofwords wi1/tin a u:u region or ICII band. Use locop7,
lncut. tJJ1d inpas~ /1t cqumio1u to dc/clt or 1n0w
uprt.s..sioru wi1hilt tite cquaiiol\S.

Cenlerin:

u.. MalhCAD' cenltr command IO

=.

linc o( lCXL With


lhc ClltOOI' in a 1ex1 rcioo or tcxl band. lllc a:nlr command
WOfUU Collows:

~=p:m

~,,l'JJtdt'Rtt@ifJ!%+1 .~'lffl,,Q'4. ..IJ ?.J.. .

SlwrrcwL Actwally. you r1ud no1 mart bo1h cNb o{ 1111 ILII
IO copy or cut 11. lfyou ~1 a /t1lll'l aJ o~ cnd and lhen prus
(CtrlJ(r2J or (CtrlJlrJJ, MaJhCAD wil/ wyor '"'

,,

.,

---~ -

---- - -

--~-------

--- ~----

~':; ~~ :~::~::'~::::~:~:4::?f~~i:!~~~~~"::;:::'~::;;~:f;.~.~~:'':~:di:' ;'. ~ : ,'/'.';~;:\--:~:;,~:~:]

~1r
'

e.

~~-~3

1'
' ~~
~ -jl

11 linc with texl, the c:ntercommand adds !paces at tho


ginning of the linc 10 cenra thc text and lea ves the cursor
the end of thc texL

nrcr of a ICxt region Lt the point equkftanl betf<Cerl the


right edges of the ICt region. Thc ccntcr of a 1ex1 bond
lOnt cquifalllllt bct~ rolumn Oand thc linc lcngth.

:::i

~=-r~

an cmpl)' line, thc et11ler command add! spr.ccs at the


inning of thc line 10 move lhe cursor IO .thc ccntu of the

bJ

i:--~

Chapter 4

c--.c.!!I
,.~~
~ ... --~
-~ Dl.:::.

Urtd 1a1 will 110t nay cr:nttrtd wlitn yo tdJt o ltxt


Ion, 1/ yo odd new tt:xr or challg< tM 11111! l<nsth, Ktt
nnter command 10 cm/a- 1M tut K"'

I! ---'-~

. w;

~IU~~

:.r i

JJ ~

'.:;----~

.~~111
~ ..... M

-~
~ J:IE
---~

., Jll
1~-1-:a
11
IE -- :H
1

-.flt

I{ "'-

:_:

1d!!3
Jll.
!!

lt;---~

Document Formatting
and Printing
This chaptet des:ribes how to :rcJl8f'C yoor docurnent Cor
printing and how to print it, including commands Cor nwins
and Pft&C breab. This chaptet abo des:ribes MathCAD'a
support for plouen and printcr C3Capc 9C<lllCOCC3

This chap\a' contaim thc followlng 9Cetions:


How to prlnl a docurMnt
Using MathCAD'a prlnl command; aclocllng a printcr

Marrl111
Spocifyin1 a lel\ marg!n for printin

r.gabrulta
llow MalhCAD dcal1 whh pegc btt.aU; tcttlng lhc pegc
lcn&th; inl<rtin han! page brcab
l'lotlttl

llow llO Ul<I a plOOtt wlth MathCAD

Elaipe ltqlleDa!I
Bmbeddlna oecapa ~ and ASO! oodes for printcr
control

:d
4J.!(_

Chapa $

llow to print 11 docum~nt


COUllAHOSIN

SELECTPRINlER
_,,.,...,~""

PRINT
,...
.....

11..1.. i-rwu\ l.JI

...

t~

.......

lWla., .....,.....,.,

1r101 1

- = ....

:. u.

..... ..-..

IJ'10J 1 P '

lit

- - 1

cu11<>"'

-,~

.I

&

l..l ru .1

:.

' '

t..,, ..._.

Printin: the currmt document


Whc:n yuu i-w a tlocumau, you mlllt apcclfy lwo lhi~s:

rw ..u1u-1 1.t.-u.., ... ,.,. Ita..., , ri.u.

lhe lllU "' prinled

lhe prinicr dcvice O' fllonamo

hr...lwe

Whcn you""" llao prlal coaun-s, Mall>CAl> poOln>U you fu<

f.8Ch oi :~...,., ln twll.


Tlu dacrlpdotU btkrw opp/y to prillllrJ. Ma1hCAD lrtals
p/.o~rs Jlllllly dif!ewuly, as ikscribed c IM ucao..
"l'lol~rJ." lacr c oU cllopla.

"

To prinl ali 0t plft ot 1be CurreAt documenl, ~


(Sac) print [.I)

(Altem&livdy, use lbt prlal koy, [ctrl)O.) MalhCAD


rcspoodl willl a prompl for dio prinl mu, 11 abow iD Fiw'C l ,
Qyou luJw MI specV!edoprlllUr rypt, MailtCAD pom tlils
-=1 rlu _ , , lv WMll )'011 try ID prW: No
prlater apecillI. Yow lfWI 11111/v scledpriDl.tr co"""'1114
IOJp<cify a xiliur. lfJOf' sptcify aprillur ryp< c yowr
CtJ,.iivaJionftk, JO" 11ted 1IOl tpecify a prlllllr taelr. liJM
yo11 load MaJltO.D. ~t ~lIll a prillur." /4ur c llr.Js
1tctlo11.for mort tnformado11.

"

.r ,,....1..1

fY,Jtt1 1: MahCAO rumpt fot

t le
lf~

,)U -

~IM.ll .

... --- nw "'"

.,... _., ptifll

1lle numhen on tlio me1W1ge iine rcn:.,..nl tl>c 1wti<ll ol tlic


uper lcfl and lowu riKhl comus of ll>c rcgi< IO be >rmlD<I. Uy
default, MalhCAD prinis tli.: whole documcnL To print lhc
whole documcnt. jUJl pn:.ss [.J).
To print only part ol tlle documcnt. cdit the numbcn on lhc
mcssage line. Use lhe arrow r.eys and the [Bkap) l.ey 10 erase
lhe nwnbcn shown and cnta new numbcn lhat n:present lhe
uppcr lcft and lowcr righl corners of lhc rcgion 10 be printcd. For
cxample, IO prilll columns othroogb 7S on linu Qthrough S0, 11
lhc Prlal area prompt typc:
[Bltap)[Bk.ap) . ..
O, O to 50, 75 (.J)

lf you prlnt a docunu:nt wldu than IN width o/ tht prlntcr


(80 or / 32 co/umnJ, ckp<ndng on thc prlntu rype you
scltctt d), MathCAD prlnu tht documcn1 In strips. On an
80-colWM printtr.for uamplt , Ma1hCAD will prinl
columnJ O 1hro u11h 7Y on on~ trlp, colwrvu liO throu lt 159
(1/ ther~ Is anythlnK In thtm) on tht n<.tl str/1, and so on. ti/
1hl /,u 1 tt1m1blf In tl'i# l'rlnt n a: l""'"I'' 11
tlu11t
79, MaJhCAD wlll prinl tht docwnent In two strlJS.) fo
,,cnn.rtrucl tht dncumLnl, atto~h IM printtd strlps sldt by

1~ 1 ~
l[

J - -11 ~

RepeaJ to erase alJ tlllmbtrs 011


ineJ.Sageltt.

11 -

: _!!

I[

!f-t--iii

1-

:r:::

JI/# ,

Al tl1is irompt, you Cllll do AllY of tl1e foliowin:

Ea jj

I
'[;:111-=3

9=ui
1r

:os

-=!J

(E::.ir )j

~t:ij

To print to a Jlfi111et l1<1kcd IO tllO l'RN l~lll. preu l.J). ll1i1


h the

"''' common ouion.

T o prinl ton )f"lmer hooked tu a tliJJc1c111 de vice pon. p1cu

(Uk pl to erase l'KN 11wl rcplacc it wilh lhe ruunc of 1he


other devicc port, for ciuunple, COMt Cor the trst serial port.

To print IO a file, prcss [Bkpl IO era.se PRN and tllCll enlCI a


fcnamc. MalhCAD scnib lhe information 10 a prlns Jilt
lnslead of 10 tlie primer. You can pcint the prinl file lau:r on.

rwll.

- u .. "'-' -""' ...

..u -'- a..-1w ....wr.

----=

, ... '""". . . 1.""-c.r1 ........ 1..

- twt

.r

:. u.

DO

.,.. I U

.. :. '

..... :

'" .,....11-11- ' ...._ ,,._ ....

Altu you 1ioclry tho ni11111ca, Mn1hCAI> 101111i. yoo to <>uc.ct


a l>n lct or nltnm (Figure 2). 1lle dcfaull device iJ PRN, thc
1uu u~ull l>OS 1Jlo1r.r dovi(.:(I.

E - .3
.
r -.! :!!
L.]

ntmz:r:xrtFXnmr:rwv;

IJJ!IJ!.1.'l l

t'""''

-1

lt.I .,,llnetl le t.i... h - O


"'YleU .._,,,,_,.,._ \t rr.W
\a.ll t t\.Ww-tM11, tm~, ,., ~ l J1 . ltr.. ,...~. _,....., f,..~ I u,.
.....,11 .,.,.,, ..,..t. .... rlr.t anr-ltl- '- U. ..._14,. ._.

DocwN:nt Fomwtinc .oo Printin

11 -

r .. ,....-,. t. M.oro....., ..

llEHU

UYITOTYPI

TIQ llCTIOll

......................

I__.,
'11:
rr-n=!i

; e . 11 e

r---

.r

-~

u.~

,......1-: :.

! .

1 I

t .I

1.~
-ri..u ""-"'-- "- ,.,
"-le-'"-' c ..., 1..

~ '"'"""- M111 , 1tn~. ,...... :r. xn . ,.,.


....,1 . . .1..,1 - . . .1. . ...... fl ret .....,..,1-11 -

r.. ...,.1u.-.1 ,.,._....u ., ..

>U -

te ,.,. ..._ ...

ri.u ..

M.M~.

... - t-

n ..

AQu,.. 2: MathCAO prompta you lcw a U.Vice OI f'il n.-ne.


n~ pt imc,d 0111pu t in Math( ' A ll i1 an n AIM"I ifllAJ!O 11( 1hn
documc nt aJ you soc il on the sae.cn. To i t.up M whCAU u1fl)I

miildle of p1i111ing, pie.u ICtrl JI BrHkl (hold 1~1wn 1hc


[Ctrll k.cy and pre.ss lhc [Scroll LockJ, uc Ja r . . k J, lt
MathCAD rcmcmben !he printcr de vice <W fcnamc thut you
U1d UJC.1 lhe same dcvicc O< filc1wnelhe oext time yo

lpCCfy

1Jy IO prinL

Once )'011 haw crtaJt d a prins ji/e, Ji simplest way to prtJ1


11IJto11.1e IM/oUowU.g command /JI 1hc DOS prompt:
COJi'Y /B !HenUIO li'RN
Btcall.lt o/tM graphics tn{ormalion c Ma1hCAD prinl
flltJ, thc DOS PRlN1' command ~s ""' prlnl t~m rtably
(Tht reverse is tr~ / or plotttrs; stt tJr.e sectio11 011
"l'/ouers," /Oler in this chapter.)

Specifyin: a printer
Bcforc you can print. you mUJI spocify a prin1e1 type. MaihC
llOCdJ IO know thc prinia lype ID formal outpul lor !he prin1t.1

... . .

~.-.

-.-,

-.- -

,-

----

--

------

~~~s~:.:~~~:ry-::zE;-::i :;;;":.i. 1':!';;:.:J.:;;J .. 1 . .


Cha
Chtptcr$

r a printer type. WlC lhc .wltprlnttr command. Type:


] Hlect (.J]

l nOI typc out .wltprlnltr- MalhCAD necds only


11crs to distinguish lhis command from olhcr
>.)

) shows you a scmtling menu


rc~ts a diffacnt
ivcr file MCAD.MO'.
)flC

__

or

printcr typcs (Figure


prinier-<lrivcr in Uic

lo. ... <IM lM rtoo.111 lhorll


... Mtt-te

~l"tM"fl

l. lfl'l ""'rMr, Ul r.nl


2 .... fl.l..U.t, -
4. . . tu.rJ.t, col

:a JL
Mili : .

l . ,.,..,,._ n,,1, w l
' Oli.Uta '7/?:J, M ,..1
1. c.1mt c~31s, llt oel
l. ru rs, col

'91 : l -

r,...

t . .., Plell.w

,,.u

f~)

r'
I

,11r~tt h t ....
U t..Uettlt ..
"9ehatC9" ,,..,.
"i:t.--t111. 1mt, ,..._ D l'.n. u-.. """"'<...; t o.
.. , .., a.,.t... ,_. rlrd. .,,.,. ... u .. te ltr. ..... , --

ltt . . 1

t.t..._u., -

.......... .t '""'-:

, ..

e :a

-w

ata...,.. n.u ._._,.,

,)U -

lf you print 10 a lile, lhc print file is In lhc format or lhc


spccificd printcr.
You can save lhc printcr inormation so you do not have to
tpttify it cach time you
MalhCAD. \Jsc lhc ronnxuvt
command to savc lhc number o{ lhc printcr driver in
Matl1CAD's coofigumtion file. Thcn cach time you lond
MalhCAD, it wiU alrcady be configurcd for lhc spccif~ prln1cr.

~:i3

ff! :::1
ill
-

rf~ _,..

UI

-ryi-meru

rthCAD COMOI flnd MCADMCP. lt sltows tite musa ge


oot Ond drinr nlt MCAl>.MCP. MathCAD locf.sfor
r;.,,,, fl/t.flrst In th< ciurcnt dircctory. In In th<
:tory Sf"Clflrd In IM DOS <nvlro"""nJ wvlabl<
DOIR. anti IMn In MC>.O dirtctory on IM ciurtnJ drlW!.
lpptfld C, "S1ar1y Oprion.s," for IN>n lllforma1i<>11
fathCAD' J ~arch pa1h.
thc hlghllght up and down thu llsi unlil you llnd thc

lhat most closcly rcscmblcs )'OUr prinla' or plOllcr. Thcn


.JJ. TI1~ 1dls Ma1hCAO "'ht tind o printr.r you are
111is printtt IYf'O "l'!'lia 10 MaihCAD print lllcs u wdl;

DocumentFonnattin&andPrintin&

~larglns. :1:r
COMMAHD tt
TllS SECTION

, .\ -

1$

. ,

KEn TO TYPE

llENU

~mN
Spod!ylol1mwvio

(Eaa] -rqi11 cola (.J]

(rlO] W 11

1orim~-

flc:i:m

Settlngthetcnmargm

ffC~

The 1en margin is a convcnlcnce ror printing. Thc dcault ror !el\
margin is 1.cro: MachCAD leavcs no spece at lhc lcft cdge oflhc

:/1
'/ -I
e"" I

-t-;:,
:J.11

....:

.jD

rr ~ ... -

..Jll .
iJ E
::nJ
111
r~-~
.~ ,_
,jfll -11
:1~!~~
.J -

JI~
.g-~SJJ

~ .!J:!I
~!1:1
..~--~;ji
--:1~
_...
t:!--b

Pagebreaks
COMM1
T1tS SECTIOll

Soq-ioitng111(0<0

'

,, .

1: .'

KFts TO 1lJll

AAGa

E ~' ITJ

[~

... -..1-n., ... c..

(ha)

JMl9al

""""""'

iRW
!lhft-11onond

.,..,_

(Jt.al lt.-aki

papcr.
To chnngc thc len margin, iac thc marln command. Far
cumple. lo crcal.C a len margin 10 columns widc, type:
(ll:acl ""'"9111 10 (.J]

This margin sc1Ung Affccts prlnting only. Whcn you prln1,


MalhCAD !caves lhls rtl41ly columns o( cmpty q>ace al thc le!\
lldc of your documcnL
lfyou ust I mariiln command wltJlll o 111UntrlC
argwnml, MmhCAD shows IM ClllTtnJ mar1l11 stttl111. ToM
can acupt thi.t /ry prtsslllt [.J] or bacbpoct owr 11 and
tnltr a MW mar1l11 stttlng.
/tla1hCAD has no absollllt rlghl margln stlllllt. TM 011/y
rlthl mar gin Is IM wrap morglnfor tal bands, Jtl
accordlng I lln<l<ncth colMVllld. Yow can ploct tal,
equallon. ond plo1 rtgloru a11yw~rt on tM docw=111.
/rclwilng I spaet beyolld colwnn 80.

Settln1t pa2e breal<J


MachCAD l'CJlr<*l'llJ pego boundarie1 on the temen by a tlolltd
Une (Figure 4). Thls lino shows wJicrc MalhCAD will brcalt
pagcs whcn you prlnt. MalhCAD lmds a onnfocd IO thc
prinla' ate.ch pege break. (A fonnccd rorc the printtr 10 &O
on IO lhc ncltl pige.)

.....t..

1111...,'-lfrlcll~

. , .

"'' .,,... rt ,.1

.. .,., n.u
');.11)\ '; '

"' ....

1.;~ t ~ -f\'
~

..

: .ll ,.C

..,

.,. -

.:. n.u

{ .t_u,

...-1 ..

( % -

.._

L. .:...118

.d
:
. j

..\ ., .

':. m --

.. _,,.,.
flv.n'O 4: A-lna -

(pr-.

:1

............

.......
l..,.U

boundwy.

I~

----------------- - -- --

- -

. J

.f.~ :.~

76

To clwle lhc pae lalth, use lhc paeleotb oommand. Far


cumple, 10 ICI a paae lcntb o{ 66 linea, typo:
[r:ecl paqel9119th U [.JI

You can also inscrt hard page brcW inio your document A
bard page break bchaves likt a rcgion or lnt band - it stays put
relativo to evcrylhin clsc and is sund u pan of thc document
To inscn a han1 page break, move the cunor IO thc line whcrc
you want IO brcak thc pagc and type:

MalhCAD shoW1 paae brcakJ ovay 66 lillc&.


To rcmovo lhe oo-oc:reca pae ~ type:

[r:ac] pag-1>r. .k (.JI

[r:ecl page~ O [.J)

MathCAD draws a line across the screcn at thc currcnt cursa


position. When you print the file, MathCAD will senda
form-foed IO force thc prinier to a new pae 11 lhat line.

A pac lcngth ol u:ro means oo pac bn:ab.


/f'Y'JM IU< IM pacdcatb CDlf1ll1Q/ld wi1how a ~umeric
ar'"'"""' Mas/CAD shows tlie currtlll pat kith. Yov
ca11 ocetp1 lhis y prusin1 (.J) or bad:spac o-11 and
tllltr OMW pa1< /ot11JL

MathCAD SIOrCS the hard pagc break u a region in column Ool


lhc documenL Thc pagc-brcak lill<' angles downward in colwnn
OIO rcmind you thal thc page brcak is siorcd in thal column (see
Figure S). To delCle thc hard pagc break, move thc cunor IO lhc
box in column O and press (1'3), thc cul key.

Shiftlni re:ions orr pa:e boundaries


11 a piel gr equalioa rqian CllllSCI a pae boondary, thal plot gr
cquaon will be brok.en a;rou two peaca wbca MaihCAD prin&s
iL To shift ali plol ll>d cqllllOO recioos oll ol pagc boundarics,
uc die breakpa1a alllllllmML Type:

lloootalri ..
( ;.

1be breakpace COllUDIDd iDICtll blW w.i in lhc doclllllCal IO


IOlke llll1' dial DO ccuatilla gr plOl reioo c:roacl 1 pao

,
: ....

c.a.1.u ,,_t.:

bowldaty.

""""'"""''"'zu

olliy plot and

eqllDlio rtioN. lf o uxt rt1w11 or IUI baNI crouu o

pa~ bo-1ar], IN breal<paa"""""""'


off tlit pagt boUNJory.

I'
..

..;u""' sJ/l U

Tlil breakpaa """""""'reco1.tus Ollly soft pag

<-

br<ab. lf-you uert a /oard pa11 brta.t U. a documelll


btlow), 'Y"" ""'11sltiflIM01lier r11io.s off 11'1/Jltually.

Hard paie breakl


1be pa&elentb command iructu pae brcab by counting linea
in a clocumenL Thclo n 10ft" peao brc:ab. lince lhcy movo
llOUlld dependill c. llow you llll lhe >110 lonlh.

-'r---:
brMk

a.m....

:">'1 : ...

, . ,... ,.,

..

..

E::::t
E=-=B

Ali thc suuemenu in this scction assume thal you have selecled a
plouer from the seltctprinltr menu.

e-~
.~

E:--::3

t.-::- =!
~~

c!_:a
1
E=...o.i

........................... ,,,... ~!-.


.........u. t. ......l ........... <n.&
..tW l r,... ThU ~tea ..

Plotters " ,,,

MathCAD ireats plouers slightly diffcrently from ordinary


prinLerS. This scction describes those diCCcrcnces.

... w_.u .....

,.. ..............., .Ww-Mltl.

Agln 5: A hlltd -

... "'"

L :a JM

[&ec] brulcpa9 [.J)

Tu breakpaa

.......
.........

E:"~

Documenl Fvmwtin1 uid Printin

d:JI
g-~!~
1
E-.-_

1-

~-~

d=M

lfyou Ir to plo1 wt1h a rt/Jliwly large prlnl ara (uveral .


1crte.sfaJI), MaihCAD wil/ slvu.l the docwn<nl to
proporlionally to flt lhe tfllirt prinl area on pagt o{ plolltr
owpw. The lttttrs and nUJrlbers will ~ rtduced in size lllld
inay bt difficu/110 rtad. lf thert are large amol/.IUS o{ 1u1
and tqULJlio.s In 'Y'JIV docwn<nJ, I may la a long lime to
plol, sine< MathCAD mu.u draw ea<h character
IN:livtd""1/y "a p/01ur.

Plotter output
The plots tha1 MaLhCAD produces on 1 plouer, like lhc prinlOU&s
il creaics on 11 prinicr, are exact images of whal yoo scc on lhc
acreen. The plouet will dnaw iext, graphs, and equations in lhc
samc arrangement that lhcy appcu in thc MaiCAD docwncnL

Whcn you tell MathCAD IO print 1 documcnt 0< part of a


documcn1IO1 plouer. MathCAD cxpands 0< shrinks thc oulpul
so thal il jusi fills 1hc pugc on lhc plouer. This i1 iliHcrcnl fr<lln
an ordinary prinier. Wbcrc a prinier would print a document oo
sevcral pages, lhc plouer will shrink the documcnt so Lhat it ali
fiu on onc pagc.

1 Ma1hCAD lgl1();~~;;;g~b;~~:;he~plo~1Jn-----
On plotttrs, MathCAD shows differelll p/01 traces I
difltrtnl colors, u.ring up 10 four colors when IMJ are
availablt. 1/ difftrtnt color ~!U are MI availablt,
MathCAD wi/l send ali plolltr owpw In DM CD/or.

S pecifying the print area


Bccause Ma!hCAD plots thc entirc print arca on one page, it'1
impooant IO spocify thc print arca corrcctly whcn plo!ting.
When you plot, you 1ypically spe<:ify 1 prinl arca no1 larger Lhan
ooe scipcn.

a prinicr, thc dea11ll print arca i1 thc


whole documcnL When you have sclccted a plouc.r, by con=
lhc dciaull print arca is:

Whcn you have selccted

evcrything visible on thc screcn, if thc cuna is in lhc upp.


left comer or thc acreen.

a recwiglc drawn from Lhc upper lef1 comer of the scrccn


thc: current cursor posion. if ll10 cursor is no& in Lhe uppa
left comer of thc scroc:n.

Whcn you use thc print command, you sce this dciaull priru

arca. To acccp1 lt. :cess (.J). To print a different arca.= thc


default and enicr ncw values foc the upper left and lower light
comc11 of lhc plim arca.

Ways to use !he plotter


When you use 1 plo!icr, thc first thing ID do is ID decide wlw
pan of the documenl you wanl IO appcar as outpuL Oloose a
&inle graph, scveral cquations, an eqWllion and 1 graph, oc

similar roup of regioos and arrangc them as yoo wllll


them IO appear on lhc page.

IOllle

11 the itwls you wanl IO plOI are big enough io fill a acrc:cn,
acroll the scrtcn that thcy fll it and mak.e swc lhcre are no
othes rcgions visible. T1lcn movc the cuz= IO thc uppcr lcfi
comer or the screcn and use lhc print command. 1l\C dcfault
print arca is thc arca visible on thc screcn; if you pre.ss {_J] IO
acccpt this print arca, MaLhCA O will Jrod an imae of thc
acsccn ID thc plouer.

'

lf lhe ilems you wanl ID print are smallcr LhAn 1 full scrocn,
acroll thc scrcen so lhat thc itcms you wanl IO prin1 are in thc
uppcr lefL Then movc lhc cursor lO lhc lowcr tigh1 of thc arca
you Wllll IO print and use thc prlnl tommand. The dcfaull print

'.

~~ '''. ~.':~:2::'.:":":.:~~:.';: ...'.~.:.....


:gins at the uppcr lefl o< thc screcn ami extends to the
l cur>r position. Pre.u (.JI to accepl this .int arca.
:AD expanili thc sckcted aru to fiU the pnge on the

:t plotttrJ al/ow yo to uc IN arta NJtd /or outpNI. 011


IP plotttr.for anmplt, 10 can 1Ut tht bwtoru labtftd
Vid l'2 to Jtl IN corn~J o{ tite arto lnw which to plot.
hCAIJ rtspuu thtst limlJJ; ifyou pro1ram IN plotter
1 a muJ/ltr prllll orea, MathCAD .,..fl send ilJ oNlpW to
011/y 1/iat rrnalltr area. Su your plotttr tna11ual for mort
1rmatio11.

rnlnt. lf yo mulplolln 0111pw to afllt lruttado/to a


11tr. ,.,. COMO( copy /l IQ IN plotttr wlth tht DOS OOPY
'11"1Jll<, r
1"JL!f uu tht DOS PRINT command. 011/y 1/w
ITT command lmplt-Ns tite Mcasary "/taNJ.Jhakbtt"
comnuutlcati111 wlth a plottu.

"

"/~~~~

&cape sequences. :-,, :1, ::' '" ~'-["-"'' .r:,,; ;.,1.;;, ~if1V", - .

11.

r :;~-t~

[)ocumenl form11tinc and rrinn

Here are >0me possible uses or this fearurc:

1;11
_
...... _._1j]
1:11 ~
lif ...... ,!]
1

MnthCAD's printcr output is dcsigncd to be similar across a


widc variety o dot-mntrix nnd h"cr printers. In gencrnl. th=
printouu are entirely acccptable or communicating and making
a rtcord of the calculations you do in MathCAD.
Sorne printers have special featurcs that MalhCAD docs no1 use,
such as diffcrent fonu, sp<eial characters, or letter-quality texL
There a.re two ways to take advantagc of lhesc features. U yoo
plan to use a panicular fcaturc often, you m.ay want to write a
printcr drivCJ Cor it M delr.ribcd in Appcndix D. "l'rintcr
Drivers." lf you want to use a eaturc for pan of a single
document, you can gnin 81.:Ccss to lt by sending ASCII co<k1or
tJca~ stqutnctJ to your printer, IS describcd hcre.
An ASCII code is a decimal nurnber that represcnts a printing or
non-printing character. An escape soqucncc is a set of codel that
are significant to a printcr, usually beginning with the code for
liSCAPa In MalhCAD, ycu crnbcd thesc ASO! c<Xles and esapc
sequenccs in tet regions.
Warning. Tht lxhavlor ofASCII codLs and tscap<
stquc11cts Is hlghly pri111tr-sptclflc. lf-you prlnl a docJtmt"'
wlth tsc~ stqutnctS, tht rtsullJ wt/I vary from printtr to
prl111tr.

To include an ASCII code In a text rcgion, type a t..:kslash (\)


followcd by !he decimal number for thc character yoo want IO
~nd 10 !he printer. For example, to create a text region
containing ASC!I character number 12 (form-fcro), typc:
"\12

Whcn you print thi\ text region, MalhCAD will lnterpret the
bockslash and numbcrs as an ASCII codc and scnd the
corrt'JMWHfh1K charocter to lhc prirncr. In 1hc cxnmple ahovc,
McuhCAI> wlll 1Jr~11l a fo111a ,,...,.,.110lhtl1111111,,1.

'

Tn l11rlu1/1 nn nctun/ />ar.AJ/n1h cllnrncttr In a ttxt rttlon,


l'fl~

two bacl1fo.rhn: \ \.

Sorne printers u>e escape sequences to set print atuibutes


lile un<lcdining or boldfocc. Yoo can rum thcsc attributes
on and off by including e""8pc scqucn<:e.! In your tet
rcgion. For c..mple, supposc you include the followin&
tell rcgion in a MathCAD documenc

)'.!!:tJ

.11~ lill.
:rr9~

When you print this document. MathCAD will send thc


ASCII codc Cor B.5CAPR to thc printer in place o !he \027.
lf you vfint lhls document on a HewlettPackard LaserJet
Prin1e1. the printeS will intcrprcl the lirst set of codes as
B.~CAPB ad o, thc eodc for "bcgin underlinc, and thc
llCCOfld ""'of codcs as l!SCAPB ad thc code for wend
undcrline." The result is shown bclow:

n~~...:ta

E~ J!~::u

1~

J!!~=i
1~-:!!~;1
Jll
ilt:---~

llll

On printm that can print an extended characlCr set, you can


use ASCO codes to vfint characten that cannot be typed
directly inio a tcl rcgion. For cxamplc, you could enter thc

following scqucncc in a tell region:

aenri Poi.ncar\130 eaid,


rTic with a 1111111: \001

1~!!s.

Il~ -!!~::1

Refcr to your printcr manual when using escape scquenccs in


MathCAD. 8capc 1eq11Cnces 1end 10 be oomplex and hardWlle
clependcnL Bccausc o( lhis, MalhSon Tochnical Support may
no: be ablc to help yoo with complicatcd C9CllJ>" scqucnces or
!hose that use fealllrtl specllic to your hardware only.

Th equation i.n thi


doCUJMnt are
CQl!D?lotoly oriqi.nal.

111~

- ....
111~ '
ji
l~!!:~

Never tl.1C esc1pe ICqllCllCCS to change to a lasger, smalltt,


or proportionally spaccd fonL
Wornlnr. BtcaOLJt acope uqutnctl dt~Nl 011 -your
parrlcwar ltardwatt IJlld lnttract dlrtctly wlth chal
liardwort, rltey CtJll illttrfere ~~lvtly wlth MathCAIJ' J
OtNr prlnllnt/tatortJ. MathCAD prlnu a doc.-111 by
prt111l11g.for tach Unt, a llM o{ltxt ovtrprlnttd with a llttt
of 1 raphle1. l/yo ~ tscapt uqutncts rhal clia111t tlw
spacl111 o{w ttxt "a llM, tht tar and 1raple1 wlll not
/IN! 11/' and IM doc-111 wlll no lo111er prl111 ltglbly.

Th equation i.n thi


document are
\027,dDcompletely\027Cdloriqi.nal.

u~J:irijl

I~.. .,.:a

On a printcr tha1 can print !he IBM etended chanlcttt 5Ct,


\130 appears IS~. and \001 appcan as a smiling facc. To
get the wne c!Tcct on a print.er with a diffcrent chanictet

toeL you would have to u..e different codes. For cumple, on


thc ! Ir Laacrlct, ~t.. ASCII clwllctcr 197 (\197).
In a docnment that uses mied !CAi and graphics, follow thcsc
rule. IO avoid mi!IAlignment problcms In printing:
Nf''f1'11

nen ~ 1"'

eN(UNM'" ' 10 chanao

to ron(k;nM:d or

cx1)8.ndcd cluulteta:s.

Ne""" 11111 t.acapc 111Cuonce1 IO chanc thc horlrocii.al pltch


l<l"lntin1.

___ ___________ _._

--.. -- ..

k..- : ..

'.L ._L :'" r.~: ,1 .. :-... :._,.: ... .:'. ..... ;,,

' ..

- - - - - - - - - - - - - - C h - o x c d ~-- ~

i'i

E 3

E: 1
.. _~

:.y.~:~:--.:,~:::-:-:::-~~=::-::..~~
;-: , .
bfl#a4rfatY4eY,i~tetdWt aki'tt'e,..r

.-:

...

~~';,: . ;j~;',;':

.I

Configuration, DOS,
andMen1ory

1.

L-.r:!!S

e::-- ' .::a

r
E~

k=L~
L.

,J

This clulplet dc.!Cribc3 how 10 gain a::= 10 lhe DOS romx


from Ma!hCAD and how 10 monilOC Ma!hCAD's mernory use.
This clulpca also describes MalhCAD command file.i, includin
thc configUllltion file.
This clulpta contains thc following sccticxu:

DOS acctsa
Executing DOS commands rrom within MalhCAD
Monitorio~

available mtmory
1e mtmor7 command; how MathCAD uses memory

1.~

MathCAD command l\ltS

11

Wbtre MathCAO loob for syl<m llts


TilC ruJCJ1 Ma!hCAD U>CS U> llnd tl1e 1!clp lle. lhe
printa-drivu file, and otha syswn riles

iii

1~-11

1J~

1110 oonflgunuim llCJI a11d \Xhcr MathCAD con1nwld fc;

[db;
[

!IJiJ

l[.L.i

.L

le::-~~

I~
1
~

;.

~~:;rJJ~tj~J.~t~,,Mii.qti~:ti'.ti!i~;~!~i[(:1
~f3ist.tMe~'i.~Ti:t-:i'!'IS'M-1't~~~li.~fa~~~~2lii1h!fa~~:.:;;

:~lF~~;~(~-~~~Mi~~I-Tfj~~;:J~~i1~;;[~~~f~~:I.~~;,_}~;:f~:r~~J;t~J4;}.;.~~~~~~.z;::::.-~~~:;:.~~;~:~'.4 ~ ~~~ :.:. ... .~ .

.:

...1'

~ .~ ;.t~;:~ ,1.~<.,:z .: ;

"1><6

oCTlOll

-.rsll O# UOfClllLI . ., ...

lt.llt>CAO"
DS

FIJICTDI aTllT MAllE

IT llENU

IJ:o) . . . COHnd [.J)

1:a1311 1
.. :a lt I

r-~..111- or W-h

.. : . 11 1

rM.l..a

. ..
~ :a

[1'10) 1 D

...

im IW"

,... ...

ti CAD
os command intcrrupu a MllhCAD scssion

' you CID

IC. DOS command, SllCb as Dlll, CX>PY, RENAME, or


SK. When )'OU havc fuiisbed the DOS comnwid.

' :. 1 "
I

. ,.,

1.1-

I I

...

'

u.1- 1. rl\4 e
JOSH
tl..-i.,.., ,, C1\ICAI
111>
Ctlll
fCM
..,
11M.l
,.,..... tCI
w.6
KM
tcl
lll1
NOLIM l'CJ
u1r
lllnY
l'CI
UTY

--nw"

ICITUpl MalhCAD and CICCUIC 1 DOS command, typc:


EacJ do (.J)

CAD prompu you IO l)'IJC a DOS command (Figure 1).


any commaod you wcUI l)'Jle 11 lho DOS promp1, Cor
ple:

CAD clcan lhe scroca llld pwu yOUI command 10 DOS.

rrom

llf.
11! 1-:
11r
l~lb'l,i

._ 1111

-~

lc_.,11;~
biehnU

l~~!~:a
~ ~ ~-111! ::51

ZSI,
%11,

11'"'
Utl,.
llISe
UlS.
11 U

rrus:r

JIH

ll,_..., U14h

"LAI
liUC*

tcl
l'CI

4M

DSt

ll5'-CJ 11-4\a
ll,._.f 11'"9

sr.11

..:v

i..sr

1-1Hr Uffl

t1s-n Ult.

Tll...OU !'CD
ll4l
l IS-11 U&
HU
l<I
IS4
l"'l\-11 UU
C"ICUll PCI
1'1'1
l-1~11 llIT
~
Dl
l1l1l"t >-r-.-1 ........
" FllaCI 1..,_ ~t.. lrw
,,..... ... ~ w, ,....,. ,. "9\JriCAtl

IIa (.JI

11[

MUTTMN lt'.:D

nz

.... :tJ

11:.;J

..

'''"

l-lt--91
J-1....-r
....,....,
ll$-C7
l"'ls-t'f
. .... ~
l .. lHJ

I~

[~:i:g

f9n 1: W.lhCAD JIQfftpll you ID ...., 1 DOS COl'IVMnd.

"'"""

e 2 shows lhc rcsull ol caccutin a Dlll command


1MllhCAD.

j\ :

:AD ICIWllea wherc 7119 left otf.


nl~r. You CllllllOI 6Tll/1I MOlJrCAD ro uu a DOS
rlMONl IUl.SS MOlliCAD loas ocuu ro IM DOSftk
l\MAND.CX>M. The CX>MMAND.CX>Mft sltOuld be ll liv
'I dJrmory o{ 1/w driw Jr- wliclt. 10" narud -,OllJ'

l.ttlal Miele -

...... tt lt.nal:

~
u.... u.:

41..::.

~kli.eor-c:.

:uting a DOS command from within

'

rrl11\I llOl{rlot.t

1 : -1 (55 .._.,

J:__:it~

!ri:f;~

Sacw.;s
INOlf

lit l '

t.

f9n 2: lnl!NrUpng MllhCAO ID UM flo Ofl OOIM\lllld


When DOS fini.shcs cxcculing lhe cornmand you typed, you xic
lile won1s Presa any by to rttura to MathCAD. Prcss any
key, and )'OU muro IO MalhCAD cucll y u it was befon: you
lllCd lhe dOll c:ommand.

'[C
1

11-=1L~

r' ..

'.l l lJ

Jl!!9

ll~~:a
11~=-~.:Ji

11~

11~- ; --~

' ' ......

'"' '"I' ... ....

. ... .....

T.,,. txlT W nt.u'll U MtUClilO


TU l mit

U.ni

,._,...._.

C~Ur

toS

J . 11 cc>CP'l!rhlil lUor-Wtl-1 1- 1 - ~1- e~

um. .

l"

IC)(Anll1Ji.l "IU"--'l tarp Ull . IW5

C1VCAD1ol'
, , ,~---~

wilhoul waiting Cor MalhCAD IO prompt you. Fe.' ellllllple, IO


cxecuie lhc DIR comniand described above. you could lype lhis
command IO MalhCAD:

,.,._... o

ruuo.r<D
ltNt.tCD

oruv.rc.1
n'1'\ICCll.,l'O
#IHA.ICD

(&ac] do cilr [.J]

MalhCAD's dos command givcs you acccss IO lhc Cull power o


DOS Crom wilhin MalhCAD. You can intem1pl MalhCAD and
use any commarul you can give al lhe DOS prompt, iocludin
commands IO run <Xhcr appliclltions programs such as icu
cdiwrs, data acquisition programs. a communicatioos prograrns
(so long as lhcy fil in lhc available mcmory).
Tlie Ma1hCAD dllll command allocatts only a /lmittd
'"'"""o/ memory for e.ucUiing DOS comll1lUU. You IM:/
not be ablt ro'"" certain largt programs, such as IUt
t dilors.from wlthln MaihCAD.

Starting a DOS shell


U you want to cxocute acveral DOS commands bcfore you
mum IO MatllCAD, sUUl a DOS slitll. Whcn you ask a 1 DOS
ahcll, MuthCAD inteJTUpU ilSCIC and prescms you with 1 DOS
prompt You can cnlCr as many DOS commands u you wanl
and thcn typc UIT IO rcwm IO MathCAD.

The dos command brings up lhc prompt DOS> on MathCAD's


messagc linc. Whcn you type lhc sccond Enier key, MalbCAD
ahows you an acwal DOS prompl (Figure J), al which you can
cnLCt as many DOS commands as you want. To cxit lhc OOS
shcU )'OU lc!I off, 11 the DOS promp1 iype:

.:e~ 1';

This rttuma you IO MathCAD whac you ten off.

Y ou can also spccify lhc DOS command you wanl IO execule

.Lk ,:;i_

IP

~ ---- --'-~ ---- .... 1:~ .... - " ' - - - '

lll'? [.J]

Warnlnf. You caNWI .xecUle 1erm:lllJU-andslayrtsidenl" programJ wi1h the dos convrtlllld.
Tenrunato-<1nd-s1ay-re.siden1 programJ lnclude pop-up
accessories and som DOS commandJ including PRINT and
MODIJ. Using such progrQMJ with the dos convnand CM
cause memory-rr.aMgtmnl confllcu. 1/you w<llll W '""
such a progrQ/11. use lt befort you sUUI Ma1hCAD.

To swt lhc DOS shcll. iypc lhi.s:

u~!!~.

Cunticuration.. OOS, aoJ Mcmory

JI~
ll~ m1.:ii.

' :11

'

... ~:.:/{ .?,.~;~-~....:~._'. :

[&ac] do [.J]
[.J]

CvtLI 1D. tCI


rt'fU. fCI
l'IOCTAL.PCll

111.Cal -.1M

, ., . . \ICIM
["ICM

FlQ<n 3: EJ.oou*'V commllllI In a DOS 11..it

For cumple, IO eucuic throo DOS comllWllis and lhc:n rclUm to


MathCAD, you CXlllld lypc lhc following:
Uit MaihCAD' s OO. command.
UathCAI> prompts )'IJU on IM
WILJ.Ulft lw wilA DOS>.

[sac] do [.J]

ResponJ 10 MaihCAD' s DOS>


prompt by rypi11g {.J].
MathCAJJ J1ar1J a DOS shdl.
You can now "'" any DOS

(.J]

co"""'wls -you ""111.


CD \ [.JJ
c:o11r , ICD
CD \)CAD

Ty~

a fcw co'"'"""'1.r ro DOS.

\M:AD [.J)
TM DOS command EXlT
re1urns you ro MaihCAD.

lll'? (.J]

Waminf. Whe11-,ou uu a DOS sliel/, dan' 1/orgtt 10 u.se


BXIT ro"""" to MOlltCAD . l/you/orgtt to"'"'" ro
MailtCAD, Olf1
)'OU liaw not ~t saw:d wiil bt losl.

"''*

' :,)::,:. .."::::.

L.----~.; : e,'<~

rl':;'w:~::[\'..:~~~~J:~::~

/:it:::i
Chpttt 6

84

Monltorlngavallablememory ,;, . " .


COMMAl<DSll
THS SECTIOH

fU!CTl)H

lllEHU

KEY111l llAllE

MEMORY

Sl'ow_,,..,,,_

[Eao) - r y [.J]

[J'lO)

Thc third numbcr (if any) is !he numbcr of KB or c.pandcd


memory used.

The ourth numbcr (if any) Is the total numbcr of KB of


e>panded mcmory available to MathCAD.
Warning. When 1Mjlrs1 numbu gm wl1hln JOK of1he
second nll!nber, you may ~ clost 10 rlllllling out of
mtmory. Once yo"""' 0111 ofmtmory, yo" caPino1 add
01tylhing 10 your documLnr.t.

The memory command


To seco how much memory is in~ use !he memorycommand.

f>1><::

The suond numbtr In mtssagt for the mtmory command


reprtStnts MI IM 101al mtmory on your compuur, blll IM
amoun1 ofmLmory availabltfor a Ma1hCAD documLnt.
For tmmplt, lfyoK havt 640K of memory, thls numbtr may
~ JOOK or ltss. The dlfftrtnct ~nwtn these two numbtrs
~prtstnr.t mtmory 1/ral Is iutd up y programs rtsnt In
mtmory befort you can start using a Ma1hCAD documLlll,
,,,,_/y: 1} DOS list/f, 2}MathCAD ltstlf, Oltd J}any
ttmtinatt-and-stay-rtsknt progrcuru you 11111 ~fort
MachCAD. Slnct rlrue programs ra up room In tite
compultr' s mtlMry, thty dtcrtast 1/i.t amo11111 of spact
availablt for lhe MathCAD documtnt.

[&ac)_,,,.,ry (.J]

MalhCAD shows oo thc message linc how much memory


(RAM) lw bcen u.sed and !he IOOll mcmory available in your
computa' (Figure 4).

lllA.Hll .. MClllllU . . llC.

11 : CJllt

.. ..'

: ltl

,..,u .. .1..._1
........ o( 41.ca

"

_,,_

: ltl ..,.

......... f..-ce
rrlotl DM(fl.t.t

- " e .....,,

1.tu.1 -"' -

._.. u ... 1..__11

,_

l\..w.. ll!

JI

f.f

..

-- -

n Al

..

""-'-"

Flgu<e 4: Mooaogo 1;.,. allot lAling f>e momo<y oommend


'l110 11111111 .. n ''"'"'" .,~

11ils Is wl1111l.-y

111 K (rt1~lllnt kllubytM ot ltAM).

~t:

11ie lhot 11urnh<1 ia thc numbet ol IUI ol atandanl mcmocy

(RAM) uscl by your documcnL

U1e following:

The Ulltl! me.:mgc In thc uppu right coma of thc ocrocn

Mall1CAD JK>SL lhc message Out of Mtmor7! l'rts. (116)


(H) or (Ctrl)Q (qult). on the nlC.'l:mgc Une at the lop of
the .croen.

tend< MEMORY.

J 1 .. ca

C-..t _.,.

,.. 1 . . . . . . .

or

Thc 90Cond numbcr 11 lho numbcr ol K.O surldanl


mcmory dut wuc avallable when MathCAD s1Art.Cd.

Math< :At> 1trflvN1I! y,u rrom dcMng anythlng hot 1avln1

willo (r61, quiuing willo [Ctrl)Q,or swiichinK wiudows


with [re).
Thcl""

-=a

e:~
E ~

E~;~

:E:.-2!
!El~

:E-= 1!
r;-... -::r3

IL_J :!'!
I:-111 -!1)

Runnln: out or lllc:"ltlOry


When MathCAD hu run out or memory, you -

f'_:

lll~HK 1rc

trlKKmxl whcne..,, MachCAI> trlc.1 lo


tT!tltK'ISI nuwo mr.nu>ry than Is cunt:nlly nvil1hlt1. '11111 b likr.ly
to hawen il yuu ux variables wilh largc suhscrlJl.1 o cmuc
calculations dul rt<UtC 1 IOl O Stonlge space for intttmcdiatc
l'Cltulu.
When you rcach an out-ol'-memory oonditlon, do the Collowing:

1~~
11-::i
id.~

11[

~!
~I

!J

11[; '" !]

kd~
[~

rn, ~

.', .

..:,~'. :':.~:~::;r,:.::;;: j;,1.;,1~f~~k;~'1{~1{~,ijl1>1;;,,1kf~;:.i;{0Kjv.W~;.~\?l:.'.~ti.;1.J;:,1 w.11~;:'-;t~'.1 \' :

. :

.1

~~~L:L:~~~ ;~;:.-; : -:..:::~ ~ ;.t;::;i!r:~~;:~:.~~;~.r.~}\.,:J& 1,/;;:&J.<./~i~i~i= ~,.:, ;;~:-#:rs. za\:~~lJ


Confi111ntlon. lX)S, 1.rKt Menkny

A~

H you don't want to save your wc, press (Ctrl]Q to qul1


MathCAD.

Ir you do want to save your wcrt, press (1'6) and spccify a


ilenamc. Then press (Ctrl)Q to quit MalhCAD.

lf you have two windows open and you want to save the file
in the oppositc winclow, press [r 8] to switch windows and

(r 6) to save.
I! you try to rcload a file that you savcd while out of memory,
MathCAD will once again run out of mernory. To avoid this,
load !he file in manual modc by typing this 11 the DOS prompc:
>CAD /M fllename

Cnce yoo have loaded the me. rcmove cquatlons lhat use upa
loe or mcmory or try to split lho
up into two or more subftlt1.
To avo id running out of mcmory whilc maklng thcJc ehangcs,
stay In manual calculatlon modc and do not try to recaleulale !he
documenL

me

Expanded memory
MathCAD supporu !he Lotus/!nreVMicro90fi Expandcd
Memory Speciication. lf you have 1 mernory board or Olhcniemory cxpnnion rupporting this specificatlon, MathCAD cm

MuthCAUcun"l~andfiles
COMMOOSll
lllS SEC'TlOH

--..

.. ,. i._:'-'"'. ;'.' '

f\llCmll KE1'111Y 1W11!

ITltEPli

CONFIGSAVE

[bo) -fiqaaTe [.J]

[J'lOJ

( b o l - f!lnme [.J]

[J'lOJ 1 E

EXECUTE

& ..... a ..........

Commandmes
A MathCAD command me 11 a io.t me ;:ontainini a RqUCnCe
of Ma1hCAD commands, one pu line. You can run lhe9c
commands from wthin MathCAD wtll thc ntc11lt eommand.
When you swt MathCAD Crom 00~. lt &U10m8ti.:ally runs the
command file callee! MCAD.MCC (lhc co;.,1-~11c11 JI~.)
'WIU"lllf. CommandjlluanASCIT tutfllu. Toa-.n
crtott tlimt /JI a tat editor or i ,,,_ otllolr way tlial
ieuratu a plallt tatflle. Toa Ctlllltf crtaJt them o.1
MathCAD doc-1111.

u~ 1hla t~lf "'"'mory 10

lncmun tJM, amount or ""'"' avallahlo


fo your 1kicu111cnu. Ux thc mtmory command to aec how
much oxpnmled memory ls available and how much ls uscd
any glven tlme.

f..tKJn.lcd 1rtemory and standard memory art 1101


ln<erchnnKtnhlc. MmltCAD storu only p/ou and array1 /JI
uwn<lttl memory. /!verycNnw 1/u must ~ 1mud In
"""'''"'' irv""iry 1RAM nw1liilhl1 up rn MOK). nunN# n(
thJJ, "''"' ntdJ 1un t1ur "' Jl4Ut,Jdrtl ttUmdtJ. tWn whe11 there

Is stlll o:pandtd mcmory available,


M<11hC.'AIJ .rupHirll me'''"'1 ahow lJ(),\" 1 MOK limil 011/1
lf thm -"""1 rmt/MWU In tlw lotusllnt<llMlr.rosnfl
f..t/"'"''"' Memory Specf/lcat/011.

Each line In acommand rue corubu ola comllWld name,


followtd by arumcnu to lhc command. lncludln a Une ol lcxl
In a command filo la cqulvak:nt to praslng (JCc) and ryplng tho
ame line ot text 11 the Command: pmmpt in MJithCAIJ.

A tcmlrolon (;)In a MathCAD command file is interpreted as


lhc bcginnin1 oC a oommcnt. Anythin1 aftr.r !he 10Cmicolon la
lrnore<I, up to thc md or thc llne. Dlank linea ..., airo l1n11rtd.
Uta t"om1nm11 1N.t ht1nk linfll kl mllkt'I your ('cJO\m1nct fllcis
C&Ji ... to rcad and m<J<C und<ttlAndablc.

flor cumplo, ruppoeo you wanttd _,e"""' a rommand filo lhl!I


puta MathCAD In 1n111ual rn<xlo. lc,.,ls clocumrnt call<d
AHAl. Ylll, pnu- lt, and cht:n rn<> UKI cuno ~ lino 100 In
thc me. Tlie filo ""Id look lik.c thls:

manual
load an.al:rt

--- ~ . :.:''.:. u: ' ;>.::..'.: .,':.~: :; !, ;: . ' , J }; .:: L;,; ~d


!.. ...

t"Ocese

oto 100

;Ti Yarlablea of intereat

)IJld C"'81C lhis file in a lc>.l editor and save itas


T-'ICC. (MalhCAD asswncs lhat command mes have the
ion .Mee.} To run thc file from MathCAD, typc:

You can crcaie the conftguration me with a tcxt editor, as you


would any olher command file. Altcmatively, you can use
MalhCAD's configsut command to crcaie a configuration file
wilh thc curren! conliguration. To save the cuncnt
conliguration, i:ype:

(!Cae) contigsa... (.J)

:acJ uecute loedit (.J)


:AD thcn CXCCUICS eadl command one by one. Aftet
:AD CJle<:UICS the file, thc !ICtCCll wiU show line 100 of the
r7Jl file. in manual calcWation mode.

MalhCAD prompts for a fename undcr wtch to save the


configuration file. The default is MCAD.MC:C in the cuncnt
dircctory. Prcss (.J] to accept the defaulL

The infonnation in the configuration file consisu of:


~s of lht co"""'11tds art MI always tht ~as tht
cti.ons s/iown in 1ht mcuu. Su Apptndix A, MothCAD
far tht corrtct llDMLS '1f al/ lht COIMllJIU.

'""et,

"'cornmands pro,.,.,,1 /or lnformatlon on tht musagt


(for tzomplt, asking if /J Lr OK to ovtrWritt an tJ:istint
or pro,.,.,,tingfor an "''"""'"' lf OM /.J no/ provldtd). lf
1Ut such a comrnaNlilt o commandfllt, MathCAD
mrts In tht middlt uf tucuting tht commnndfllt. Whtn
r.spond to tltt promp<, MothCAD contlnlU!S with tltt
vnandfllt.
'"'''""''""" llkJI MI~"" ,,/1111/,/1 111,d/kdllmt (IJJ

rnat uJUJ plolfurmt}, JOM mwt

,..~ lude 1~

wJw,/t

cl{ication on tht liM la tht commandfllt. For uomplt,


'wu/, lnc/udt o //ne Uk thls In a cornmandfllt:

rm.ot

rd""1

otlO ._,.1 etl tl' P""'12

the currently sclccted printcr type

the current page length, margin, and line length

the current global plot fonnat and global numbcr fonnat

the current dimen.ion name5

the vnlues of the system variable. TOL {tolcrance ror


numcric algorithms), ORIGIN (array origin),
l'RN!'RECISION (decimal places or WlllTEl'RN fuoction),
and l'RNCOlWIDTJI (column widlh for WRITE!'RN
function)

Co1111111111d to

uc- In <"0111111111111 mc-11

MalhCAD command file< can ioclude any rommand thal you


CM euculo hy typing fhc). llerc are somo commamb lhat aro
useful in command fllc;1, iocludlng slarlup conllgurntlon file.,;
atliectprintier

11

Set~

coni;uration filt
CAD' configumlion file MCAO.MCC b 1 command file.
CAD autumatically Cllt>Ctltes this command file at slarlup.
irnlng. M01hCAD ""'""' e.uc111t rht con[lgwroti.onftlt lf
Mnotfind thtfilt. Set tAt: stctio11on "Whtrt MathCAD
fJ/or sysrtmfilts." at rltt tnd oftliis chapttr,/or
tructiol\S on how to lef 11p MathCAD to find tltt
nflgwration filt and Ollttr systtmfilts.

the printcr tyr.e. n is lhe nwnbcr of the prinier in lhe


prinlcr ..clcction menu gcncraltd rrom lhe printcr-drivcr !lle
MCAD.MCP.

.., varlablt val""


Set a starting valuc. for a sysiem variable. The Yarlablt
must be oneof the following: TOl, ORIG/N,
l'RNl'RECISION, or l'RNCOLWIDTH. For example. you
could indude command5 lilte set TO? 00001 tosct

the value of the builtin variable TOl. 1f WIU! is vcry large


or very small, rcprcscnt it in "E-format" {for cumple,
1.5&-6 ror UIO~.

,,rj~J ~.~

1
'J<'
'"'\" f..',r~ ....
r~1\A1
' :.0~"
JJT'. :, ... .~,":
cr\ 1
.:~ 0}.\,
i'.:': r~"-',,,
...'!,~ ''<'1l
' f:i;:..~~
_11... '"""ll;'t:

1.

~1<V' >~ .'' :'j :.:i .~~ .' ' _t~;,:.!;,,7~:;.,_ ~., ~~-~2:t~-~ :~~~: );.~1

.....~IF-

Configuutfon. DOS, and Mcmory

1~ikm

rormal Jptclftcatlo
Set default global formal.

eE_

~--1

-!.12

_0]4il

g7

Whete MalhCAD IOk.douystem ~fes :~: . ;i< .~,


When you Slllrt MAthCAf> and 8" you W1C it. l rcqultts llCC~ lo
various sysiem files. Ecept ror MCAD.MCC. which you creaie
with the connpave command. these fiJej are on t.he MalhCAD

plotformat sptcl{icoti.on
Set defeull plot formal

" '.D'.
.[

dlmtnslons sptclflcar>n
Set dimension names.

pagtltngtb nn
Set default page length.

The configuration me (MCAD.MCC). MalhCAD loob for


this ll stanup.

Font file1 (.Me!'). MathCAD 1oob for thcse ll Stanup (for


tc=n display} and while printing.

~
~--il

..

~ - ..... ~-j

,.;-" DJ-~
~ .J~ii

IC.. J - -llCI

~1re
E-.:Ja

~J!~
II~~
E!~
~!:il
~!~

JI.

t.~~

Sysiem and Auxiliary Oisk.s. Thesc files include:

o:ecule fl/tnome
Chain to anothcr command file. When you use an o:ecute
command. it must be the 1ast command in lhe command file.
lf not, MathCAD chains to t.he new me, but oevcr rcturns 10
the curren! file. Any commands after the n:ecute command
In the cum:nt me are lgnorcd.

The primer-driver me {MCAD.MCP}.

The help file {MCAD.llLP).

IC you have a han! cfult. malee sure you have copied ali the files
from thc MalhCAD di.O to thc MCAD dimc1ory on your han!
dWt. as dcocribed ln Chap4a O, -seulng up MathCAO for Your
Systcm." Then, if you always swt MathCAD from the han1
cllilt, you will be swe 10 have acccss to these mes.
IC you have floppy disb or yoo wsnt IO run MalhCAD rrom
othcr dirociory, you should be awarc of whcrc MalhCAO
loou for rymms files. MalhCAD always loob:

IOllle

flnt. In the currcnt disk and dittcrory

enrnnd, In 1hl> pouh llm1d In tht!

00~ Mivln~1mm1

v1rlOle

MCAOOOI (U ilca:rlbeJ bek1w)

thlni, In the MCAD dircctory on the currcnt diu

Alttmatlve configuratlons
MalhCAD crdinarily mumes that lhc systcm mes are ln lhc
current disk and dinx:iory or in thc MCAD dircctory on lhc
cum:nt disk. lf you want to place !he systcm files '"'""'hcre
-.lsc on yoursymm. utelhe OOS SBTcommand to !Cl lhc DOS ,
mvironmcnt variable MCAOC.iR to that disk and cllitttory, .a
MathCAD knows whcrc to lool:: for lhc systcm files. To use lhc
SBT command. type a command lilte llili at the OOS prompt
IJC~ IC:AODIR.-d.i~~:d~ctory

- - - - - - - - - - - - - - - - - - - - - - - - - - - -t:'
------ ------ -- - - -.---- ------

----- -

--- ---

----

-- -------~~ - - -- ---- - -

---

----- ---

- ------ - -

~
j

Clap< 6

l&f

~:

'
i,.

Computational Features

t=~

JI' ex.amplc:

llC'l' NCADl>X-: \

; !, ,

.', ,J ,,, .. '

T1Us Ma1/rCMJ IO /Q()kfor


rynuofllcs I~ w root
tlIO?"" tlw B drlw.

~-

T1Us Ma1/rCAD IO /Q()kfor

E=! 3

M:Alll>~Jl>oC:\BDI\

ryJUmjllcs U. tlw BIN dirccwry


OftliMCdrlw,

y seuing !he ;"viroament variable, you ClllURI tlw MathCAD


ilJ fW: lho filca UQf;,C(ja, QO mauc:r Wbal &he CWTClll dircclOl'y,

l.~:

3.

~-l.!

i~
l:= ~

~J .:~
r;-

r( .

rr~:" .:.:
..

1 :: H ,.9'J

HEllO( '!)

::

'..
,..

U : = HEOD( fZl

!.

!~~~:;'. ,
;,.:. ~~

STAT ISIICAL fUNCT IONS (linear regressionl


ttc.111(x) :
~t <iv(x)

vdrCxl

19~i

: 21111.G&l

= o:i:JZ5

r :: corr(x.u>

C... - 1-~

l:Jll

71, Z1
sl1l1:vC:1> : J:J. 1IG
var<u> = 1096.67?

MC.111( ~) :

tt : = slop11Cx .:1>
h :: l11tcn:c>lC.,ul

! ~

~: 1

~~
~

., .,

' '

t
/

'1

ir11

''

(,:

- --- - -----

' 1" 1 .. 1

-.

. ..

[,

r : H. '.Jlll'JifJ
" ; 9. HJ:J.'I'/
b : 23.HIUH

.~J!fir?
. '
M 1 -rtl
. ;({11'

i!i

0
0

1000

[: !J;J

~J-l
~~

~~

2:

+ V

1~~l~~~f41~~1'ifJt~~~;mI~~i4~iiTI,~~T-~Z4:1r.tf~;~~~f~i1)t.: t: :'.,~ . ;,: .:: " .-

'.:.:.,

,....,.,., -r::r.-.,,-F r..,. o:~_,,.. ~"; "---.-----

"'

;;J7Ct}2:~:.:;TI;r~v:n~~4 7:1:.,
a&

- ---

~r~-=r~
:~:!:!
.t~

...
J_
~

Equations and
Computation

ll C: Jll -'

ll - .

f.pll" B
,

~ri 3

r:~ i. ~

l~~>i
l~T- tm

Tll

~-.,... - illl

!FJ!!~ll
I~~~
I~ !!:!!

I~ !~ :8
10:

1~~-;i!_

lt!:!!!::a

IQ

. Y'
.j,1.,,

Thls chepter describes how MalhCAD dcals willl oquatiom.


lncluding local_and global dcfmitions and calculalion cquatioos.
This chapta contai~ !he rotlowlng occtioni:
Typd of equatloDI

Definitions and calculatlon oqultlonl

Fundlolll
Built-in func;tions; defmin& 'fOOI: own functionl
ProceSSln& equatloM la automatlc modt
How MathCAD evalUllCI equatlons In aotoinallc
calculatlon modo

1'rOttt1ln1 equatloDI la mauaal uiode


How MathCAD evalbllel equationa In manml calculallocl
mode
Olsablln& eqaatlonll
How IO tum individual equadons olt or on

ltn'Oft
How MathCAD dca1I willl erren; how to ful erron

l
1
1

,\

r
\

.. 1

'2

~ff 3

Chap<er 7

Su Chapttr 8 for a tscriptlon of Ya/id wviahle

lhuc are two b&sic 1ypc1 ol Ma!bCAD equations, deflnidoM


nd clllcidation tq""'iolU, ThiJ sectioo dcJcribc:s delinitions and
alculalion equaoas and cxplaina bow MalhCAD llJCS lhcm IO

MatltCMJ a/so al/ows you to tfinefuncliollS, subscripud


wuiablts, and veciors of wuiablts. ThL 11u1 seciion in this
chaptu dtscrlbts tfi11/11gfU11ctions. Chapter 10 describu
tkfinlng a Y<!CIOr <fwirtablts. Cha>ttr 11 descrlbts
subscrlpt<d wirlahlts.

ssin valucs and calculaic Rllllhl.


TIW cloaxtr ducribu ottly how IO compust witlt tquallollS,
For lll/orrna111>11 Oll "'1w IO ldiJ cqumlolCJ, su Chapur 2,
"fltU.t EqlliJIU..."

Calculation equatons
Calculatioo equatioos compuic rcsults. To crcaic a cal<:ulatioo
equation, typc;

>efinitions
1cfinitiona ICt variable Yaiue&. To ddine a variable, you musi

rpe:

Tbe variable lo be dcfllled.


A del""tnilioa symbol (:).To typc lhe dcfanilioo 1ymbol,
press die a>lon (:) key.
An cxprcssion. Tbe expr-cuion can be a nwnbct, a variable,
or any combinaliaa cJ vuiablca and nurnben.

An cxpression. This can involve just nurnbcn oc numbcn


and variables.
An c:qual& sin.

MalhCAD computes and shows thc valuc o( thc cxprwion afta


thc c:quals sin.
Figure 2 shows aomc calculatioos wilh thc delinilioos from
Fi&W"C l .

n C01C1.a '"

Cl:IC 9111

...
.

.,. .

l : lLI

: ...

\ : U.I

H ' .. 1 .

. =
t

. -
: . 11

. -
, . 11

"'
. , Ul.'31

:.

- "1.m

FunctionNaaie(&rgl,u:g2, .. )

2.!J

,rI!--1 .~

.!!I

ournbcr of argumcnts for a built-in fwx:tion .

JJ .
~::y

Agute 2: ~lion..., l l e - do_ In.,. _iouo liguro

~;1~iilme\1~.~'Jolfot~(,;ltJ:~;n;: l~~;;u

'. 1

Thc arguments-arg/ , arK2,and so on - appcar aflcrlhc


function namc in parcnlhcse.s, scparaled by commas. Thesc
arguments can be numbcn, variables, Oll any otllCl valid .
Motl1CAD cxprcssion. A fu1~:11on may Ulke onc arKumcnl
Oll IIIO<C than one. The nwnber of argumcnts is fixcd. S<>e
lhe desriptions in Chap1et 1J to determine thc correa

Whcn you use such a function in an tiuaon, MathCAD


cvaluates thc argurncnts, applics lhe runction to lhem, and
rcturns a resull to be use<J in thc Cluation

Figuro J shows sorne ways IO use built-in functions.

:iJ

JI
~,--

d.:
~~:~-JJs~r~.: ~ .~~-:. j~~~~?{:~:.;: . :_~ ~~ ..~::2'. ~.:~ ..

......

: 1

In lhis cxrcssion:
FunctionName rcprescnts !he name of lhe fwiction.
1
MalhCAD function narncs are case-scnsitivc; you mUJl u.sc
upper Oll lowaca..e loucrs as appropriarc. (Scc lhe l.iSI ol
built-in functiom in Chaxcr 13.)

- :
11
1 ' .~:::i

"1.111

Whencvcr you cnlU a c:alculalioo, MalhCAD shows a fanal


plauholdcr M lhc cnd ol the cquatlcn. Al 10011 u you movc lho

~~-~t~~~~i1

You .:an u.se 1 buill-in function in any M.itl1CAD jualion.


Whcn you use 1 fw>etion. you must typc an cxrcssion of the .
following fonn:

11

lJS(

Built-in functions

!...-.:.;
-

range o[ buill-in func tions likc sin, m<:ci11,

MJi1hCAD. 111 sccon cJiscu'i.~t both hu1h -in um.: on and

F=;' 1 !!).
1

w~lc

Cunctions.

J!_g
I~
- '1

MJllhCAD hJu a

and/fl. You can aJso define yoW' own u.ser fuMt io ns in

1[

:.

,.... 1: Oelnio<w

cxplained in Cluipiu 9, ''Units and Dimensions.

=
!... -u
'-' - ~

Fundlons:" ~H~.... _,,, .:~t;~~}-~ h.~...~-.. ...,.r1 '!J~f'f-t7n~~4'

cursor out of lhc region. MalhCAD hidcs the placcholdct frorn


vicw. You can use lhis placcholder [or unit convcrsions, as

[_~~

.:.

f -...1

iure 1 shows lllCllO dcf~ ol variablca.

ICll

~-.!!

"""''

Types or equalions

'.f!'.L;!Li::;:.:/. ~:::/'.~.
Equotion1 and Compuwioo

..

9~

--------

1tcr 7

111ywherc below the definition, jusi as you would use a buih-in


function.

llUlll '------

a : S.ICZ

When you use the function in an equation, MathCAD evaluatcs

= z

lhe arguments, plugs !hose values into the apression on the


right side of the defintion, computes the rcsult. and uses it in the

..Clt) ....

equation.

n..-<aJ I

-"al

Figure 4 shows an example.

--
r.;.-r. tiMW-Ol'iiil@tfffliM,\\1\.i -

; -r==.

Equations and Comput.ation

l l'!... ..--r-

MathCAD has two calculation moctes: automatlc mode 11-.d


manual mode. When you st.att MathCAD it is in automatic
calculation mode, as indicatcd by the word auto al the righl of
the mcssage tine. This section dderibcs how MathCAD
compute! cquations in automatic calculatlon mode .

!~~~~

17
l e:'
~-' ...

t . ta
! hhJ
I

..,.<1>

Whal ll means to process an equation

t.m
1

Whi\e you are cditing an equaon MalhCAD OOes n<>l do any


chccking or cntculnling. MnthC/\0 will nol proccss the cquation
_unl you finish Miling it and do one ol the !oltowlng:

-~Ir; IMllnll.D 111 UUI ructlOttl

: 1
U"h ) a,C911'(-.),,..,.,;.,)

rt> :

~l

....... _ ,

lla_,,....... . .

Movc thc cu" out o! thc cquation rcgion .

l'r<:<S tho cale kcy, (r9J .

Type the c<tuals sign at 1hc entl o( l

t : ""1

"'can also defITTC your 1JW11 unctions in MathCAO. Once you


li11<: 1 luncllon,
tne 11,l AS you wrn1ld 1 hullt-111

By performing any of thc.'IC actions. you ask MathCAD ID


prm:r u thc 1un1ion. To ~ss an equaon, MathCAD doel

:. 1

1.

t<r>

Check thc e<ua!lon for crron In 1yn1.&1 llMI lndkatc 111y


cnm hy 1lrwi11R 1"'" wllh Unes thal point to the
ol!c111li11R vJUinhlc or opcralllf1 (~gurc ~). (Soo thc ic<:dOll

fCU t

on "Jl.11on" ni '1.ti r,n(\ o( thi!I chn1\Cr for in.'ltruttlonl on

(unctlon dcllnitiun looh lile thlJ:


r.,nr,t/onNm<J (rqJ, rq1,

.. .) :

,,...: ~- _"U]

eJCprtt ,13100

th ls derinithm:

FnctlonNamt: is any nlid name. (Sce Chap1t:r 8 roe a


1lc."'' 'l'lion o( vnlid ............ )

To mlrflne one o[ MathCAD' s biltlnfunctl01u, entera


fwtctlon d<flnltlon iuln11 the same functlott name 11.J rite
bwlt-lnfunctions you wan110 redefine.

1r

. i;1

JI - ';-tt

1e

The arguments o[ a IUtr fwtctiott IUMOllJ represen/ wtrWle

"'""" but they can a/so represent the names wc1or1,


matrices, or othu functtottS. Stt tite sectton " Amr1s and
iuu fwtctlottS" at the end o{Chapfer JO, "Veciors and

Le

: is lhe defrnilion symbol. Type lhc rolon kcy (:) to"'

Malrlces."

'

:.
function lhe point in lhc documcn1 whm it
>pean. Once you have defrncd a funct.ion, you can use it

. r' :

Lt.1

11 -

arxl. arx1. and ~ on..., a li.iof one or m~ narncs.


oepanucd by commas. In 1 fonction delinition, l~st mlLSI
~ ~s only. Thcy canJI()( be more complicatcd
expn:ssions.

Thc uprrutDtt is any nlid Ma!hCAO expression.

~ _.-1c -IOll

c.cr1o1..te .. ro11-:

e-ta--'"'

~:- Lz
t.. IV:J1
..,

:.

""* ...

_l......
l

d. 1 1

ad

,.d 1

t?1~Ew'~

. . ,. ~-i:.=

: t

1.9 ...

l
. . . . . , .Jlt
L

e..... __.J

Fii<... 5:- Y " " ~.,--.-.e"~

lo<..,.,...

and_..,.,..- - 1/-,0" "'"' ' forct an 1qllalloft "' rtcolculait, pul 1h<
cur.wr lA th< tq..atlblt ONlprtU trtl. th< cale ley.

lhC fttlltW\Utt:

41

f(Z)

r11C1ion. Ftmc1io1u you lltlinc are call<d u..ur /unctloru.

~iJ defines lhc

calcula!~"' <><iuatlon.

((J) '

,[f.]
f<U 1A
....., _. - ,... -el ..

ur f11ndlo11:.

Y'"' """

~-

rtn

..... 3 Ou~l In flJnc1lono

IOUJTIOll 11

ll

:ti

- ":!;
1

1 '-

:L~-=a

a~!!

11~~

dcAling witll ~01r lK comp11iatlon-1 erron. 'l"bcSC includc probleml


su<:h ._, unde!lned v1Ulnble1, tncoml"'!lblo 11nlt1, and
diviinn by r.cro. Likc syn1.&1 cnun. compuuitionAI orort
are indicated with boCS o1"1 llnes polnting lll the (1ICt of the
t<1uition in ctrof. For cumple, the sln&ularlty erro< ln
Figure ~ indicatcs a dlvllon by z.ero,
lf lhcn: are no errors. caJculalCS thc cq111tion. Por a
deftnition cquation. this de!lnes !he variable or runctlon on
thc lefl side. For a catculation equation. this computeS and
displa)" thc rcsult aher the cquals sign.
1C the cquation is a definition. MathCAD also rccompulCS any
other cquations on !he scrcc:n thll are af[ectcd by the dcfinitlon.

Jnterrupting calc11latlona

wAIT me-se !\UhCI once fot e.ch cquation M.othCAD


c1lcul1te1. t.W~AO allO ahoWI a fluhlng p<:rI 11\n lh<>
wAIT; lh<> pcrto<l l\uhN on and off IO ln<llCAlC lhAl calculltlonl

Thc

.,, takin& place.


To lntcml!'t a oompul.lllon
IYJXI {etrlllBreltl
(holddown the {Ctrll kcy and
the (loroll t.ooltl
kcy.) MalhCAD a...U lf you want to inll:rtUPl lh<> c:akulation;

In~
~u

en1t:r y m halt calculations in~


MalhCAD mart.s thC ln~ equallon wllh the error
message lntrrrapted. To restar\ an inierrupu:d equation. pul the
cun<X in the cquation and press tr 9 J.

To'"' doWfl

" IM dmt :ro ~nd


....inng, JWitCh to
11it stcdc" oft rrocessig

"""'""' lfl()M, llJ t1ucribed t


tqMIJliollS

lA manual lll()M," lattl' lA 1/rls c/iapter.

- 1

Ol>><a7

p-to-bottom computin
lhCAD caJ<..,:: "'Jll&Olll llid eflllCI variablca from IOp ID

IMl&

docwllcDL

l lllCllllS

that a variable de111ition alfcctJ everylhin ~low U

............. ,.....
MOi.e

>e documcnL 0<d.iMr)' de111itions nevcr atrec1 equ..Uoiu


ve lhcm. (Global dcftions beba.,. dilTucnlly; - "Global
nltioN. on lbe ""' pqe.)

u.~

~-

l . 11

:.

.._U..,,., l.tl

.,.,..,. rt/ ....ll .. ,...1-i.


..'-"'I- .t.I~ .............,..
et.....,., M r l 1lrlt, U. _..,.,.

.......
,............ .. .....
11.w....,..
u. nnt ......... "

lkutminG lho rdali1111 poailion ol 1wo equations, MalhCAD


1 lhe locations ol Lbe uppcr lcl\ comen ol thclr equation
1ons. lf two equatiom ll'O on lbe 11111c: li.nc. lhc equation on
ld'1a1Tec11 lhe O<flllioa Clll lbe ribl, but DOl vico vena.

I U

... -

l. llll r4p.t. Mtt. ....u-~ t t. u. ...... \.,..


............ Le . . ._,_ u.
WIMU Cw ~

Figuro: l.la'1CAO ..-

i ...

1 4. IK ll

~
1
1 4.19' 11

~-

............

:.u

lop 11> bolt:>ln In.

You can define a variAble IWico In thc: samc documcnt. Thc first
definition applics rrom thc: poinl in thc: docwncnl whern it
llPPW'S down IO lbe secood dcfution. Thc sccond defanition
IP!Jlics below lll8l. Fgw-e 7 illustnllea 1 documcnt in which
IOl1lC variAblel are dcfined twicc.

: equatiocJ involvin a and b demOllSIJ'alC bow MatbC.\D

E- '3

lt.Arl

E 13

c-1ar ...

L;:lil
E--Ji

~!~

1 die ILlp lc CU1ICtl IO delamino which DQUllOnS nccdc

icb olhcn. The eqUlliClll& far o and ~ appear IO be on lho


ie linc:. Howcver, die uppcc lelt C<W'llCI' ol lhe equalioo Cor~
cllially oo lhe 1inc abotlf Lbe 2.. ID MalhCAD lrC&tl lhc:
at.ion Cor~ u 11 i1 wao abolle lhe equation Cor a. causin lbe
Thc equatioos iavolvin b allow 1 IUCCCUful way IO dcal
b equaliooa 1iko lhia.

(;:!::.

r;a
!-.ta

f::

-.ol:I

!;:. :.

~!~.

:'.. J ~"'t1i-'3.;_..,..

......~~ ., ~~ Jt~.:...t!. Ji

,t.(,J\?]~~t:;"'~ _
-1....~! ~'hr.l<.:~:.~ ~--'..J.--~

. . 1.1

.' .__ '-~...-..J

.:. _._: t.. .;.~-1.

...

1 , .- . z

:. J

1 :.

...

''-- -

",,__

Ftnt. Ma!hCAD takcs onc pass lhrough lhe cntirc document


Crom IOp to bouom, cvaluatin global definitions only.

TI.en. Mat..hC AD tai.c.s 1 sccond pa.Sl Utrough lhe &..x.:wncnt


Crom top to bouom, using lhc: global ddtnitions frum thc

first pas.s plus any othcr 11cfo1itions i1 cncoo11ta1.

Figure 8 shows thc: rcsulu of a global dcfinition f0< thc voriahlc


R (diown at llie bouom ol <he fgwc ).

.._ ....... u.wt.ut-.111M11

.1
t:_: .!j

vtu. u.. w1.1 u -

r
, :-

E:--:!1

L=-::a

This is lhc: aJgoriLhm lhal M.alhCAD uses to evaluaic ali


deJinir.ions. loba! and othc:wisc:

" : . -

1
~ : _s

'-

91

lMllL CAi IJOll

1.usr11 !
1 ......

L UCM

docwnct111 alwaya llllke ICNO U tcad Crom !Op-IO-boll<xn


ld'lll>-ribl. u yoo wou1d !Cid aoy doc:llmcm.

l y.

plM

ihCAD'a IOp-CO-boaom uiipmenl ol variable valuca mcan1

eumple, loot 11 Piaure6. Thc linl calculalion il undcflllCd,


:e il appc111 above lbc definlliml ol ii and y. Thc cldiniliona
1 and 1 .,. ""' acccasible ia lhe (1111 cakulation, becauJo
LhCAD rQda lbc cqualiml from ILlp IO bouom. Thc ~
:ulation, on lile Olllcr bnl, I bdow lhe def111itioos ol ii and
'buc!ore lhe llDCOlld c:alculalioP""" iae lhe dcfinitiona ol i

u.

EquotiON and Compuwion

E::i-:i

IW.CWD lot ID ..llQll Cllll'UI lit;

l . I -.t W I Mrlai.IN

OOl .. 1

r:.:. ::...:,;

r im

w t..iu- an11 ............... U.tr ,..1u. le

u . . - ...

IKJV. W IJOll
Stvt

r 1.m

...,

' :-

...
' l11

r 1.m

.....,

.., ....... ..,.,.u-r1 v... , ...

Global defnitions

":

Global dcjlni1lo11111c an cxccption IO thc: IOp-to-bouom rule far


c:valuation cquations. A global dcfinition applics IO lhc wholt
documcnt Crom top to bouom, rcgardless of whac il appcan in
lhe docwnenL Global dcfinitions are lbe only defutioos that
apply upward u wcll u downward.
A variable: IWtlC or Cunclioo to be defmed.

f I lD

:. - -

"'

11-. 1

la

A loba! dcftion consists oC thc: followin:

W19'tl - . ... a.l e11l tl -

":.a- :.

Figuro 7: A documtntwith Vand Tdollnodln -

"""t....

r. 1.m

"

ta W I _.

Q..lM..U,

U.,_....., ..... OI

""

.. .. , .. , .

t t. W I Mi t l ..,.ti ..........

....

U. W t..ttl ...

1 . 112ll5U

Figln : Aeoul1a el global dolinicion

Thc global definition symbol (). To lYJlO lhe lobal


deJinition symbol, press thc: tilde k.cy (- ).

V.'hcn you use 1 variable oo lhe riht side of 1 loba! dcfinition:

An exprcssion. Thc: exnssion can involvc nwnbc:ri or


olhc:c globaUy defined variable#.

lile variable musl be defincd gibally, and

lile variable: mUSI be deJincd abov.: lile place wbcrc you ""'
llyin 10 use iL

You can also globally define functions, subscripted variable#,


and anylhing clse lhat normally uses lbe dcfution symbol (: ).
1ust 1ype - instead of : , and MalhCAD will show lbe global
deftion sy~bol in placc o :

Othenvi.sc. lhc variable is markcd under111td.

Use global deflnitlons to rtpt'tstnt rtulo111hips tltal 11t~r


change ovtr a dacument.for uample ,fwltda-ntal
C01Uttvtts and UllI conwrsions.

~~

..

...

'

..

..... _,

_J
,.

' ""

..-.
~ .'~ ,." .(,. . e
1 . .1 1., 'l.

. '

' '; ' ., ' ,.' .,

?, :,

"

.,.,f':\lh'VJ'"' '' "'" "" '. . , . .... .


'" (' ,.' ,h~ }'1 ~t1 \.\ '!{'1 1, (i,J1 1::;r~~. -:.~.t . ~ 'n. ~ -'~ ~\ , . ~ l'h ~ '

' i : :; :;; : i' ;; '; ::{',' ' ; Y'i'.';:

....

.;,~ ~ \ .,

,,. .. , . ';J~

'I1'?::\'.''\'?.!.t

I~ :.~
t:-1- -'C:!'
~
.!;JI

O/Id""

: J

thl :.
n. NI t ..,_., ................. .

,[;]

yoo define a function, !he argumenl variables neod ooc


values. Howcvcr, any Olher variable5 you UJC in tho
ition must be defina!..

...... .t -

tt-... h

:1cnn11iun

.r r.
''"'
.,.. r 1

..t ..,.._.t

.. u .,.,. et

lheir vnJ~ Of'I lhe rittht sidc or thc runccion

_ 1

6.

lf:t-~
li
~
ur:~---~

NZ> fi
rtt> fi
tU> fi

:vAlualC! thc argumcnts

ttu 1'

u. .... "

: 2
S

n you use thc function laler on in !he document. MathCAD:

l~:'.!I

.t :. -t

Nt> 4
t<J> '

iables used In user runctions

mh~lirutes

ll
,JE - ~-:e
i:I
J[ 11--:!)

.-uc WlllAIUI IN lJIU P\JCIH

ne

.r

t'9 ...
t ~
11 KrlG.

flgure 9: n.. vatu. ol ue runak>n depeodl on ftai AIVUffiWltl.

11[

ovalUJ1tcs lhc vahJCI ol lhc otha variables al tite po/111 wkrt


IN fimctlvn is dtflMrl

oomiu1"' aO<I rclwm a =ulL

yo want afunctlo~ totkptnd on tk value of a variable,

Dccrrcd calculntl(Jn ror cquallons urr lht ~rccn


Whcn you pmccss a dcfinilion in automntlc calculation modc by
moving thc cunar OUI o( lhe cquation rcgion, lhis 11 whll
happens:
,

/Jiclw that -.oriablt as a11 arg.,,,,,nt. lfMt,


athCMJ willjMSt JUt tltat variablt's[lud WJ/uea1 tlu
>M In IM docwrv/U wlwrt tk functlnn Is dqlMd.

MathCAD evaluates tho cquation.

MarhCAD intcmnlly llll:c. note o all olher cqustions in 1hc


documcnt lhal are affa:1ed by rhal cquation.

'"'9 shows how 1hc rmc1ion valuc dcJcnds on thc valucs of


11rgurncnts and tho nlucs of tho olher varial~cs 11 tl1c poinl

Mn1hCAD updlltcs any oC !he affa:tcd cqU11tions lha1 are


currcntly viihlc.

tnMJI

cfiuilion.

TilC cxtuultm ytm proc~:t1Ctl mny 1tffa1 other r.cuntlcttu1 thnt an:i
not currcntly visible. MarhCAD W.cs no: or Uicsc "pending

compu1J11im." which will evcn1ually nccd 10 be m:le. AJ soon


as you scroll thc
IO look at any olher part of lhc
documcnt. MathCAD pcrforms lhc ~ calculalionJ
that cvcrything you sce is up 10 dale. AJ you move downward in
!he documcnt, MalhCAD updatcs !he whole documenl down ID
!he part you are vicwing.

"

lt yoo print or move ID lhc rnd oC lhc documcnt. MalhCAD


llllOmaticaUy upda!C! lhc wholc documcnL

.;

lt,:f :" ::.~<'

_. .. ....... _( ..: '" e, ,_ .. ~

....
", r,~\~X'\'t
'" ' I~Nf'!t'.''Pl'\o1'N.'t
. '
. "
., , "
. , .,

" ' t- .. ;">"


.i~t:i..~ .
'd-'!O.l.t ..dt1~'11l f.::A.'11 ~~/,~'1.,.~'.\~'_),'tl,i. ..'. ::t ii'~ .r,r..~

'i;._),

i,

i!~:a

11 ~

X[Ji~
[E:.::- 1ii

--11 .

1~-~

,~-J!:11

lll
I[ r--:it

J[-! :il

1d!~

t~-1!6
llJ

Thls optimization make5 swe lhat you a!Mys sce ~to-dale ,


lnfOttrnltion. bul you don 't noed ID wait Cor MathCAD IO
calculalc cquatioll! lhat are nOI visible.

f]

'"1

9'I

&u.atiom anJ Comm11tluo

Ch1pter7

rrnlnt. A docwnt!nt Jltold contoln only oM tkflnltlon


tach global varlablt. f/yo deflnt a wirlablt with two
'atnt Rlo/>a/ dtflnitloM or witlt OM global
local
inition. tkn tach defittitlon will apply In only part oftM
:wnLIU. TltiJ hnd of atnbiguity dtftats tM P"'f'OU of
/>di <kflnltloll1.

, . ., ,. 'r'

i!

Processing equatiuns in manual mude,, ,i-~: .


COMMAliOStC
Tltl &ECTION

Whcn MalhCAD nccds time ID complete computatlons, you sce


thc word W A1T at thc righl o( !he messagc linc. This occurs jusi whcn you en ter or calculate an cqualion, but abo during
1Crolling nr printing when Ma1hCAD Is cvaluating pendins
calculalions from carlier change5.

ClbMtolromt>pol

lf yo want to force MathCAf) to ucalculatt ali equadoM,


,..t tk proc~ commond as tkscrtMd In IM nen stcdon.

MANUAi..
Enw--

IC!YITOTTPI

-and

__ ,_itllo..,
-~

(1'1)

!l

KlJ

CALCULATE
IJ(

(1'101

ee

rr101

[Xao) a&lcnslate [.J)

---1>1'

[Xao]

..,..,.. [.J)

~ r.

picit-mond

lrif.

_,_....,

AlJTOMATIC
Enw"'10rnllo

--_
..
--"""

11
1

. f
[Xao] rrato.atio (.J)

:t'

:~

poooulnd
f9C9hJf .'. ..,.

PROCESS

fbo)

pro<MU

f.J.

[!

""--"

;t

Manualmode

U you do nct ...nt IO wall Cor MaihCAD IO rnab: canpuiatiom. 1'..1


chango to 1111111Mal n>M by typing:
. .
[bol .anual (.J]

,
.1

MalhCAD mn~ lhc wonl 1ulo from !he m<&..rc liM.

In manual mode. you do no1 ha-e to "'ali for MathCAD IO


calcuuue as yoo cntef equations or 9Cf011 around a tlocumCflL
MalhCAD does not compute equation1 or display rcsults until
you prcu lhc (rt] or me lhc rakulal or proc:e11command.

Bven ..~ you n In llUflual mode. Mat/ICAD stiU kocps lnlCk


of pendins compu11tlon&. AJ 900ll as yoo makc changcs that
mqulre compulalions. you sce !he mcsnge ailc F9 11 lhc right
sldc oC lhc messal" line (Figun: 1()). This reminds you lhlt tho
.

- - - - - - - - - - - -!J
. - [

_____

_.....,,.

..i~:t1.::: \;
100

<..11aptCf 7

----~-----,..-.---

- - --

-~-- - --~- --,.-

-r ,;;~~: : :: :1/.

.,.' : :. ."1

,: s,; ~ ~ ~ ;f~./ :-!:~--~. : ..~\:'

.'

...,

Ei.1u4' anJ Coinpu1.i11ion

Warnni.1/you dlsablt a plol oran owpuJ iabl<,


iesulu on your s:reea IRI no1 up-IO-dlle and !hit y<>u mllil
calculaio thcm bcluno )'UU can bo""" tlloy IRI conocL

IFlriJm..11&
-.&llMCDUM._IC __ _

c..r,..,......._:
c....w ....:
d !

.... ~.-r-...

:.

,..,

d I

. ....

... , .............
1

)IOU prin/,

To SIQl'I Ma1/tCAD In manual mode, al IM DOS xompi

rype:
MCAD /W

MdthCAO frttiu 1M. di.tpl<iy /nr 1h' /llol o r 111flft. CN111Rt1


you rn.ait 10 rM docwntnl w UI "')' cJU<fl 1h 1'l111 or tol1lc. l/

The equalion onlorf rommand disablcs c;alculation ror Dll


equation. With this fcaLUte, you can crcate non-calculating
cquutions in a documcnt w\d use MalhCADs echting,
[ormutting, and display capabililics (or lhose equaiions withOUl
having to wrpy aboul whelher lhcY will calculate rorrcctly
To di sable calculatioo roran equation. move the e~ into lhe

JO"~ o docwntI con1iUnJng such a p /01 or owpuJ table,


tlit pwl or table Ls lost. Yo""""' rt~nahl< 1/it tqua1ion to
recomputt il.

To ~-<nable calculation lor an equalion, move the e~ into


lhc equaon and use the tqu.alioD command again.

equation and 1)1>C:

[w:acl equation (.J)


MalhCAD shows a small ro:tangle after the equation. This

symbol indicalCS lhal you havc disabled calculalion roe lhal


equalion (Figulc 11 ).

.._.... '

.......
1

. . ...

"'Cl.ol .......... . . .

.. . ,r-.

.._...

.,..

w_mnmm

WM11 ~" wl111 a dncUlfWnl J11 mdnual c"h:uhulon "''''


1i.t "'"'"un IAI xl11louJ ar< fWI 11ecessurl/y up-IO-clau.
Us IM proceu command IO process 1J.t """"""'"' bcfor<

''

1
1

i
1
1

IVn 10: Tho- ........ _


npendng.

... _l\alcompu11....

Whh MathCAD in manual lllOdo. you can calcu1aUI aew ruul11


lo ooc ol lhrce ways:
To mac ali pendiag c:ompuwionJ lhll alfoct lho Cumnl
ICn:Cll, preu [1'91 (lhe cale key) or uso lhc calaalale
command. MalhCAD xoc:euca ali equaliom oo die 1CtceD
IOd updal.cl ali visible ICSUllS, trocn die 10p ol lho docWllClll
llww&h lhc cwrcot ICl'llCn. Wbea you move down ID o/ lhc ~cale F9 will reappcar oo t11o me.asase
Une. and you wiU uve IO pn11a [r9 I apio IO calculalD
up-11>-<1.MG rcsulll.
To makc aU pendas compulaliolu and proccu ali equat.iool
io lhc wbolc docUlllClll. U1C lho pniccaa command. U you
lhcn maUI Cunhu cha11p. you wiU havo IO UIO 1bo proceu
c:ommand apiA.
To 1wl1Cb bock IO ..IOP\allc modc, - tilo aulomatk
cionunand. MalhCAD tcealculalcl lhc wholo docwncnt once
and lllOI a>ntinuca ID uxlalc )'OUI' ICl'CCA U you m&Q

funhclchanp.

Oh h .. ...-U ..nt vtfll 111au.tM'


ft.w

.,..u...

4l~I ...

1
;.

tV lt

..-u- h

l ..ICAlM "9

u.-" ,.,t..,.I r.u..-..


u . t"-h - "
..,...u. - u ..

IM

. . . . . . . . . ,. "9llrrLM

,......l lt, " ............. . . .

f V 1t

t?-...J

flgu'9 1'1 : The <iNb\ed oqualloo lo IMIM<l wif> a amaa - -

You can alill edil 1111 r.<ulllion lhal is dis.ablcd. However, a


disnbled cquation does not aflccl any otllCf cakulutlons, nor
doCJ i1 reflocl changea you makc to olher equations in thc
documcnL Whcn you cakulJatc 01her equatiom, Moti.CAD
ign~ the disabled equalion.

i,

.!_: ;~;:~~~~:~1m~!f~'3.I~i'.!IS~::r.:::i~~::~:~\~rt:r~~-::.:~~:~~~~~~11xt1:;

q~ l:_,,~
~~~-:'----------=======
1

J ;~

Chopt<r 7

------------------------------:__
l'!J. J ' "'~*

....

''.

i. ' ' ,

,,

'

- -.......

lllCR n - . - I C - Cloon'lol- -

hll_,.

[~ J[.1 -.J]

le~--'---

.~Clol
~
111!

s...

rz-,

-~--
l o

1
d 1

ad

11

'....... 1.!w... 1

..-

111 .

Mala: sure you can ~ aD the equalions you havo IO n:ad;


that is. tl11'l ll!' error mcssagcs havc not obs:uRd lhcm. If
you nccd IO, use [r3J and [r4) (cut and paste) 11> move thc
/ equations IO a spot wherc roa can rcad than.

If ncccssary, swileh 10 manual calculation modc by typing


[J:ac) manual[.J). You may want ID do Ibis if your_.:.,....;-calculations are time<onsuming, so you can roakC s many

Dc1em1inc

lhO.d~notcomputcanequationinerror. Ifthcequation

dcfinition. thc Yllriablc it is supposcd IO deflllC will rcmain


efined. This can cause wnd<fined <mxs on equations thal
rcnce lhat variable laleron in thc document. Figure 12 showl
1111 error in lhc delinition o( xJ causes nnddlned murs in

rs;-i -1!1
1

'~~
1ira;

!'M

"''

11L4

Iii..i.=i

(Ir; 1
e:

-~

(I~~
~

11'
U~-""- ~
~ D4

~~

~~

-,-

..ll

1~ 111 l::;:9

]11L

..

[~-11- 1~

11;:;;a
JI L__
~

In Figure 12, thc problcrn is a division by uro. To fix lhis

- .

problcrn, change thc dcfinition o( a, as shown in Figw-c 13.


Whcn you movc thc cursoroutoflhc definition oC a, MalhCAD
m:omputcs !he ochcr equations and mnoves thc mor mcssagcs

~-

{Figurel3).

lt!~~

,.~

__ _(_....:.

d l

llJ

:c 1

f(d

:a -

i"".
............

l
d. d

--. ': ~ -_~rz-- .. -

..... ,.....
l

~-1~/JJ:.Ll --il

tqi pf ll".e ~-umcnt. This error is probebly 1hc cause o(

Waming. ~ equation ntarl:a1111 error may MI be the


cause ofthe error.
error rrtaJ <lepe'!" on wzrlablu
defin<_~farthLr "P 111 thedocwnt:fll. Edil theu other
defuuaons te fiJc the uror.

...

I~.

whPKl!'~tions in error is closcst IO thc

Once you have delamined wlrich equation cau9Cd 1hc error, cdit
lhat equation IO ftx 1hc error. Whcn you move the cunar inlO thc
equation and bcgin cditing, MalhCAD rcmoves 1hc error
messagc. Whcn you move thc cunar out again (or, in manual
calculation modc, whcn you press (r91), Ma1hCAD rccalculaa:a
thc equation ami, if you havc fotcd thc error, rtcalculatcs lhc
O!hct equalions affcctcd by thc equation you changcd.

11

.-......
..
,.

c-tn~-- - ~t-:-- :

1~ ~
......

( ~W j!

'

_,,,~manyoflhcothccerrors.

,.,...--

box on each eqoation in error describes what 111'1 .,iublcrn is:


riable is ~lllCd. a computation is.i?,,_,Aor S)'lllaX is
llTCCt. A llllC on each error ~-'I pomlS IO thc opcntOf,
ic. or nu~bcr IO which loof..;;ihC~ has aunbuted 1hc ~: Appcndtx B, ~ M~gcs. (ora complete dcscriplion
11 possiblc e-r.lalJOR enon 111 MalhCAD.)

Olhcc equations.

..

----

.-

.~llOllO--ICQll(ICll

----1~1-~

:"ci:i:ic.as ncccssary without~ior~ ID

19 1 ~ Documentwlll,.mn

____________

U your cloc~ oontains sevenl


.everu~lions in error, as in
Figure 12, tlus IS what IO 00:_,....------

:et

...

c..ato-
d

.=.

---

~:
11! ~-1-ITj

itro, wliout tvaliuulllg or cJ1edi11gfor OTO<T 111 the x


apnssion. See Append E, 11umu1cal Metltods; for
dttas.

F'axing errors

~tions and Computaaon

~-!11

Wamiflf.ln an upression wlt uro as a Pll-faaoror


IUlmCTOlor (().x or Olx}. Ma11t.CAD c.Jmputu tM ruw/t a.r

cscnl>ed in lhc prcvious section. MllhCAD may cncoonier


ror whcn it calculates 111 equation. Figure 12 shows a
ment widl ~ crrors.

--:-..!J

JI

~ 14: Enon In . b-don doftnilion . . m8l"9d cn,,.,. _

"'1ht

f;g<He 13: ~ lhl cltfonllo::n ol - h"""'

""'*"'-

A note aboul functioo definitiom

Common errors

Whcn you define )'Qlf O'f'.. functioas. MubCAD does oot trf 10
evaluaa: thcm ontil )'QQ """them bJer C4 in the clocament. If
lhere is an error. the ose ol die fuDaioc is rrwt:td in error, e-=
lhough the real problcm
be in the ddinitioa ol. thc nCliOOFigure 14 sho"'1 an ~o( r.hi:s..

Appendix B lisU aJl ol MathCAD's equation etron. H= is


short listo( commoo crron and wsys co try ID ftx them:

mrr

Whcn 1 ~-<lcfincd fuoaioo is .--'a in error. be StR IO


check thc f uoction dcfinicn 11> m.d !be ac:tm1 s:uce oC cnor.

dolllais error
You tricd IO evaluate a built-in functioo af an illepl
.-umcnt valuc. Check the entry Of tbe functioo in '

n. suilt-in Functioos.
!lll operand
Y ou forol IO lill in a placeholdcr. Entera va1id ~
for lhc placeholdcr.
ltOC coaerlnc

You entettd 111 exprcssion involving intcg111tion.


dilfen:ntiation. lhc root function, Find. Of MiMTT bul
MalhCAD oould DOl fmd a soluon. Sec the apr<UP<i:
llCClion in C!iapv:t 12 or 14 ror more infoonation.

t~~
...

mi~ "~'

..i; ~.;2:~&r~~::;,;:,:,;:~,;~~,:~:~::4 ~,0,~:~

''

0i.p<c:r7

llllkrlDcd
Y Oll meda Vlriable or !unctioo wilbout dcfn iL Makc
IUIC :rou 1pellcchbc lllmOc:omclly, iDcludin capital and
lowercase lella'I, Allo ~ lhal MalbCAD reads
defmitions 6om lop ID bOClom. You must dcr111C a vlriable
or funclOD llbolle lbc placo :rou inrcod ro use it. In a loba!
defmitioa, :roca musi def111C lhc wriable or Cunclioa lobally
above die pllcc :rou illlald IO use it.

LI;;
T
E_-3

~
1cJ~

1
dl.
lt..:~:'

:;J

I~

f[~p~

L~
.

L~

1~- 1

-' ...,...-"'::r
;
L--:::.4t
1

I~

Names, Numbers, anc


Imaginaries

;r

f.
'
1bil cbapier dcscribcs valid MalhCAD variable and filnaioa '. .. , .
IWllC& and Yalid MalhCAD numbers. This cbaplCr abo lisis
[:
MalhCAD'I pedefiocd variables lik.c K lllld discusscs llUlllai . ,
formalS far displayed rcsults.
.

MalhCAD handlcs imaginary and complcx numben a easily


il docs real numbets. MathCAD variables can have imlginal)
complcx vaJues. and MalhCAD built-in functioos like cos anc ~1
up can rake axnplcx aruments. Thls cilaplct describes how E
use cornplcx numbctS iD MalhCAD.
1 ' _. ,

r:

1bil cilaplct coollins lbe following 90Ctions:

Names
; 11
V alid variable and fuoctioo names; bow ID lypC G=t ':'_ r
Preddlned nriables
\ ': '
4' ol vari&blc.s !hit have va.lues wbc4 )'Oll awt MalbCA

Namben

- ~ f1
C' !1
1 1 1,

Real. ialaginary, hcudoc:imai, &Dd oaal 11W11bcrund


dimcnsiooal valuc

t t.

Fonn.atlinc displayed ruults

Spccifying bow MMhCAD sbould display calculalt.d valil ]

Complu aumt.us aDd calculatiou


How IO use complcA awnb<rs in MalhCAD

ti

i,

'.[

----l

: ~, :~: :.~: :~:~;~\:.21:' ~:'.l~~';f '. );f.=r.i~.;I1:;s~1i~1:~:.~~::; .~.Z:iGT:itF::[r,;::;;&?j:~~;;t1:l :;:2


Ch11p1er 8
';~-:~~

,.\)' r: .;.. ~~ /' '

..

section de5Cn1>cs valid MaihCAD variable and function

:s in MathCAD can oonrain any or lhe following characten:


lppcrcMC and lowcrcasc lctten.
'he digil! Othrough 9. (A name canno< start wilh a digit)

he spocialchanctmundc~on: (_) and percent ().


criods (. ). MathCAD shows lhe pcriod as a literal
1bscript. as delCribed bclow under "Llieral subsaipu.
:n:cl: lctten, typed wilh lhe (Alt) l:cy (see thc lablc on !he
:xt page under "How IO lype Gn:ck Jcuers").
he inftnity symbol -,gcncnued by typing [Al.t)I.

rime symbols (' ). Ute the backQUOIC l:tj (thc qUOIC on the
i/l1C kcy with lhc symbol) lO type a prime symbol.
ILtt tht ordinary apostropM to IJ~ a~ In a
ablt - ; MarhCAD lnterprtU tite apostrop!te as 1111
"UClion 10 put the CllTrtAI txprcsson In partn/Mscs.
CCJ/l/IOl

Jlowing ~ valid 111111es:


1ph4l

K700
l_B2_C3_DUU
l'

le namcs cannot include spac1:1 or any Olhcr characten


han thc oncs flcd abovc. MalhCAD does distinguish
:n uppcrcasc and lowm:- lettcn: diam Is a differcnt
le from DIAM.

Warnlne. Ntvu ust the sa111<11111""1 foro varlablt onda


/Wlctlon "' the SOmt t/Qcwntnt. Do /IOt USt tht ll0""1S o{
bui/t-lnfwu:tlonsfor vorlablt 11111nts, MathCAD rtcognlus
only a singlt tntity with o glvtn ll0""1. /fyou dt/lnt a
varlab/t anda functlon with the Samt nome, tite jlrst
deflnltion will opply up to tht polnt In the t/Qcwntnt whtrt
the second dtflntlcn opptors; af/tr that polm, tht"stcond
defmitlon will opply. lfyou glvt a varlablt the lltllftt ofa
bui//.ln function, thot built-ln/W1Ctlon will llDl work
anywlotr~ In the dcciutv.nt below the voriab/~ IflJ<[tlon.

'.lj

....

~-=:~
~- ::fi
IJl'_,RI.

.r:r .

t ... ~r .1:.t ~ - '

11r1r.t, :'"l

''t '~! ~r....,t~1 '-f~~: ~~~ ~y;

~.{~ .:. \~:~:. ;:.f. .~. }.~~'.!.~t~\~::~~~:t2!jb~~;;~~;~~.:1~'.~~f

Names. Numben, ond lmcinl1iea

How to type Greek letters

.u.;jj
oc=111 .

To typc a Greck lcuer in a variable name, hold down thc (.r.it)


ltey and prcss lhe appropriate alphabctic l:ey, as lisled in rhb
table:

'~ 1.1-J~J!I

Ontk ltnet or oymbol

,p_

o.

(Alt)A

(llt]B

'

IAJ.tJD

t.RJ~.

fill

I~~~

nrJ,! ~
J!lj

ll[.:.w- <.8

11[~!~~

uJ~
m;:

111tt-!:J

3~
J!!!J=i

u~

nJ!!!l:.
nd!!6
ll~~!!~
,,--.

.r
4'

Wholtotnio

11callcd1 /11mJ/ n.bscrlpt. You can me literal sulncripu IO


creace variables wtith 1W11C1 lile vtlina and "ar

To creaie a literal sub91:rlpt. include a pcriod (.) In a MalhCA:


YSiable name. When you move the ~out or !he equation
region, MathCAD shows die pmt or the variable name after th
pcriod IS a sub9cript (Figure 1). A vxiablc name with a perioC
In lt bchaves lil:e any othcr YSiablo na.me. excep< that lt Is
lhown ai two sepmace llnes.
ttPll0-1!1!1..l I

(lltjZ

Lrr-. ~rm ::.. ~ -

[lltjJ'

.......... , ....u.:

_ . .. -

:; . . .-.'

..t. loll :o !.mJ

[Alt]Q

.............. .,. .......

(lltJR

(llt(I
~

W
...... .. . 1. ~ ~

-t!

- "'

r.uo

latt

'1

[Alt]ll

(l

{lltJO

"

[Alt]l>

(lltJQ

(Altjll

(J

[AltJS

(AJ.t]r

~' .'

(AltjtJ

"'

(llt)W

":'"";' : ' > ' '

--' :.; ' !. :.-....,.

,, . ,. . . .
.... ; 1

,.

: ..

[llt]L

~ 1: -

... :""

:~ :

~
..

-:...: . ,.,

-'<:

MaflCAO chplm)'9. -

:~

'~:.:-, : . :.

.... 1 ...

IOboaipt

Do MI cor{IUI! lmll n.bscrtns wilh orray Sllbscrlpts. A


/IJeral sllbscrlpl, trtaltd lry typlng o ~rlod, Is nolly }IUI
parto{a wriJble lldl!V. Ali amTJ subscrlp1. l~ tite O111 "e
npnstltU o nftnnu 10 an array tltm<nts. T'1'J
subscrlpts are gtntroltd ..t1h rhe ltfl brocUI u y ( [J. Su
Chapter 10 far a ducrlptlon o{ how to M.St swbscrlpts wlth

anays.
T'Mu (Al.ti ley comblnotlons crtott Grttkltllers In tut
as wtll os In equotlons.

Llleral subscrlpts
IC you lncludc a pcrlod In a variable namo, MathCAD dlsplayt
thc pan or thc variable namo .na tho period IS asubscripl. Thb

~i.J,r.,~~W&i.,!i~;~1i~d:~'~;:~:~.
,W'~~~;a:i:~-M.~...u ~-- .61~

---------- ,

- - - - - - -- --------

---- "----- - - -

PttdeRged yarlahlei.

provldct, ent.ct a now cldlnlon llko : 2. 1l1C varlablc,


lakct on lhc now valuo ovcrywhcm in lhc docun><.nl bclow lhc
now deflnion.

'

MalhCAD lncludcl cihl variablel lhll.. unlike ordinary


variables, in already delined wbca )'OU - 1 MalhCAD. Theao
v..W.lcs are calltd l"d4!-' wvlabus. Prcckfincd varia bici
eilhcr bllve a coav..ilonal value, like x and 1, oran: uscd u
rySIClll variaba ID ClDDllOI bow MalbCAD worb, likc ORJGJN
andTOL

Yo11 con prt<k/1114 some o{ t!wS< var/abl<S In your


conflgurat/on flle wlth tlw MI command. See Chapter 6,
"Conflguration, DOS, and Memory," for a descrlptlon o{
1he1ttcommand.

Hcre Is a com~ lill ol Ma&bCAI>' predd'lllCd variablel and

---

Dollollioo '"4 Jill.iiihCAO--iil~ofillO-i5diglL-fo

S.1415' ...

lp a, hold doim 1111 (.Ut.J qy WICI ~

1ro1

lrtiy: ... Wgeol

Lm

""""*

"ll.01

, pW; ol &tJli ......... ;, tunri:I/


l
lt., lllSull......,., ol Wt mogllude. To tpt ,
llold doowl IUt.J WICI p-. I.

!L 1

P""""- UN in Up.ai>nt IN 10 ' (ll>l*R

IL_7~iii

10lf.} ot M 1oaillngri11 llt and ol M equlllan

Tcinnce: tt. lolttMCt llllhCAO UMS In


---~llgorlhml(Wegrall,

.......... aquelian ~ole.} Fot ....


~ ..... NOblot1fltipedlo

oparllian il quMlbl.

CllIGllht

~lO?
-l&CllIC.4

.....

/.lrwr orivh~ Si*iliM '- RIUOI lhefnl oi11n1n1 1

'

~WidlllldliWi!iliiiiMwilll WRITEl/llr

t.lkln.
lt.ailbwOl~p...-.iWIWiiiorilnglilOI
111111 IWrTEP#Wblcllon.

Allhouh lhcso varilblet alre8dy hlve values whcn you - 1


MalhCAD. you CM l'lldcline dlem. For cumple, i! )'Oll WlllU IO
- a V9rilblo widl a valuo odia' lhall lho ono MalhCAD

.11

T-

.,n., . . . . .
ICLalO;

~J ~

cl=3

"'""'* In IA.llhCAO. Thil

IPlbai ltplll'lldod b _....,,.., bul do ntll UM


1

1
E-:: ~3
[:=:! ~

12 - ~

lbl blMOlnlllrll ~. (MllllCAO- 1111


. . . ol IO 15 diglla.)

2.fiizi..

~:!!

lheir IW1lll y~

irnM"' ~:.~.._=

.-1 -

- -------.IJ- -<.i>'!"I
_N11_n_a.N_um_ber_1,__lcllm_11_in_vi_11_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ __

[>~~

C>~

Numbers '"''' "

'

"

'

"

..,

.... '

This St"Con describes the various typcs or numbcrs lhat


M<11l1CAD u~ and how to cnla lhc!n into cqwaons.

Types or numbers
MalhCAD USC1 lhe followin typea or numbcn:
Floallo-polnl oumbera
Foreumplc, 6 orl .1'159.
Imaeioary ou111btr1
To cnier an imainary numbet, foUow il wilh 1 or j, Cor
cumple, 11 or 2. Sj.

"""'to 1nttr a MlWtkc/maJ numb<r thul


Yo MJUI ~gin lt wit!t a ltadlng uro

Wrnlnt. lfyou
~gins wlth a l<t~r.

Exponenllal notation
To cnier ver lllrgc OI' vcry small numbcrs in Cllponcntial
llOOIon,just multiply a numbcr by a powcr o 10. For Cllamp
ID rcprcsc111 lhe numba 3 I 0 1, rype:

llOAI
MalhCAD will display lhc result as it would any othu
multiplicalion and cxponcnaon.
1

Combining types ofnumbers

Warnlnt. Yo11 Cllll/IOl llSI 1 or jalone ta rtprt;tfll the


lmaginary unlt. Y011 must a/ways rype 11 or 1 j. See the
ducription under "Compla numbus and calcu/ations"
later In thls chapter.
Dimensional value1
Dimensional valucs aro numbcrs that aro associatcd wilh
ooc oC thc MalhCAD dimcnsions; length, mass, time, and
clwrxe. M1l11CAD u~ ll1cic dlmcnslons lO kocp !rack ol
unitJ Cor dimensional analysis and unil con.vcrsioos. To
cnt.er a dimensional value, type 1 numbet Collowcd by an
uppcrcase or lowcrcase L Cor lcnglh, H Cor mass, '1' or time,
oc Q orclulrgc. Por ciamplc, '. 5111 rcprc:scnis 4j llWI
unit.s. Fot more dclailcd ironnaon on unitJ and
dimcnsions, see Chapu:r 9, "Unit.s and Dimcnsions.
Octal In lcera

To cnier 1 wholc numba In oc111I, Collow 11 wilh o oro, fot


cumple, 7 050. (Octal inlcgers are limilcd to 32-bit
in1cgcrs.)
Hexadecimal lnlc&era
To cn1er a wholc numbet in hexadecimal, Collow it wilh b
or U. Cor ciample, 10U9h. To rcprcsent digiis above 9,
use the uppcrcasc or lowcrca.sc lctters A through r.
(Hcudccimal in1cgcrs 11e limilcd to 32bit in1cers.)

You can combine ali typcs of numbcrs in various ways to crt.i


complex numbers, cxponcnal notation, and dimcnsions, u
thown in Figw-c 2.

------- - ----~

!J:l'j!lWJ;p

~I_. ..-1~1

-. : 1

n .. t1 ..

: lz:H541T.JIU:H

&...r,.

1 I I Tt

c-.1 .........

:a

pi

a J.HZ

,.._. ...._.

1. tlt ll

HD\

...........

. ..

..... -...
......,...,..,_

t.,,.,,.
t :. a.a

..

t &e

l. IU

1 Llrl LI

l.MI 11 1

. ...... "

LllB ll

t . 1'5 ll

r J.S

- .

r 1.u -11'l.,..U

Agtn 2: ComliNlg dilleronl lypae el nurnberw

1-.t.i.

.-~-----~' -::~;:~~: ) '::<2:::;:_:~,~- -''--f:. y-:~ .: -L;~~L~f::~~~~~~'.:i:-'GL~


ChaptCI' 8

ormatllngdlsplayedresutts ,: . " .

-:

MMA/IOIH

S SECTIOH

KEYSTOrtl'l

RMAT
g<oOlf hlnnl b-

[bol fo.-t [.JI

llEllU

The romponcnl3 o( thc fonnat spcdfication are as follows:


Elomtrc

Me111ing

Radix, or " - usad IO display a number. d tor


decinal, olor Odal, h lar hexadecimal. Dolaul Is
decinal. MalhCAD shows hexadecimal and octal

(no] e r

1'Ultdi"Mu111.

1osulls rounded lo lllo n.arost ntog.

COOii)iei 10ftn11100:'"' int"9fl bet-.o anc1 :ioe.

Ci

lf the ratio bot_, lhe '"" part> ol a oompltx


numbof Is less than 10<1, lhen lllo smalo< part Is
no1 shown. Dolauft Is 1O; lhls moa ns INI nuirbors
il<Al + 1110-12 'frill'll!l'larsi<nplyas1.
MathCAD rounds orly the displayed vaJuo of a
numbof. not lhe intamal!y stored vakit.

tting global display formal


1thCAD lcu you !!JJCCify t-cw io display the resulu or
cula1ions. The way lhat MalhCAD displays numbcn (lhc
nbct of d<Ximal places, wbethtt IO use 1or J for imaginary
nbers, and so on) is callcd thc nwnuicfonrto1. You can set
numaic fonnnt for a wholc documcnt (the 1/obol formal) or
a single calculatcd rcsull (thc /oealfonnn1).

lmagi!W'f unit aymt>Oi:-cor-fDelaul 1.

fl

Expooootial noL11ioo thr..hoid: en nl"'JOI bolNI


OAnCI t ~. Nt11nbor1 ol rM!Jnlude QfftlM tht1.n or
eqUAI to 10" or smalltr than or oqual to 10" . .
tllown n oxporll1lal nofallon (lor tx111'4'lo.
1. ,.1o 1\ lnt1ood ol lloatww pol1t notAlioo.
0.lllUI lsl.

e hnnJl,C thc fonnat for nll calculntcd resullll ln a documeru.


the fonnal rottunand. Typc:
[ha! (0[111At (.J]

tl1C AO cli.ply fnn1to11prclflcdt/on on lhc me."1ge Une


un> 3).

1
! l.Ulftrll ll

l. ltl

11

pr

lnti

Iero lo'-t"lllCe: an
lMtwe*'1O1nd JOO.
Nunbofs loss lhM to .,. shown as Ztn:I. Dolaul
la 15; numbefs of ma<niludl foss thM toIS 'W9lf
tero.
1'1odS100: 11111110!)0!

bol- o.,,. 1~. l1docAt"

number ol decimal places shown. Dolault la 3.


MAlhCAD nover 1110Wt trlliling ztroa. Numben n
roundod lor dbploy only: Ma!hCAO mal<~w UI
pncbion lntornal!y.

Warning. MaihCAD will MI rtllably show "".rmcimal or


ocral numbtrs ofmagn/rude grcaJtr 1/uJn 211 (abolll21<f).

To changc thc global ormat, movc thc cunar within thc


message line and edil thc spccification. For eumple, IO change
thc procision lo fivc decimal places, use thc [Bkap) key 10 erase
the 3 at thc cnd of lhc spccilication, thcn typc 5. To cornplc1C
the rommand, prcss [ .J].
n 3: A ty1"cll lamat a>ecillcaeion

Ir you havc cntttcd a valid spccification, MathCAD chao~ thc


display of ali calculaled rcsults in the documcnL Ir thc cdi1cd

~- '/! ~!~

ll~IF~

~~~

li!~~ ..IL! :;JI

nE-~~~
,1u

n~lllP.!:R

- ~1rn

~-=:il

Jm
~~ .:.aa::::: ::iil
JI[~

;n~:a
:1[~--;:g

]llA

- ~~~w--

l(:'O!lm.:--a

,~~ -;a

l ~~:a

,,..
:111 ..;~
'ac: "'l--.:!19

;~r~

td.l!J:;m
~!!~
1ll--

Nemes, NumbcB, end lmcinuiee

spccificatfon is invalid, MalhCAD lcavcs the spccificaon on


thc edil llnc, you can fix any ttron. M with any other
prompt, you can abort the command by pressing [ltac] instcad
of rcspanding lO thc prompt.

'

1
: J.141MIKl-ll

w1.cu ..

Setting local display formal


You can 9Cl thc fonnat Cor a single result-a numbcr, table.
vector, or matrix - indcpcndcnUy or the global formal This is
callcd sctting the local formal,
To sel thc local onnat. fint movc lhc cunar to !he numbcr,
table, vector, or matrix IO be formaued. Then typc t. You again
sce a formal spccificalion, but lhis lime it applies only 10 a single
numbcr.
Tiie local formal spccillcatlon 11 just lilce lhe global formM
spccificntion, cxccpt lhat lhc imaginary unit symbol and uro
t.c>lciunce nre m ii~ing . (You can not tee tht:~ twouU ol thc
spc<:ificDtion locally.) To changc thc local fonnat. edil lt and
pre~ (.1). MalhCAD changcs thc formnt for lhc single

CJ>lculatcd rc.~ult.
Whm you local/y formiJJ a rrsu/1, Ma1hCAf) p141l a .rmall
do1 afltr 1he tqun/1 ngn. ThJ.r IJ jwn 10 rtnnd JOM tltat IM
numbtr IJ formo.rttd local/y. The dol <loes MI oppear 01t

pri11tnu1.r.

To delete thc local formal and allow thc global format IO once
agnin cmtml a rcult, movo !he cunor lo 1he rc.ul1 and presa d
(Cor dcfaulr)
Flgure 4 shows tho samo numhcr formancd oe-cral dl/TCH1nt
ways.

F9-wo :

1
S.14111

Wllt~t

214Ult. 2SI

r.,..t wln

W!n
U4517a

,.,..., .cu.,....
r-t ..........

1.l -11

r-t ..... ,..1

l.ltlftl ll

........

s-....i'"""., bnnat tho -

ebll
1 .

...... _

"'"""'"'

rou con MU MotlrCAD' 1 tu1/1 copablllrk1 /llld rM

plauho/dtr al IM u1d of a numbn- to display rwllt.t 1


ln71Uof tJ11ydtslr<d con.rtan1.for aampl<." or JtY. !
Cltnprtr 9. "UnJu lllld Dlmen.slotu," for a dtJCrlptlo"

lls ftOJurr:.

Oiap1a8

Cumplex numben und C-Jlculalluns

/u desaibed lbove in lho KCtioo oo "Numbcn," MaU1CAD


1CCCpta complci 1111111bcn ol lho rorm o+bl, whcre o and b are
ordinary floatin11J0in1 numben. You can -1 inslead or 1 iI
yoo prcfo1 lhal nncalion.

Complcx numbc:ncan alJO wisc i( you enla 111 c.pre:.sion wilh


1 c<vnilc1 n:sulL (E ven a MalhCAD Cllpn:uion llUll involvcs
only real numbt.n can llave a complcx valuc. For cumple, iI
yoo iry lO coonpulO ,:, MalhCAD will calculal an llllWCI o(
11.)
AJ1hou11h ynu can eniu lmainary numbcn <~lowcd by eilhet 1
or j, MalhCAD nonnally shows lhcln Collowcd by 1. To show
lm.ainary numbcn wilh j, Ulll lhc ronaal command and
ch&no 1-1 lO 1.-j in lho (arnM rpcciflC&lion, u desaibcd
In lile scaion aa "Fonnallin diJplaycd n:awts," earlier in lhii

c:hapccr.
WarnU.1. W"" 1.urin1 complu IWmbers, yow cannot ..u
1 or j a/nu kl fqH'tUlll w llnattary Wllil. You mus/
alwuy1 l)'fH 110' l j . WA.11 you move IN'"' sor"' o{""
tqlltllw11tMI1loow1 l1 or lj, lilatCAD ldu IN
superjluoiu 1.

You can apply die SQWllC roo! opcrutor and ali lhc standard
trigonomcuic, h)l>Crholic, and invuse trigou"ml(:Uic ami
hypctbolic functions lO complex argumcnu. Whcro a fwiction la
mulvalucd, MalhCAD UICI die rincipal valuo.
In Ma1hCAO.

iauc

(jllf'UlC

UMIMUS d "

,. -

r I 1
t

d 1,.

d l. Ut l .UI

- - - --

.z

... 'f.i ...


d

d d ... l.Ut Ltltl

l1h:t> ..l.tH

11'1% 1.tU l.tHl

IJi(.zl l . Ut

ai.Ca.J) L11Z l . Ml

..

at.W.z> ... :m: l.mt

- l . tH l.tHl
hhl> l.H:J l,:.14i

- - aZ ...., .. '""''

ldl 1

MalhCAD has lhc Collowing rpccial Cunctionl and opcr11.0<1 Cor


cblin widl complcx numben:

111<r1-- ---RMiP-t o1 ......... z.


~I)

liQifY pal! ol -

g(ZJ

,.,.,,,. ... ~ pilliO..,,,. leal ... r. bee-11 ond K.

111

z.

'

Wagroludl of . . . - .r. ro- tilia, prou lhe


~barke)'~byh~IL
Camplu~olL

To-h=jugoleojz,

!)'pe r' (1"*-lby adolbie-quoloJ. The


~olh~ llllnbor a+l>lla HL

!!11 . ... - --... --- . .

[
(

E= ?!il
~

"B

i;:_r

Uniu o( measwemcnt. whilc l\Ol requirtd in M4lhCAD


'
ouali00>, c.;. hclp dcrr.c1 ermn and cnhancc thc dL<play of
computcd rcsulu. Mall1C.:AL>'1 uml aipuh11tuc.s autom.auully
ial<c: caro ol man y of tho u.u11I ch<ll'CS usoc1;1~ wilh utin u

e_:~
~r:8

and dimcnsions in scic:mi!ic calcul<U1011. '"'Y'"' en1er 1hc

appmpriau: dcfinitimu, MalllCAD aulmatically tal:es =e o


convctsions ami Oags i.ncotrccL and inconsU;tc.nl c.hmcns1onal

E..:..~

C...,.t.e "'"' ~ .............. ,

l. tH L tHI

Units and Dimensions

!:=t~

Figure$ shows IOO\t cumples o( how lO UJC complcx numbers

F\gln 6: Cornple ......-.1n Ud.cAO

Complex operatora and functio111

::~-~:z

Wf(IZ> l.11 -1

L-~

calculations.
This chaptc:r describes l>ow lO use uniu and dimcruio!U in
MathCAD, inc\uding unil conversions, dimensional checkin
and changing dimcnsions namcs.

~J=

Thia chaptu comains lhc following soctioru:

Displllyin uniLS or r<sull.5


l
How MalhCAD displays unir.s: using thc unit placcholdt

'

D<finin& uniu
How lO defino basic uniu in a MalllCAD documcnt

E:r:!i

co... putinc wllb unil5

[
g:.::-g

Using uniis in an equation; dimensional chc:clring

ChanKD& dimtnslon namH

1
E ::9

Naming MalhCAD's dimensions

-r

~-r=I

d~
,1 .

-. ... --....x.m_,._
,,,,,.",,.;tt:,t/ "'"'.: ~. ,. 1

". . . .. ,

.-

-- -----------

~- ~-.!"?.;"7""'~-<:~.- :: ~: f.Y :':

,':tTY'.-pFJ\~I.t:?~~r::';_;~- ~~;r~,:~\:::~;f::~r~'it~,,

. ... .

Ch'l'tct9

nlngunfa..t.:,., ~ ?"i.;,)"11<~ ..'.i>.-' ,;:'.,~...


1thCAD providcs th<i dimmsional valucs M, L. T, and Q,
n:senting mass, kngth. time, and chnrge. Variables definod In
m.1 of the dimensional valucs are callcd Wllts. You can
hiily I divide by MnthCAD unit as you 1VIJUld with units
1ny ocientifJC setting.
: thc..e stcps IO define a syucm o uniLS:

Fim define sorne base aniLS, for cumple, cm, 1. ne, and
coulomb, in terms of thc dimcllional valucs L (for lcnglh),
M (for mass), T (for lime), and Q (or chatgc). Define uniLS
only for the dimcMions 7'lU nccd - omit lhc uniLS o(

chargc, for cumple, if }'<Jll don'! use lhcm.

more complicalcd uniu, like dynt, MathCAD shows thcir basic


COmf)OO(nLS:
dyne-lma3.o-lengthtlme 2

1.1nn:

cumple. 10 define h.ue aniLS in 1hc q, system, cntcr thc


Dwing global dcfinitions:
cm- lL

q- 1>I
aec- lT

..."'

u.

tc.

.....-

Nl .. -

'

'
....... _...
IOlti.1 -

1ld any other variables. To represen! a quantity, multiply a


1ber by a uniL For exampie:

.... 100
ltq- 10009
N ltqm/aecA2
J- N*a

-1

M 1.11 ...... , ....~ . u-

'
1
f
J. l ll .... .....u . .u ..

111
l
-o
... 1111 - ...u .u..

-t

..... ---.ttt

kll- lOOOJ/a
dyn- qcm/aec2
lle

1 shows 'orne of the3C anit conversions. On thc righ~ you

how MnthCAD reprentl lhc uniLS inic<Mlly in tenns o

ensional valucs. For eumple,m u 100 Jcngth unlLS. For the

=:i

yo,,,.""'"

u.s.

Once you have set upa system of unlu and convenlons. you can
"'"' the units in any eqW1tion. Jwt multiply the unil by the
quantity IO which it applics.

For cumple, you couid cntcr cquations Jikc thcsc:

Figuro 2 shows thes:e ocW1tlons.

IC:~

...
.,..,,._
.
l

_.,

..................................
...._ ..... _. .. ..,,......,

-1
.....

t --;~ tl

1~ l! 18

MIC.J

t-

-- :.,....
-::a---(,-

""

4
-1
. . l tl ......... . tt ..

,,

Wt .....,

Me=

.:o;;13

mt;llll.il'

-- ,......

r.,.u- ..... oolb

l~::iri

IJ

Whcnevcr you cnlet 111 e1prcsslon lnvolving units, MathCAD


chccks it for dimensional CllllsiS1CnCy, malr.ing surc tha1 you
don't ldd or sublrlct valocs with incompatible uniLS or violatc
olhcr principies oC d.imensiona1 analysis. MathCAD wams you lf
lhete is a problcm.

...................................

[~_:a

computed rcsulb.

r: aaea(aca + acc_q)

:1

L!~
l~~jA

MathCAD perfonns all lho nccessmy unit conVtttions and


calculations in an cquation and shows the dimensions for

For cumple, suppmc yoo mako a mislaU and define acc u


J()(}m/stc instcad ol JO<>m/uc2 Figure 3 shows the re'IUlt. On
the right, you can sce lhal acc and acc_J have dilTcrent
climension:;, 90 MllhCAD wlnot allow you IO add them.

mau,: 751t9
acc: 100*1n/aecA2
aca_q: 9.8*m/eec2

_J,

1!I! . ii

Dimensional consistency
Using units In ~quntlons

liE;_J,- -~

'~ lii :ti

Thi section shows how to compute with uniLS, and how


MathCAD does dimensional chccking.

l~lj ,;

/( s ofkn con~nit11110 tp 1/oba/ UJtil defuilliollS and


converslollS in a stporattfllt. You can creatt
or
ust ont of IM rhru stls of Wlll deflnitlollS includtd wi1A
MarhCAD: MKS.MCDfor MKS mttrlc unJu, COS.MCOfor
c1s unU, and USCUSTOM.MCD for
Customary WIIS. To
ust afl/t u thi.r, apfHnd lt to IM tnd oftM docl<lfttlll
you' rt working on with IM ppend command. Si.nct tite
Ullit tflnltlons au global, they apply throu11tow IM wltolt
IOCl<lfttlll.

~!!-~

Computlng with units

1 defines

:e you have dclined bue ani13, you can define othcr uniu in
is of 1hcm. You can multiply Md divide lhcse unill as you

::::.

111

UnitJ t.nd Dimensiona

l~-.-~.!!I
"

'

.. l lt .. . .

Figure 1: Unil doftnlllonl

thc variables cm as ene length unit, 1 as ene man


and su as one time unii.

re-..!

lll l...,U.

. . . 1911

.1

ll
E__,..:!i

l lf

IOlllD 111111:

Define olher uniLS in trons of lhe twc units you tet up.
:e unit never change, they are lL<ually dcfinod wlth global
nitions..

ca

C-- im

IF._,, .

LE.. " ..lmi . ~

This menns that dynt is crcnted by muhiplying onc mus unit


and one lcng1h unit and dividing lwicc by time uniL.

IAa

~,~~

IOC..J :a t.l-

... .

- . ,. ~ ~.
M'IO.J

:~

1-.UU

-..1>

1.._.uwo ... to l

:at.l-

, 1--h .......,

F1gln 3: l tq!Mlon- ~- IXllll

Unit emn.,,, -Uy cailCd by ano o( tho folloing:


Agure 2: Equadont ualng 1X111a

When you use uniu in nn cquatlon, you get ~ beneflts:

MatltCAD check.! equatlons Cor dimensional conslslency.

A vwiable widl tito wron units (u In Flurc 3)

Ali incorrcct miit convcnlon

Ali eipresslo9 thtl mes variables or lnconsi11C11t dlmcnslon

To find thc ~ eumine the nluc o each nriablc u


shown thc riht in Agote J.

---

-~ ~ ------

..

'

' .

, ' , ~,~~-~"I~~z~;r;0;:;0i:~~~~~~;:::,,:~~~j~r-~- 1

... ,m.....

ea
116

Un~

O.ap<cr9

Displaying unils of rl!sults

When you display a calcu1aud rcsull, MalhCAD aulOmatically


shoW1 iu dimcnsions, i/ any. lnianally, MalhCAD compul.CS in
lhc base wu IL, IM. IT, and IQ. Until you make thc wlil

convenions, MalhCAD lhow1 tho rmults in tllCIC wiiis.

..........-.........................
.. ,....._.
i.,r.u_.

ul .. U Wh.. .._.:

_.,.,,.,,,.,i-1.

...................................
_,_ ........'"""'_. ......,

....-.

f 1---hm 1m..1>

J
' . l.?Jlll ...

- - :.71 ...

_,

FlQure 5: U.lhCAO -

.... :.1.1-1

':

...,

'

r . Ll:llll --1-....u.

N v1k>o ohown 10 .,..,.,,..

llcn:'a how thc value shown In an cquuon li.lr.c lhc onc In


Pigurc $ ia compul.Cd. lnlunally, MllthCAD divides llic valuc IO
be displayed by whaiever you anu for lite final placcholdct and
lhows lile rcsulL In olher wmb, MalhCAD makcs swc lhal thc
complCIC displ.aycd rcsull - thc numbct it shows limLs lhc
u.prcssion you cnlCred for lile placcholdct- is a COIRCI value

.........

M:C..J :. ' -

f : ..... -(MIO

L.r

..... = -1

for lhc equalioo.


~

Ag.n:MltlCAD"--..""-y ou can convett lhelo dimensioru IO llClal unill by enterin a


ICl ol WIIS Coc lho fanal placcholder. Wbcn you cnlU 111
~ unit or combinatioa ol units in place ol lho
placd>older. MalhCAD converu dio displayed rcault to lllOSO
uniu. U lhe combinalXm oC units you eo1er is approprialc, thcD
ali die dimcnsionJ (/t11tlt, lll4U, Wrw, cltar11) will diuppear
from tbo displaycd vaJua.
Fof cumple, carlior ill lhia chaAa we eAICl'Cd lho cquation
defining lho unit 11 Cor acWIOnl. In Figure 4, you could enier ill
placo o lite ~na! placdloldu. Flain 3 lhow1 lho rcaulL

To convcn IO a diffCIClll set ol unilS, jusi edil or rcplace thc


exprcssion Coc thc final placcholder IO crcaic a new exprcssioo.
FijUJC 6 lhowa F displayed in sevcsal diCCercnl UnilS.
U you enlet lite wrong kind of uniu Cor lite final pluccholdet,
MalltCAD will lcl you know by displaying ltngth, mas.s, time, oc
cliarge in ilS answer. For u.a.mplc, in lite lasl cquation in Figure
6, you scc lhal kWstc is OOI an appropriaic wl for F. The
ltnth' 1 means lllll lhue is an cxtn dimcmsion o length in lite
wiilS you spccilicd - a dimension Coc which Mall1CAD must
compenure by showing len11h 1 To corree lhe uniu in thc last
cquation, you would havc IO do manaally wha1 MalhCAD is
doing aulOmalically - divide kWuc by a lenth uni~ foc
u.ample,aot.

E";~

c. w
1

e:~

Ee

~!e

~
.

.d
~ -~-.....---....---!'

! 1

z
t

----~

7uT(Qijj!

..,. :TI ..

Fof cumple, in Fiure 4, F hu dimensions ol

te.z'B W -'tlitMCntr..

and OimcrWona

...... 4hlrt ... t.M:

.... , :. 11751

...,.....~:

,.u ;.

..,_reLel

....

llDD..I)

C5ll'!

.....

J
' . l.Zllll

- l. JM

.....

' . l.z:Jll ll . _

- 3 1. l?i k
4ht

, IZ.31 I
f l.IUZ 1...U. Wi-

Figure 1: Converung IC> dlllen>nl , ... ol uni

FIQure 7: p.,,,..,(%) .-.d IC> tcalo "" o n -

Scalin: results and dcgree-radiun conversions

You cun abo uso tho final plQ(.;eholik:r Cor dunauhH1k.u umu
lile dcgrccJ and radians. To coovcn dcgrecs ID radians, define
thc uniu rad and dtg as followa (scc Figwc 8):

The lechniqucs describcd herc are nol rcslriclC<I to valucs willt


dimcnsions of lcnllt, time, mass. and chargc, You can also
cn:.at.c variables end use lltcm as units even lhough lhey have no
dimcnsions.

For cxamplc, you can use lhc buihin 'JI, variable IO scale n:sults,
showing lite answer in pcrcenl. Jusuypo % in Cor lite final
plauholdct in a C41culation cquation. Figure 1 shows an
cxample of litis capabilily.

rad- 1
.i.q- (Alt]P/180

rad

This globally dcfillCS dtg wilh llic vqluc 71/180. Mul1i~ying 1


numba by dtgconveru its valuc from degrus to radians. Yoo
can use dtg in trigooomclric functions co convat argumaits
from dcgrccs IO radians or lypC il al lhc cnd o a calculation
cquation IO convat lite rcsull from rndians co dc:grecs. Figwc 8
shows some c.tamplu of ~ 1eehniqucs will1 dtg.

p~:~::m~:2::;::1::;,2;~:~t~rr1r:3::m:,~r::;,::?:;7.~~~t::itW~Yn1~;12:~? ,~fil-~
, ,...111~~
Cluopter 9

Changlng ~lmension names.


'"' MUH wtlttS fM 1"9

: . :..

COMMANDIH

..... 1

THIS SECT!OH

..,,_..,.

OIMENSION

......

Chtn<td"'*-""

IBI
31 4-t 1. 5%4

., ..... '-211:1

hl(43 ... , . " '

...; l.m

.. . - . . '" ....,..._. ._.. ...... ,.,. U rtI


wore~t1.,,.:

-....( .Sl t.141

ftlt-~t:

~.5l.

&r:.a.1 . . . . . :

-.-< .Sl 1.m 1

pl~IW.

'8 &et

,e u.ng derl., OOl"1V9ft ~tw.fwl dltor:" and ,_,..,..


inal ploccholder in calculalion oquatiom is 1vailable, not
Jr unil,, hui for !!CalinJ re.ulL,, Yoo can cnla 111y
ssioo in pin of thc fiMI ploccholder, including numbcn,
or arhilnllily complcx combinatioM o( varinblc.,. For
ple, lll = a rerult in ltt1n> of 1<, jll!t cntcr 1t for the final
holr\er.

fUltC1l)N KEYnlY HAii!

[J:eaj

~noion

IYllEtJ
[.JJ

(J'lOJ C D

When you start MalhCAD, lhere are our basic dimemions


represcnled by coorutnts likc lM. lL, l'?, and lQ. By dcfault.
lhese consllml, represen! lhe dimcnions IMJS, ltnRth, tlmt, ond
chargt.
Y ou can changc lhcse dimcnsion namc., wilh !he dlmll!lon
command. Type:

(Altematively, ""'""' Dlmtnlon fmm tho CMkulatt mcnu.)


MalhCAD shows lhe dimcnsion namcs on lhc messagc une:
t-ln<t.h

T-t1-

O-Cha~

To changc a dimcnslon narne, edil !he namc on !he mcs~gc linc


111d pre.u [.Jj. For C>arnplc, you could change r~ to be ju.i t or
d. Or, you could changc the dimension Q to represent
tt~raturt nst.cad of chargt and ll3C Q as a 1m>pcra1ure
dimension.
Thc dhntnlon command changes only !he displaycd dimcnslon

narnes or compu1ed rcsults. 11 has no cffcct on lhc actual


calculatlons lhat MatltCAD pcrforms.
Wornlnf. To l:up )'Clur docWfll!ntJ consisttnt, wMn )'CJM
cloangt o dl=nsion rtamt yo should lnc/llM a global
definition that rtjltm that changt. For uamplt, lf)'CJ~
cloangt lQ to bt "tt~raJurt, )""' shmd lnclwk o
global defitlion /t !talTiftlllQ.

Vectors and Matrices

1iii1:;.

:,m
iiif8
IPJ!llj:g
IJ'C ..Jl 1

[ICacJ dlJMnaion (.JJ

M-mau

: 5liiJ~
.~ JiiL~
:~

1lf':

-:::.

:~11 ~

J.

lE 1iP:8

lfit:s
~"""A

~1'1a

~
~ J!!J~

r1r

~.,-.:::8

l~-'Wmrr~
l~:!!bJ
I~~

This chaptcr descn'bcs MalhCIJ> ln"ays .


While ordinary variables (sc:alm) hold a single value, amy1
hold many values. Amys can be ano-dimensional (vcc1on) or
two-dimcnsional (matrices). MalhCAD includr.s a wldc r111ge of
operaton and functiom for dealing wlh vccton and matrices.
This chapter contains lhe followlng scctions:
Crntln1 tttor ar ...trb:
Using [Alt!M lo CIClte 'WtttOn lnd matrices

Computlnc wltll fttton aad matrices


How to define an array variable; vccton and matrices In
oquatiom
Sal>Krlpll
Viewlng and deftnlnc vcctt and mattLt ckrocntS whlt
subscrip<s
Llmlll oa arny llm
MalhCAD's Umts on the
dsplaycd. or cntcred

mes of amys to be S!a'Cd.

Arniy optnton and tuDctloos


MathCAD's opctllOr1 and !unctions dcsigncd !or wc wlth
vccton and matrices

Doln1 alculatloM In paraDtl


Using MathCAD'1 "vcc" operator lO spccd cak:ulations on
arnys of numbcn

SlmaltaMOUS dtflnltlolll
Using vcctas to define 1ewenl variables simultaOCOOSly
Arniys and mtr r.nrtloas
Using arny and f unctioo rwnes as arumcnlJ lll user
!unctiona

!~

llO.

r9_.!!

To use lhc vcccor, you muse fl in the placcholden. TIIC


placeholdcrs in a vcclOC can hold 111y valid scalar e1pression.
Thc cwsor should be on lhe IOp placeholder. To fiU in lhe
placeholdcrs, lype:

Cr~ating a ~ector or matrill

A inle nwnbcr in MalhCAD is ca1led a ualar. A eolumn ol


numbcn is a wcror, anda rccianular array olnumbc"S is callcd
a mavLt. TIIC gencnl 1tm1 CO<' a vCCUJ( OI mauh is 111 array.

[[:~~

,~ ...t ,. ,; -:,

2[Tab)
3[Ta.b)

Thu sccon <k.l>cribca llow 10 crease 'ICCUll'I and mauias in

In a vcc10e OI malrix, che [T ab) kcy movca you from clemenl IO


dcmcnL Once you have creaied a vcccor, you c1U1 use il in
c:alculations jusi liko a numlx:t. Fiw cumple, you can add
anOlhet vecllll' IO litis vector. Type:

U1ln: (AltJM to crtate a vector


To Cl'UIA: a VCCIOI in MalhCAD, P'= (Ut)X (hold clown
(lit) ar.d preuM). Tbal = a numbcr a1 lhc slzcothe
VCCIOI you Wllll IO crcale.

For example, 10 crcale a thtcc~lanent vccwr, cypc:


(UtlW

[-+)

MoV<! IN cursor ro IN rltlv


bracut /or IN vtctOI',

+ (Ut!M

i'.tJd second wctor. MathCAD


(J /1y

J [.J)
MathCAD aliowa a ~ voclOI o/ pla<:d1<1IOOn (M9uro

1).

rrns (.JI tt> ucccpl tltl <kfuuJt.

O[!.)
-11!.1
l[!.J

Fii/ in thl blanJ.s In tht stcond


wctor.

E.!.~

r:~J::D

r_J~.il

Prius tquals to stt t!ie rtsuil.

Piurc 2 shows lhe resulL

~]

c~r
g;:a=I

flgulo

I:A---

Er

i
;
"!'
.,. j'"!'""~.
~ ~f''l'J,,...,....,"T7"~~,,.-0:"(''rlJl
,'!"""'"1r'~P -W-"'."'":--nrTTr
.

\ '

,1.

"1

.r

'

'

h ~\$11bi
1 ("[l 'l "'l"':WWW4,41
\
.,
' I :
:-.

, '

. ;

11Pi ""'''
\4hrr114;ryl
6ijihi;+.i'\Alfi
,/.f:: ~ :,'.
11

'-. ~. :1i. ti '"' ~~ ~ 1Jl(_., r:.!.':i. ~'l ..~t.:1.,Y;. 1 "

::

r;
']
l

ri.Ui

... -.-

"J

, , WlD

U , I

L:-L !I

/'"u ,1,...h.

(.J]

mHlm~

r=r

1hn w11h la.11 orray siJt llStd

M.tl1CAD innpU yoaoa 11>1 mcaaap> Uno wltl1 Arr17 a1 ..


(moa colunm>): , Typc:

placeholdcr). Thc St.COnd malril in Figw-c 3 is a 2-by-3 maaix


wilh che placeholders fillcd in.

'

MalhCAD.

111

'i

rlyu;i J AIJ.11"' llJwio

W(*M

TI1h 1d1li1lon la an cumple of M11hCAD'1 Vt><:lllr arnl m11ril


opcllltimu. Mall.C:AD also includca malril 1ub1r11<;tim, mAIILl
muhiplica1ion, dol product. wholc-nwnbcr powen,
,l.e1<.1111iuan1.1. and man y ocha upaa1uu auuJ ru1k'.lion1 fot
VCCIOn and matricea. (Sce. Array opctalOrS and WlCtionS." lalcr
in chis chap1er, roe a complete list.)

Creatlng a matrlx
To defmc a rcc13ngular array ( matrl.r), prcs [llt)X and en1er
1wo numbcrs: lhc numbcr or rows and che numbcr o columns.
For cxample, IO crease a 2-by-3 maui.t, move lhc cursor toan
cmpty spo1 and type;
(Ut!M

Create a lnal1.

(Bltap)[Bkap)[Bkap)

Backspace to de/ere the defaub


array si.te (IM siu you u.ud to
creaJt tM vecrors).

2 [Spac) J (.J]

Art :o crtalt a 2-b)'-J matrU.

MalhCAD ~a 2 by 3 malrix wilh placeholdm for eacb


element (like Che fll'SI malrix shown in Figure 3). Fill in che
placeholdcn u befare (uso [Tab) 10 move from placcllolder ID

Flgur9 3: A 2 by 3 me.U

You t.:an u.a lh.it m.auh. tn 0tua tMu. jull yo u 'Nuuld

numbcr or veclOI.

Ordif!IJTY wctors /Jt Mali.CAD art colwnn _,IOn. To


cr~au a row voc.lOl.prt.s.s {&.l t lN Oltd t.l'llu 0111 iJITay slu
ofln, wheTt n Is w n~r o{ t fe,,,..111s U. 11!.1 "'""'

M aihCAD sltow1 a WCIOI' arrant td l1orisonullly utcad tf

w rrlca//y.

Changing the size ora matrix


To changc che siz.e o a matrix, movc che cunor 0010111 clemen1
in che matrix and type [&lt)Kagain. FOI ewnple, movc che
cunor to che lowu lef1 elemcn1in che matrix shown in Fiun: 3.
Thcn cypc;
[Ut)M
MalhCAD prompu you 10 insen or deletc rowt (Fiw-c J.

;it.
T~~, ...4

f' )1~~,~~';~~ ~

i{
' 041

{:~f.3~?~~~[?~~~

'~" l'""'"-''~'f"~""l~'1C1:.t'!\'' '""';J t' ''""

:,:?~:'.>r~~.//'. ~:~1',n\:~,?::::.~ t~,<.~


Chapter 10

MalhCAD deletC! lhe column at the cunor, lcaving 1 2-by-2


matru. (Figure 5).

[ J"F

ha : ~

~ijj:~

{f:t<ml~

111~

lf..L-~

1,
[J.rS 1.st U.S

I~

"l

J{l.!
1 U.a

111

-.. :g

llf

rrliir

[f:jiiJ~

~ng

11 ~]i1:8

lhe alzt ot a mUi

1cntcr two 0111nl:n In rc1~m.'l<l lo thb prompt.


mben IVill Nl<I IOW! or column: negntivc numben
rows or columni. llcrc's how il WOlk.s;

st numbtt shows how many '"'"' l l imcrt or dclete.


:ond numbcr dlOWS how many colruruu to ucrt or
n111nhcr kJ in1e1i ruws or columns o( anpty
>ldrrs. MathCAD imuu rows ~/ow the eurrtnt
l"'"1i1W1 ~lcolum11s w th< rlght (ll'ttl currcnt
>mition. To inSCfl a row al U1e very top ora column
ur ldl ora mauil, pul the cursor on thc lcft bracket
m:uri.< befo~ you l>'CSS [Alt)M.
fKJ.'UL.i\le

negntive numbcr to dclctc ruws or columns.


:AD dcletc.! rows frum the currcnt cursor position
1an! and columns Crom the cum:nt Cino< pooition to
hL

inor on the loWtt le/\ element, you can dclete the


" o( !he mauix (thc column 11 the cirsor) by typing
nJttt/dt~lt (+/)f'OWI roll prompc

cI -1 [.J)

Flgu,. 5: Maorb wtth laat row delolOd

Wanlint. lfyo tkl~te rows or colwnn.r, MatliCAD


puman~ntly dcarrb IM lnfonnarlon In IM rows M
mlumnJ you tllmlnnl.
~~~~~.~~~~~~~~~

llf

llii1:8

[[~--:e

l!(.' fl!b;

nJ!~

,l!ru:ll

,~L!J::e

Jl1

ll_.,.- -~

,J!k
'I '
l~~bl
l lt 1

trf'r ' ':.v1>~ 1:~r.,~if''..: y ~''"i.-.t! 1:r, ,i-~i :','ti.:i ~~

t~::L~.~~~ :~ 1 ,;.!.~:'. .:;;~~\:~~.~::.::i ~~:~~fi.'~l~t~~~:~'.~.~1~;l~~:~~


123

Vcet.on .nd Mab"ice&

Subscripts

Computlnl\ wlth vectors ond matrices

. .

-,,

To define a vector or matru. varinble. first type a variable narne


and a colon as you would wilh any other dcfinition. Then crcatc
a vector or matrix on the other side ol the equation.

Subscripl.! allow you to deal with Individual vector and arny


elemcnl.!. To type a subscript. U9C the ten bnrcket kcy ( ().

For cumple, to define a vector ., rypc:

(To changc this, changc !he value of the variable ORIGIN. Seo
"Changing the ORIGIN." 1ater in this chaptu.}

: [Alt]M

Then pocify 1ha sir.e of the vecior and fill In thc clemenll. The
top equation In Figure 6 shows thc rc.rult: a variable defined u 1
vector.

?!

Vector and matrix elcmenlJ ordinarily start with element ttro.

Sub5crlp1J and vector elemenlJ


The ~ <quation In FlgutC 7 defines the vector To ate the
ttroth (top) clemenl o( thc m:tor v, type:

... o..
MalhCAD shows die result In lhe tecOnd <quatlon In Plg= 7.

.. . n1.wt.... ...,,_ ...

... m - ... --
fo

.....,,.u..

ta.HCt.er-ttMlf

m 1~

.1

;t " .,

::.

r-:J m m rn m

..

. .. m

le

.. .
.

' ~"

'

...

"

....

Flgu,. e: O.llnlnglllld ..1ng ...,iorvllriablo

You c.an now UJC lhe name v in place o( thc IClual vtetor In 1117
<quation. The equntlons 11 the bottom of Figure 6 hows lhat thc
two are intcrchangeable. Once you have defined a vector, you
can dcline othet vectorJ In temu of that vector.

Flgo.n 7: umg

1Uboa'4>1 IO -

oloment

You can a1so define indiYidual voctor clemcnu by uJing a


Warnint. Do not MJt 111< sa~ 11<Jnte for a sea/ar WJriablt
anda vtctor variablt. MaihCAf) trtall varlablu with tite
a-""'"' as t/u, "''"' varlabit.

subscript on the len side of a dcfiniticm. To change v2 to 6, en ter


thiJ dcmition:

[2:'
Figtre 8 shows mw thls changes !he vatue or

F+
~

---- -

- -

----.. ~--

-~------~----

---------- ----- --

~-

. ,.~.-;/ :~ :; <."! .

0101-10

To vicw ar define 1 macril ciernen~ UJC Jwo subscripu sq1111111ed


: by a comm1. In ICIM'ral, lo rer1 "~ the t!ntNU in llW' /th ntw, jlh
'C<>lwnn ol 111a11u N, typo:

You mu""' f'llCnlhc."'s k> ktt> hoth "''"cri11u ~NIM'I'. lf

you t&.ic1'1UWi11r:1UJM\.e01, M1ht'AJ) wiU no& lc>c-1 dae c:o1m11.a


lfld 11., ac<:<ln<J ilwle.ii In ll>e subocriV1.

.. w

Yocton .,. M1tr\ca

1'

You '""""tite apostroplte y to cr<ate as.to{


pann1lotst1 as a con"Nni<nC# fvr d<Jubl subsal>ts. To ty._
MiJ'jlrst f]pe:

e~

!t!H1Glj!irl

'lguf'o 1: O.IWiinQ. - - -

Mico you define vec10r clcmttits, you may le&vc gapa in lhc
1U:loc. Pa cumple, il w la Wldefined and you define "'Ju 10,
10U lea ve gaps far ''e> w1, lllld "'l- MatbCAD fills lllCSe gaps
lh wos unlil YOU Clllet spccific valuca far Jbcm. Furc 9
00ws 111 cumple.

MOlhCA.D cr<aJu a pairo/ paunrli<ses In tite subscrtp1


wlten )'Ou fJpe 1/u apostropli<. Titen fJpe i, j 10 compk1t
tite e:rpresslo11. l'w tltl cMTsor 0111/te rlglit parent/i<sls OI
tite end o/subscrlpt lfyou wani to add more to 111< equalio11.

Figure 10 $hows sorne cxamplcs of dcfmng and vicwn matri.t


dementa. Noiicc 11111, u wlb VCCJOrS, MaihCAD lills

1111SpCC:ificd DWri.t clcmcnts wilb uros.

(~

r-;!i

.. [j)
.:-

. ..

1,1

...
...

1.

1.1

... o1 ......

.. [~] ~

I 1

I 1

Figure 1l: Anwp beglmO>g .. 1

MalhCAD hdc$ lhc parcnlhescs in a subscrip! whcn you


movc lhc CW10C out ol lhc cquatioo.

MalhCAD ucats 1 vecior u a l-by-11 nwrix.

Yoo can define lhc clcrncntJ of a vecJOr ar malrix with a


dcf111iLioo likc V : 1, whcrc I is a range variable. Sce lho
DCXI chapur, "Ranc Variables, llUalioo, and Tables.

Wand111.l/)'Ou defl~ ORJGIN aJ al/, ..u a slntlt 1lol>ol


defWlio11. C/vviging ORIGIN In tlw tniddlt o/ a docwrv111
can ca..u roll{IUing ff<e/S, s/Jice orray tltmell1S wiU sum
q have sliiftt4 o positions, wl!Lrt n Is w difftrtMt
bttwee111ltl old ORIGINO/Id tite -ORIGIN. ~t tlw
Mte btlow 011 "llow ORIGIN worts.

When you we ORIG/N in a docwncm. kocp in mnd lhc


roUowng suggcstioos:

Chan:in: the ORIGIN

By dcfaulc. MalhCAD amys bcgn at clcmcnt uro. To changc


ths, cnler a ncw def1tioo for lhc variable ORIGIN. Whcn you

Oon't forget JO typc OR/GIN in aU e.tpilal lcuas. MalhCAJ


variable namc.l llC casc-scruitive.

When you dcflllC 111 arra y, MathCAD fills wlh zcros any
undefine<I clcmcnts from orrayOIUGlN up lhroub lhc
hihest dc(inod amy clancnt

U )'Oll SWt def111ng your anays wilh elcrncnl ooe bu1 lcavc
ORIG/N 5Cl IO uro, you wiU gct lhc wrong answcr wilh
amiy functions likc mean andffi. Ths s bcausc MalhCAJ:
wiU auJOmatically define~ for ali lhcoe arrays. and lhis
cxtnl clcmcnt disJOrU lhc valua of lhc am y functioru. To
avod lhs problcm, ncludc lhc global dcfinition ORIGDI
l in your docul1lCl1L Wilh ORIGilf l, lh<rc is 00 lolhc llSTlly fW>Ctions wll rctwn lhc C<lllttl aruwen.

use 1ubscripu JO refcr JO amy clcrncnu, MathCAD asswncs lho


anays be~~ a11hc curren! valuc of OIUGIN
l'<lc cumple, supposc you wan1 ali your amys JO bcgin wilh
clemc111 ooe. Erucr lhc foUowin global definLion for OIUGIN
111ywhcre in your doclllllCllC

OlUGIN 1
Ths dcii11C$ OR/GIN JO be 1 cvcrywhcre in lhc documcnL
MalhCAD wll no longcr mainlain an clcmcnt uro far vcclocl
oc a zcrodl row 111d column for matricu. Fure 11 shows a
document wilh lhc OR/GIN I

(_,-............

Sorne OOla aboul defuina vcc:1oc1 and mlllliccs:

d~

1
1, 1

"'
u.

Figuro 10: O.lt-Oog ond vlawW>g mOll1Ji ...,,_

~
E~~

[!.
']
~ : :

t '

. .'
1.1

..

l,l

J-o1 ......

i.!iG#JW#..1$.ll#i#JhGZ#UM.iM!.Al;"'l:..+aH&&f.f+!W.!M@WfH.hilfb)'ffic/ l1'JE.4 '

1 J

Cl,Z>

~""~

h 1

... ..

~ ..

E:r:ii

~~

~9: UllhCAOtn"OO...ina_,...,_

:i

;. SI
1

...

l:W

...,11 l

1
=!t

X['

.J.# 4illCP.4

12$

N( (i.j)

.. m

t==
1

Subicript.I and matrlx elemenla

"f

! . . ...-

.t.;~:-

1 .

.1

'

--.------

- -- - - -

___....,,.. --...--..~----

:.

~'. ~ ~ :~, , ~ ?~~;:t::~iIJF~!~1~~,::~:'.s:1;:,::,:~;~:1:,~;G::?::;,;~J;'.:'2t:r~~:!,;i:.~;~j:n:J


2b

Chapter 10

Thc value of ORIGIN applics lo all any variables, 11 is noc


possible to have sane variables use onc ORIGIN and others
u.1C a di!Terent ORIGIN,

Y oo ooi U3C ORIGIN 10 define variables with ncgatlvc


thcn ali amys will
subscript!. If yoo SCIORIGIN
begin wilh clement -10. MalhCAD does not aUow
l>Qn:n~gc:r subocripu.

-10:

Ir you rcfcn:nce an arny clemcnt wilh a subscript lcss than


ORIGIN, MalhCAD marka< thc IVTIIY rcfcrcnce with the
error mcs:sage lodc1 out or bouoda.
,low ORl<:rN ..or.U, fltrt' J /wJw Ma1hCAD drals wt1h
'JRIG/N ln1tnwlly:
Vht~ yo11

u..rt a JUbJCrlpl, MaihClJ nJxrru:u 11tt


nlu of ORIG/N from 11taJ sub1crip1 IO dL1mniM whiclt
irray dt'"""' you art rtfcrrlttg 10. So f/yo11 stl ORIGIN
,fer t.llllmplt, Ma1hCMJ JIU/U all tht airray reftrtncts bJ
'M .

" long os ORIGlN has 1/tt s~ Wll11t tltrougltolll tltt


lwlt '1MW11t!"1, tMs sllifllnt '"'1ks U~""' as lf al/ 1ht
TTUJJ SI0/'1 011/tt lndicattd subJcrlpl. lf'fO cltangt rltt
al"" of ORlGlN In tltt middk of o dMUMtfll, litis mahs U
lftltt airray 1/tmtfllS ltaw 1h/fl1d; ac1ualty, lt Is tht
~tftntte/Jtt mtclws>n tita/ Itas slfltd.

"'"as

Llmilsonarray slio.,. , : ,,,~; .,., . :....~, : .:...


MathCAD ha' lhe following limits on !he sizcs of amys you can
define, display, or cntc:r CJtplicitly:

Absolulc llmil oa aruy sltt

No array in MaihCAD can hold more !han 8000 clemcnts.


This mcans you cannot define or use a vector wilh mom
than 8000 clcmcnu, a squarc maaix bigget lhan 88-by-88,
or any olhcr maaix wilh more than 8000 clemcnu.

Llmil on dlsplaycd matrktt


MalhCAD ha! 1 limit on thc I7'1 of dl.tilayrd matriCCJ. lf
you try lo di'play a matrix bigger lhan this sir.e (in an
cquation lhat cnds in an cquals sign), !'.lathCAD shows lho
error lllCS$8gc matrlx loo bl lo display,
Llmlt on lnpul m1trlces

You cannot crcate a matrix bigger than 100 clcmcnts wilh


[AltJK. You cannot u"' [AltJH to makc an cuing matrix
biggCJ than 100 clcments. lf you cnr.cr numbcrs that would
acate 100 larxe a matrix in lhe prompt for [Al t ]M.
MalhCAD rcjccts thc numbtts and rctums you to !he
prompt so )'00 can entcr legal matrix sizc.

!~~

~-,....~

11

...

' [Ji~=!I
' [ :ru4~
: ~~

__dD"

lt - ::!!

, ~.to.r

: ~~
....,.. .=!!
: ~

i - - ..~

1 :

I ~~,..~
1 1

.
~'

: ~:1-~-:s
'

1 ~-~
--

Vectorund Mtrice&

11

~1 1 ~::fj
_,

:~:>.'{. :. :::~.\' "f :.?


,_...

figure 12 shows sorne ways to me >ector and maaix opttatioo

Array operutors and functions


Sorne of MalhCAD's opcraton ha-e spccial mcanings for
vcctors and matrices. For cxample. the multiplication symbol
can be takcn 10 mean scalar multipllcation, dot product. or
mattix multiplication, depcnding on the what k.ind of opcrnls ll
has.

MalhCAO alJlo hu spcclal bullt-ln funcdons for 1111trlca and


cctors, likc /1n11li for vccton and cols and ,..,,,.,, for maaicca.

tr1 ...

......__. ...
-t

Veetor and matrlx operaton

'

Ir an opcration Is noc llsted in lh!s 1able, MathCAD will mart ll

a :e 1

..ith thc error illt1l array opttadoa or non-aular ftlue whca


you try to pcrform il on a vector or 11111rix.
In thc table on thc ncxt pege, 1 b a scal.u Cllprcsaion, la a
vector CJtprcssion, Mis a matrix exprcssion, and /1 rcpn:smll a
positivc or ncgativc intcgcr.

l.M
l

u
1 ,1'\I

....'

F!gln 12: _

~i

..

'

.. . ~. Cll .. ..

.................. ..1 r.

.....1 ...

Ltl

.... a
..

.,

;):

t
!

_......

... ;

TOU can 11.ft t/tt "wc optrotor /O pcform IJll1 M:olar


optrallon or /uncllon, tlemtfll 11] eltmtfll, 01111 wr:t or
matrlx. Stt 1/tt m:tio11 Dotn1 calcidao111 /Jt paral/e/,
lattr In 1/s chopttr,

.
>

'

'

~ .... -

,- a
_iU:-::a
.,,;;,e.

1.1

. ..... _ . ............ .tct. - -

matrix opcrations.

~u~

o
___1 fl~

LI

- .r:.~
La

-...

.. [~] . . --....

Thc t,iblo on the next ptgc describes MathCA0'1 YCCIDr and

, ~J!;=s
1

[ ......

.........

.....
. . .t .. . . .

: 1

r...... ...

1r-: . ~

~~

-:-::~~]'". ~

1111

:~

: ~- '7'=1

i : l

... -~~- ._________..,.-~--. -~--

-....-.---~---'---~

- - - -- -=-=============='=--~---===
--=
-.

....,.

- ----~-

_::.

--~=,~-"~

-----.--...,,.------e-,_,-~,

"'~~--..,..-------,-~ ,.....--.-,-----,-,~

:==-....::.=_::__::___..:....._

,_""'-

hrM& ;;LijfUll!fi:l\!lA;i#fw1iw ~ t'iftt<&f'i1*11f''1

,,.,, ,,.:,..'"

.14:..."! :;~l ~--

lpllcallon

--

ZV
YZ
zU
Uz
V1V2

-lolypt

w yw

w11 ~
.1 ....2

lpllcalloft

U1U2

an"'2

y .y

lion

vf&
U/z

mall1&

V1 +v2
U1 +U2
.. + l &+V
U+l z+U

1"*'11

V1

-v2

U1-U2

"-1
U-1

~-

...

..

malrtl,

,wmoe

fYI

""

oorjugall

1-Y

1-U

-'i

!MI

l+.2

.........
...........
......... --
W'.l+to

.1 ...2

W'.1-IU

-...

lt"

111
11 (.Ut]I
y IJ.lt]I

v1 xYI

!!'
y

..

l4,'

Dt

ij+

11'

..-

lpl

v.

-"

Aocl.llll I ecalar: II~ Tho


mull be lht aame llle.
M1-1.12 rell.llll a mllrix: lht mlllrix produc:I ol /J 1and "2. The numbor o1...,
n "' musl mlldl lhe r>Jmbor ol cciJmns n 112. &lmh.rns. - OMlet Mdl -..n ol \IOdef Q' fllllrix by L

un1.nl

Roel.llll 1 Yec:IDI DI mlltll by ldding cootopondhg olomerQ ol ope!lndl.


Opeoodo musl bo lho ...,,. si.te.
Addl1loM<ll-olll0'1'Roel.llll a Yec:IDI Q' malrix by lli>llldilg cootepOOding . _ ol "'9fonda.
Opeoodo must bo t. ume size.
~1lromMCll-olllD1Z.D111ic:aYOfM.

Roel.llll 1 ol O'"'-

Q' mlllrix....,.. ....,_ n flt noglllivea ol t. "'"'-U

lth powor o1 mouix /J(U$inQ mllrix ,,...~)- /Jmust bt - bt."""" iunbtf. l/"1 repr-lht ._... ol ~ Olhor nogaliw ~
n l'O""" ol thf W"'11. fllml l !Nlrix..

Rll111aualr.1~v.

;rtat

1!:;1 -~

J.UJ Y2

11 mUll bt OQUM ma!rix. Roel.ml a acala-.


MllitM nHly-n!Mlril. r.il innby mmalril. Trwpou o! necia vol
llf9h nil 11~-n mllriic. (To lypt tht ~. hold down lht !Utl k.y
IWldprtht 1 k.ylllhtlopolf>eUytxwd.)
vi and "2mubo~ -.;mua io ~ Uv-oHlemll
- - (To l)llO lhec:rou ~ hold down lht iut) kay and pi.-lhe 1
kay 11 fle lop ol lhe Uybolnl.)

ar

TM oorfglle ol MClt ...,_ ol -

IJ.lt)f.

&rnol--b.(Tol)l>Olht .... opal0t,bc*ldownlht(Ut)kay


and " ' -... 4 kay 11 lht lop ol lhe Uytxwd.)
TIMI al openi... in llQ' velomentwiat. S.. lht Mdion"OoilgcalaJlliQ
k1pn111:111ttn1N1 chaplw, b a c:ofT'lllol ~Ion. (To l)llO lhe optrlb', hold down lht !Al.ti kay ond pr-lht
kay 11 lhe lop ol lht

(Alt)11 (.Ut)-

11

IAl.tJ-

(
11( (nl,ll2)

DI llll...,.,,. by lht tcailr L

11/a

Ilion

tcllon

Muqiioe Mdl -

0t INltil.

..n..

Uytxwd.)
ldla>UMol mllril 11. ~... . (Tot;pe lht ~,cap-.
hold clown lht (Ut] kay and P*1lht6kay11 lhtlopollht Uytxwd.)
dllalaawil o l - ; (nl~liarnanl olmllrix

l:-J 9
~

- ~~
11

:::]!
E: 3
E:::~ -~
1c-

1 3

IC- .

:_E:qi ~!!!

[~i!
[,.~!
1 C-.

t1 ~

-,

I :n

:::I

'~6:.

1
,_

1 .. L

Thc following lablc lisLS MaihCAD's vector and malrix-rclalcd

unc1ions. ln Ibis uable, 1 is a scalar cxpression, is a vector


OJ<prcujon, Mis a matrh uprcuion, and ~~u a x>UV<I
ot neg;ativc inLegcr.

""""""

V-

rowl{M)

lbnbllol rOWI~ maarix 1.1. Rotums sa1.v.

ooll{M)

tbnber ~ oolrnni:-w.i--,n.,u-; lelurn11 toeatw.

lenglh(v)

IUnbot ol olomer ,vedarv. Rowms. scal;i_

la~)

iRlox o1 i:.sr-~W.voi:iOiv~ROi\Jms. sca!M.

_...in

.,..r(v)

Woon ol

llWJ(Y)
mu(M)

llWnum ol elonion11 ri Yla vOI iNiiU l.


Roeums a tular. 1 vOI 1.1 lt C001>l11, rolu'no iht
rnaximum real part pkJs ilimes f\9 maxirrun

mn(v)

Lllllnum ol tliwnena '1 vedar ~ OI m.ifu "'Aocllrdl scalot.


IJ lt COOl>lol, '""' ihe
rninrn... r..i par1 >M ; ain.. an. minm.wn

voda

Aowi.-. 1 IG>IM.

lona\Jinary part.
mn(MJ

'

~arypon.

denUl)'!n)

FOin a~ onaogor, rlllKlll on "'f-11 d""'Y


-"'

~U)

AOCIK!ll lht trw-ot .ltiho wm ot an. ~


........ ol IJ. 11 musl bo. _ . malrix.

~nl,112)

The Krone<U dob ~~- ~ 112 musl bo


lnlogon. Aotl.llll 1 1 n'"""- oolhonltise.

l(n1,n2,n3)

ComlocOfi Wiililimmoanc lensa ol ,.,.. 3. nJ. ni


ni 113 musl bo RoQOn ~ 0 and 2 (OI
ORIGllon<J OR/GJN.2. ~ ORJG!/'/ O).
Reoull is Oihny lwO aro lhe samt, 1 kt _,
pennaliona. 1 kt odd pormt.tatira.
~

Ra(v)
lle(ll

~V)
lm(U)
Migrnen~llt ,112)
Mlgman~ll,v)

Migrnen~v.11)

IUQIJ10n~YI v2)

.....

RO.al ~ ol~vecla 0t matri.t. R...,,.. >'O<lO< OI

~ part ol _,.,, Of rrliiiriLROiuml-VOC!a a

-11.

"'

Cornboos lwo m.uus


one. The llQUOI"''
MUll hove IN a.wne nuol rowt. The mul
IMllriJ it oblai\Od by pc<llng lho orgumoR
OI Yeclon Sido by ode.

"'""*

'

'.l.~

1 .....

Vector and matrlx t'unctions


MalhCAD includcs runctions int.en<kd ror use wilh veclDrl and
matriccJ. Ir a function is not cxplici~y ICI up IO aakc a vector or
matrix argumcnt. il is illcgal IO apply it ID sucb 111 argumcnL

Fiure 1J shows IOOlC....,. for lhcse unctions.

..

11

--'"

.: .Hs~.,-:':tT:?'l~m'!~ .

..... :: .,-:-,..,..-,-, . ::-;::-r;~:: :. .' "'"t7~;.:"'ll"'".~.-: ,.:~ "';,~ ;:::~. :.'1~~-~ t!.~.~ :: :',:;~'...,;:; :.1 ..; <
- , - , - , .: ., ..,. ,, ' i '

..

.. ,..,,;

.' . :- ::. ..:. : : "::.::":;~?:~ :::. :.::; :.:<:..:.;:.::~.~':; .: . - ;:~: ~:::.; .:.::.::::.:r~ :.-.::::f![:<:.:~:~~:. ~:}:1::t1J:y

130

,;; f ... ,.,.:.. "' '

Clu1p1er IO

ktar . . .

,..trh lt

".. ~ l]

~IO

t I

For more lnormallon ahou1 lhc"" unctlon1, sec tlic ollowlng


scctions in lhe "Built-ln Functions chapter (Clutpttt 13):
s111tistlcnl runctlons: '1'ut foourier 1nnsrorm1," lnd

.. ~

[~]

"lntapolallon uncllons,

I
....tlh). J

..1.001

-<)

-to<:ll. llf~ :tlJ~


..._..,,.,,,._ttt<:an.

.t..Ce) J

[11

-ra

:1

::;t

l f!~i 9

lE7'"i !1

1 91~

Wamlnt. lfyoll applJ o"""' fWl(;IJll IO a"""'., ll


opplits to tlY tntirt Ytor, starlint wttlt v0 (or oRJGf'llo lf
ORIGIN .. o. Jfyo don'r upllc/1/ydL/IM Va- MathCAD
tomatlcally stu v0 .C. Tls may callSt ~cror fWl(;tfbtU
//u ~ to glvt lnapproprlatt an.rwers. lf ali yowr
starr witlt tkmt!nt
cltangt tlY valw ofORJGIN as
dncrlMd in the prtvWtl.I stction.

([ r-3

[[il-

""""

""

LE.=----3

MthCAD oho cootalna ..,.., "ll!tlcal -1 iochnical func1lon1

l~!~

thal tille W:Clol at 8 Wn<n. lllCOC are:

WJl(v}

ll

etl'r1vl ,v1)
slo~(vl ,v1)

..-11
1c-- --~
il

rs-:B

f1v.Ke 13: Vect>t ...i ,.,_ b>ctona

stdevM

i ~- - -

1=fl'.!!!

Z> 21

-...(e -

.., 1

l[~-3

u., t

1..

. . . ., ll

... ---- - --- ..------ -~-----=- ~~

[[ -:11

llJ/erctpl(v/ ,v2}

c!:l! ~s
tJ! ..a

ltlsW(rom(vl .v2)
/Jl(v)

(JTl(v)

<1Jl(v)

lcf!l(v)

lsp/lnt(Y/ ,vJ)

csp/l!tt(vl,v1}

p.ipllM(vl ,v2)

/1Urp(V(,v/ ,v2 .1}

1 ..-d~,.

{/111trp(v/ ,v1,1)

,;;;;::.~

.:O'.~J~.: , :. ~J,, ;.; ,'. ;~j;J.:.';< ;,~i:lt~;~'/(i;r.._::Y?Jf.~


,'' ,':'1i~i:\!,if
!~~~(}}.~'f;~1J'':~t;~O\~
~/ ;.~::::~>~,,
tl ~;.~
\'~\.' 1
; _.\
,
..- , ,.
1'"'
:lr.'1~bi.t.S;;,1, ~~'
.f;,.:,,~~i'ig~;ij, i:&tM~~;~' \l!lfi.~,}
,.

,f":_"\ ,

....

.. 1 1 '

.L

',1'\i

~ti. ~...

. -.. .

. ~~fJ'l~a \'C\-~'-i:FifP;\i<'HI:,,,,
1 .i.'C/i ~'', '\,,..;.;H'?hi~J\f,;~~;~.l~~;t~~:~:\jl,';lr'..1;;~1'~
~blc.~~..rjrai':V.,.:-r;-,.:~~T
.~ . . ~-, ;i~_..< ~ , '"' ~-~..,.

. -- .......... . - . .

Vecton In<! Malric<il

Dolngcolculollun!l In p11rallel

Any calculatlon MathCAD Clft pcrfonn wllh slnlo valuea, lt


can also pcrfonn with a vectors or matrioes o( valuea.
MathCAD's vec opentor allows le*> pcrfonn tho ssne
opcnuion efficiently on a vector or matrix oC values.
Malhematlcnl llO!alloo onen lhowl rqieated opmtlons wlth
subscripu. For eumple, IO define a matrix /'by multiplying
corrcsponding elemenU of die llUllricea M and N, you would
wrltc:

ln3Crt a lef'I p.=thesll 11 the beglnnlng o( tho expn:aslo1


. and 1 right psenlhesil the end.

Move tho cunor IO the lcft psmthesis and type [.Ut )- .

How tbe vec operator changes the meanlng orar


expraslon

(Notlce lhat thls Is not matrix multipllc8tlon, but multipllcatloll


cleinent by clemenl) lt Is pouiblc IO pcrfonn lhls operatiol'l In
MathCAD using subsaipll, a delaibed In die next cllapter.
lt is moch fast.er IO pcrfonn eucdy lhe ame openitlon wlth the
vec opctatlon, which il shown u SI arrow above tbe expresslon.
In MalhCAD, you could pcrfonn the above opel'&lion wlth IR
equatioo that looks like this:

a..

: :t
U1e the m: open!Of IO pcrfonn s:alaroperatlons cffidently
elcment by element on vecton or matricea. (The vec operator Is
oflen five 10 ten 1imes fmltt than subsalp!S and range variables
ror the samc opcratlons.)

llow lo appl)' the VfC opuator toan npres.lon


To apply lhc vec operator IO 1r1 exprculon, put tbe cunor on tho
to>-level opentor for tho exprealon and typo (Alt) (hold
down the IAlt) kcy and preu tho mlnus slgn lhat 11llClll1IO the
Oley on the top mw or the keyboanl).

IAlth

When you ipply the m: opmtcr, MaltiCAD pu111r1 arow O'


lhe top oC the whole expression.

/'IJ MNIJ

Tn apply t/M ~e operauw io a flutcdott IJltd 111 - " ' '


pUI the CllrSCW Olt~rt 011 IM/)ulcllbt1 ""11'tt ond preu

tr you can'1dclmnlnetbe1o>-levd opcntor ror die exm.ulo


you CIR pul the exprculai In parcntlle.cs and 1pply the ve.:
operaior u follows:

Thc vec opmtcr changes die meanlng ol the other openlorl :


functions 10 whlch lt applies. Thc vec openuor tells MathCIJ
apply the opentors and limctions wlth their scalar-anbtis,
1/trrwlll by tlelntnt.

Mere se llOIDe eumples ol how t.ht vec operaior changes lhe


meanlng oC ~ wlth _ , and mllricel:
lh Is a vei::tor, m.(Y}lun illegal exprcssion. But ll you
apply tho vec opetltllr 10 s.'l. the rcsun lt a new veer.o
who9e elements are the ainel oC the .Jements in v. .

ll M Is a matrU. ~Is IR Ulegal exprcssion. But ll you


apply die vec opcratOt 10 .,/M, lhen MathCAD compult:$
new matrix whote clements a.' lhe Jqume roou ol tho
dements in M.

lf y and w - W>Ckn. thcn ...,. ....,.,. tho dol product of


and w, But ll you apply the vec opet'llor 10 ,.,.., the = u!
a ncw vector whote /th elemcnt Is obWned by muhlplyii
1' and "'l This la llOI the WtlC U the do( producL

1he9o pmpcrtlet oC lhe vec openror mc lt IUCful ror makh


a:alar C:Xpres3iollll oompucc with veclOtl \vcctorizing" lhe
expreWonl). F e.umplc, tuppoec yoa wan1 to 1PPIY lhe
quadnltlc formula to lhrne vecton ot oocmclenu o, b, .00 c.
f'luro 14 lhowa tho quadn <ic lormula cumrull\d wlth tcalo"
Fi1ure 1$ lhowl the ume calculaOll with vecton, using 1ho

openlOt.

Ouipl.erlO

la illcpl. But wilh lbc vec opctllOC, lhe multiplicatioo


pcrfonncd elemen& by clcmClll, .. is lhc squaie root.

llllUaS.11--IC-S.
.crla1-. ..

r.n-:

-'"-'
.... J. .......
-----

:. i

:.

-a

:. 1

&ro n lhc propcnica ol lbo vcc opcrator:

.. ....

..............

.... ,.........

M...tl

n14:Th9..,.nic~

lllll.lal l t - - I C - S .

.rn ........ ,..._,

...........

. [... r.a=]

.. ..].~]

..... a~ .......]

" ~ ~] I ~]
!

[....

e :

~]

L"~I

......
-HI
. . . . __. ,

; .

...

l.IWI

11:~--

SimullaneoWJ delinilions-

l~~U - ,

(~!!::

An expn:ssion undcr lho vcc opcralOf may contain amyi


IKld IC8lan. Tbc amyi must be ali vcclOn of !he same si2o
or ali malricea o( lhc SllllC siz.c. Opcralions bclwoen two
1my1 are pcrfonned element by elcment. Opcralions
bctwoen 111amy111<1 a acalar are peonned by applying lho
ICl1ar IO eacb elemcnt of lhc amy. (For cumple iC v is a
-IOC IKld 11ia1 scalar, applying !he vcc opcratar 10 ./
n:111m1 a voclOC wboac elcmenll are lhc lllh powcn o( lho
elcmcnu ofv.)

19~

You cannot ute any o!lhe following ma1rix opcratioru


undcr a vcc opmur. doc product, mauix mulplicaon,
awri1 powcn, mauU lvaJC, delUllllllllt, DOml o(
Tbe vcc operara will lrllllSform lhcse opcrationl
inlo elemclllby-elcment scalar mulplication,
cxponentialion, or abloluit valUG u approprialc.
'Ibo-operwr bu no effcct ao opcraf/Jn 111<1 Cuncliona
lhat rcqlltr~ -IOCI or matricea: 1nnspo11e, aou product,
111111 oC-IOC elemenlS, and Cunctions lik.c 111ean, rows, and
coll. Tbmo operalOl'I and functions bavc no ICalar meanin.
'Ibo YCC openlOC applies only IO !he fanal, sca1ar argumcnll
ol INup and lturp. Thc other argwnenll are unaffccrcd.
Seo "lniapolalioa !wictiolu" in Olaxu 13, "Builtin
fuaaioor."

133

Vecton ond Mairica

Tbc voc opctllOC clwlgcs lho meaning oC lhc othct


opuaJors 111d/M11crins IO which it appliea, but not lhe
lllUlling of lhe aclU&l IWllCS llld numben. U you apply lho
vcc opclalOC IO a single lllllle, l changcs lho appearanco ol
lhat rwne (from v IO i', Cor cumple), but llOl lho
~OIL (U dcsired, you can use Ibis arrow for
ClO'DlClic purpcllCI, IO iDdicaie VCC10r1 in your documau.)

-IOC.

'voc opcnaar ia &bowa srow lbooe lbc qUldnlic


nula ll fl&l" 1~. Tbc - opaalOr I oaenal iD lhis
:Walioo. Wilhout il. MldiCAD would UelJlR( "'' u veclllr
pcoducl and would CCllllplU Iba& lbo ~ IOOl ola veclOI'

id.ti ~&~Ji$dl;~f:;g~~f~i~;::~:~~~tf
I~
l~~

l~=il

wvi~loo.I

l
\

, , ,

}
r'

11

I"~] :. [-i
.t,;;!:
1
1
ll
.... 111
wvi~lool

. . . 11
Nt.e LtHI

....-Lm

[En-:,:i

.Ji

""'""')'O

ll

':=IT::i

l!; .:::

MalhCAD u.ecw.e1 tite tlementS of a siJnJdlaMous


defutio11 ali at once, 110l 1tqwentially. You canllOI use tite
valuu deflt1ed on the ltft sle ofthe defurion t
uprtssions 011 the rlgltt Jide of the tkftniJion,
def111e the same variable tw/et .

:. a
l l l t - Wlltl <3

11..

I~~

Figure 16 shows two &inplc simultancous definitions.

1d::

l t=.~~=1:1
-l~

y ou can use VC:CIOrS and malrices IO Create sim.it<JMOUS


definidon, defining sevcral variables at once. An ordinary
definition has a single variable name on lhe lcfL A simulcaneous
definition has a vc:clOI' of variable namcs on lhe leCL

~:a~

l~
l~

:, '

1 ,. l

~]
1 1

,,..

J :.1

'J
'i

,. [f]
J

Figure 10: A 11,,,...,.,,_. dolnition

The

1en side of a simulianeous definitioo is a V'CCIOr or matrix

whosc elemcnts are namcs Of subscript<d variable iwncs. 1'bo


riht si<lc must compuit a vccta Of malrix exptcSSion of lhc
l8lllC siu and shapc as lhe lcfl side. MAlhCAD assigns CICh
variable on lhe lef1 side IO lhe exprcssion in lhc corrcspoodin
positioo on the right sido.

A simultaneous definitioo is just like sevcral individual


dcfinitions, exccp1 that !he defmitions talcc place sim.it<JMous/y.
This is helpful Of iu:mting scvcral variables simullalleOusly, u
describcd in lhc next chaptcr, "Rane Variables, I1aalion, and

Tablu."
'..

t4u*::::r~~:~ ~~.: ;':'J: 1'. l~~. ;.:;.'. ~\;~i~:}1;;~1t\:;iJf~~1'.rg~\~~l~Xti:~"t~ItE1~:~


IJ.C

Ch1pttt JO

Arrays ond ll!ltr l\anctlont-{'k ,,. .~ " . -.;".: ",, ...


The "'Ruments in a (unctlon dcfinitloo nced OOl be scalar
variables. They CAl1 abo be $ymbol! lhnt.SIAJld for VtttON,
matrices, or evcn Olhcr functiom - IMt is, anylhing lhat has a

- ...
. -i~

;f--~

,
,,

~ ...... ::.::::::i
L: ! . .

;;::

rwne. Functioru can rtlUtll valucs thal are scalars, vccion, or


matrices.

~E

Figur" J7 '1>ow1 nnc eurnplci or Cuncllom wilh vecto<,


matriA and unction-rwnc argumcnL, aml !Calar. vector, or
matrix n:sults.

1=1i~~

liwtatl Mtrh

..._.,...tt- ...........

........,,]
lhO>
~

""""tJ r

-et>

']

..t.ta; 111.m
ia.m

.. - .......,

-'-'') :

':

.......... ~ :1

,... l

... ...,
t .1'1PJ

..t..th)

.....u .
-'-4.( . . . . .

-:::::,~.:'-. ..

[ ~]]..

-'"'' l

r:'~]
l..,,
l.

1g<n11:u-~.-w1e.-mfNlriooe

~:::l

1~-:3
_J

I" . . e;

;;;;

11'''.::l

l~,.3

1 ~fi~
~- .,..- ~

l~!-3

11:a

L!li
[!r-:3
rr
g

L~~
l

~-~
1

Range Variables,
Iteration, and Tables

~Li::g

A nngc variable Is a vmiable thal tak.cs on a rangc ol valucs


cech time you UAC IL lly u<in& rangc variables you con pcrform
luration- evaluatlng lhc sorne equatlon man y 1irnc1 Cor mony
dirren:nt valuca or !he variables. 1l>c result, or ruch calcula1io<l1
can be stcred In MalhCAD amayt and dl5{l!Jiyod as ...:un,

tables, or plots .
Th!Ji chapter detcrlbes range ftriablct and thowt how to . thcm to pcrform iientive calculatlonJ In MalhCAD. This ctu1p:1
also describci input and output tablci .

Thls chaptcr contal111 thc following acctkm:


Ranct .. rtabltt
Drivlng ltaatlon wlth ..riablea dcfined ovtt a ningc

Outpat tables
Showin& V9lue1

or ranged exprcsslonJ In tables

Input tables
Enterlng tables oC values

lltratln calcalatlona
lieration wilh one or 1wo s~rlpu

Sttdtd lltnlloll

ltenting successivo valuos o< one vmiable, tcYCBI


m.blcs. or a vccn

Vtctor DOrtlon mlll subacrlpl notatlon


Wlicn to Uto 111bocrirtl

-i

~,~-1.J.'.f{'.~x:~f~li1 p,):~;~\.~\:t::~~
Chtpe 11

succcssivcly in lhis cquation, defining x Cor cach valuc of trom

e variables

OIO IS.

ilive woccases in MalhCAD depcnd on '""'' Wlrlablu.


variable taku on
ol valucs, for cumple, ali !he
betwcen Oand 10. Unlike OCha variablea, rane
s don '1 Aold valuca; inslead, lhcy ranc ~twu11 valuca,
MalhCAD' 1 ilcralivc pra;cuea.

""'''

Wll ahoW1 how io defino and uso rango variables IO


1

Types or ran~es
The dcfanition of Jabovc, runging from OIO l~. iJ lite simplCJt

:. J ' .
J

1
11

"

ni: and usln ran:e varlablet

:I?

...

typc lhe variablo name followed by a


Id a ranc ol valuca. For Cllllllplc, ID define lhc variable j

fffi

fonn:
11.&n9eVar: Startvai, NextVl; ltndVal

158
8Z

from OIO IS, typc:

~l.
~

To define 811 arbitrary rangc variablc, typo 811 <>Ullllon ol llti1

11'.

ic a 1W1ge variable,

l',. . .

lllW'\D ., M""

J ,. ' .. sa

type o range definilion. MathCAD pemiiu rangc variables wilh


values runging from any value IO any value, using any cooslanl
incrcmenl or docremenL

iltntion.

111
JZZ

In litis range defuiition:

U!I

O:U

,..,

...

171

W shoW1 lh<: scmicoloo u 1wo dou ( . ). Thc dou are


n e/lipsis. Thcy illdicw lh&lj aow lakca on eacb valuc

IO

IS.

Agn1 :v-.o1.

XI

define a rangc variable, il takea on ilJ complete rangc

To undctslalld how MalhCAD compuLCs willt range variables,


kcep ill mind lhis fundamental principie:

,. NCTJ time .J'0" 11.U 11. IC yoo U1C a ranc vsiable in ao

n, far eumplc, MalhCAD wiU evalualc &he eqwllioo


r each valuc ol lhc ra11o variable.
Ilf. Yo llUUI dejlN" ""'I' WJri11bU dlrtCl/y, I 1111
rlo11 willi a wuiab/1
IJw kjl llNI a wJt ""'le 011 tM
. YO COMO/ dejlN OM ""'le wriab'6 I lcnN <(
lf i ls
wviabk alld )'011 lllUT Oll eqlllUioll
l : i + l, MaihCAD IW-1 )'OM ore trylltf IO

"

.-r.

lfyow use rwo or more range variables in an eqwation,


MathCAD evaluares tM equaJiDn anctfor eaclt vaJIU! of
eaclt rons vorlablt. Su tite secrlon 011 "lrerodw
calcularioru." lattr In thJs chapttr.for more lnforrnatlon.

llAtrt.I Wltll lllllU INIAll.O

J :.... 11

1)7

IUna VuUbl,., lu:ration. and Tabl

o'""''

scaJor Wlrl4b~ "'""' ltl 11 ' " " ' ' ONI lfllVl:s IM

''" ""'" tlw '"'-:alar mue.

n dcf~ Ylll clemeolJ by usin a ranc variable u a


pL For cumple, lhc followin cqlWial dcflDCI .r Cor
iluc olj:
j: j'2+1

l shows lho veclll oC valuca compuled by litis equation.


iJ a ranc variable, il llka on eacb ol ilJ va1ues

{/JOM """

""'f' wulab i 11111xpnuw11, MoiC.tD

11J.J!MOJ11 llu

up,..uJo11,

"'' /or ....,,.

l!IJll

o/ 11&1 rang1

Nri.Jbll.

This principie sums up lite diCCcrence beiweai exprcssioo. wilh


and withoul range variables. Expressions lhal involve no rango
variables llave ooly onc valuc. Exprcssions lhat include rangc
variables are r011gcd o:prusio11S - lhcy take on maoy values,
onc for CllCh valuc ol cacb rano variable.

StartVa/ is lh<: swtin value.


NextVal is lhe sccond value in lhc range. The range
procudJ in incremcnlS oC NexlVaJ -Star1VaJ. U you ooiit
1he comma and litis argument. MalhCAD assumes 811
incremenl oc docrcment of onc.
End't'al is lhe lasl valuc in the range. lf EndVaJ > StorrVaJ,
lite range values are cons1a11lly incrcasing; Olhcrwisc. lltey
ue cons1a11lly dccreaSing. For eumple, lt : 10 1
'WOuld counl down Crom 10 IO l. Even if EndVaJ is not 811
even numbcr oC incn:menlS Crom Startval, lhc rangc will not
o beyood EndvaJ.

FlgtH9 z: Soma vdd dofiniliooo lor rongo -

Wondnf. MaihCAD subscrlprs nuut ~ wholt nwnbtrJ. lf

you 11.U o frac1ionaJ l11cremen1 for a r011gt variable, 1Jw:11


you connal 1'1< 1hal ronR variablL as a subscript.

You can use arbiu-ary scalar cxprcssions in place of StartVaJ,


NalVol, and EndVaJ. Figure 2 shows lhc results oC various
rangc variable definitions.

MaJCAD taJ:Ls w11gcr ltl ~"" equadollS wltit ranged


uprtuiOlu, s/Jlce INrt are lrlOll)' compUJOJions for each
tq1101lo11. Whi/e MOJhCA.D Is comp111i11g, 1he W AIT

wv=gefla.sltcs

" the mcssage Une once as each equaJio11

ls compuitd. To abt caiclllado1111Jt progrcu,press


[Ctrl][Break]. To rcswt an oborted caicu1a1io11, plll tht
c1Usar In tite lnJerrMpted tquadon and prcss (r9 J.

......---------:----~-,..__.....---~~----...:--

----~

-- . '

---.

------:-- - --

r~.1C:-:1-'1'r.;,~~~~

''

_,. :;;~:~;0s~:r2i~1~~-~::~:}~:r~:t:::.;:ji::t~~:?:~'.::~t~:}~?'.'.:)'.d

ll8

Chtptct ll

OutpuUabl '>.'~: :r.ti~.;. ,.,.

" :"'' ..-

When you type a ranga! cxprcssion (an cxpression lhal lncludcs


range variables) followal by an cquab sign, MathCAD shows
!he compul<d values in a table callcd an outplll table. 1be iablc!
shown in Fgun: 2 are ouipu1 tables.
You can gcncnuc oulpul tables for any expression with a rangc
variable. To show lhe cmu:nts of .. am1y, use thc range
vmiable as 1 rubscript.

Yo may su gaps In tM llnu In a disp/aytd table wMrt the


nu.mbcrs in IM table hove overwrllltn /Mm. You can igttart
thtst gaps (IMJ do not apptar in prln/QlllS) cr prtss
(Ctrl)R to rtdi.rpiay IM table.

Hcte are 90me facu aboul ou1pu1 tables in MalhCAD:


MathCAD shows only the fst SO values o( a rangcd
exprcssion in a table. For exarnple, i rangcs from 1 to 100,
thcn typing 1"'2 will show only the values from t 2 up10
so2 in a table. To scc more than SO values, you llte(j 9Cvenl
range variables and sevcral tables. You could define j I from
! lo SO andj2 from 51to100, and then show tables for
jl"'2 and j2"'2,side by side.

Figure 3 shows somc output lables.

= .. u

, ,. [ ~]

.
1

1 ..

' : -

., ........

J<(i

110

9Calar (asinglc numbtt)


Figu<9 A<>oounllno lorunlta In a tablo

shows an oulpul table. lf you type a vector name without a


sub9Crip1 (lil:e
MathCAD shows the vector In vector
notation.

lnputlable!h

:~~

' I~-~
111

~JI u
l! c7:ii .

11

lLr - a

L~L! ~

1d!JA

When yoo 1ypc a calculation cquation (an eipres.~ion followed


by an equals sign), MathCAD shows thc rcsuh u:

Thcre are two ways to show the nlues in a vccror. II you


typc a vccta namc wilh a subscript (lil:e z,), MathCAD

MathCAD shoW1 the cntries In a vertical table. 1be : rcm b1


you lhat thi.1 i3 an input table, nol an output i.able.

1ct! :il

. l..a . 11 .o

1'1:7 ,,_ --;:::.

' 1:1
L: . ~

l~-~

..t..! IL

:U

.,.Jl.;.L? &i,=4: 1Jkt: i;,;;; 4h' ~ It.'.'. ~.o;;A

Ranco Variables. lta11ion. and Tablee

Input tables~ like ourpuc table.! e~ that lhey d4fN val"'


insllead of displaying tbem_ To cnttt an input table, cnter a
de!inition with a sub9Criplcd variable on one sidc and 1 seque
of values 9Cparat<:d by commas on thc othtt. For ex.amplc:

il[j-ii]

<-ll't.r-111 ..

a vcclOr ora maai~ if the result ls a vcclOr ora mallU


a table, 11 thc rcsult b a rangO<l einssion

You c11nnot use units with a tsble u you would wilh a


single scalar answcr. lf thc fCjUllJ In a table have
dimcnsions. MathCAD shows thc dimcnsions on eaclt WJ/w
In tM tabl~. To avoid lhis display, divide the rangcd
exprcssion by the desircd uniu. Figwc 4 shows an cumple.

"

ir-~ '!!2

Flgln 3: Output tableo

IL..,,.

~,~ -~
JJ!I

:1~::1-~
i
11[ ,_ 111

a numhcr, i lhc result is

:1

To formal the numbers in a table, move the cunor into the


table and typc t. Thcn O<lit lhc formal spccification as you
would wilh a numbcr. To rctum lo default formal, move the
cursor into the table and typc d.

! .....

...

' ~ ....,.._
:-~

To cn:aie thc ~tables ln Fi;llle 3, typc lhe-'O thtce cquations:

l1i".!;. ,,.~~:,:"l~~:."i:q,..12i:wrli\~t~~i'+'!lt"~~

,.: .. .:.et:--::i..1"': . ~, .~:~;1;1', i~J.l'.!1~J&~~i!~.~'!~~~1t....;\t~

! ~!:.ij

11

->.

z[i : 3,5,12,20

In a tsblc like lhis, thc cntrlcs ~ assigned k> llTllY ckrncnts i


successoo (9CC Figure S).
-sllO/fy tasln /Q tf.4111t a vtetor upllcltly KSlll ~cto
llOtal/on (Y:-{.Ut)NJ tha/t /t Is IO fkjiM iJll i!lplll tab/t.
Tht most COlllMOn iur /or i!lpr tablts Is whtn yo' rt l!Cf
Sllll ltow many ~kmtnts wlll bt 111 IM vec/Qr <U JOll. deflr:i
/t.

/(J

Once you have m:aled an Input !libio, you csn do any of lho
foUowlng:

E.Jttcnd the table k> hold more valocs. Put thc cunar 1111
cnd of the last value and typc a comma (, ). MathCAD
aeates a box for a ncw value 11 thc end of thc table. To
cnttt another numbcr, just type it in for the placcho kk~
the last box.

lmM a value In the middle olthc table. Pul lho cunor ,,


cnd of one of thc va!UCI In thc table and typc comma..
MathCAD crcatcs a box for a new value bc1;11ttJC11 the
cumnt nlue and the llClll value in thc iable.

Delcte a value from thc table. Put thc cuna 11 thc end 1
the value you W-.l IO delete and press [Bksp) until <mi
placeholdtt remaln.' - l'rc31 (111'.ep) once more lo dclete
cmpty box from the i.able.

Agurc 5 showt IOl1WI ways k> ""' lnM i.ab~

1
MIT~.~;rr:?T::Y:~:~u~~::.~.7::~~g;:r1.TI:z;I;.2:,;: I.::~~~==;=7.::~~=r:: : :'. '.
~~IAallal~~~~~~~WJ ~c
:3
Chapta 11

...

lleralive calculatiom;i

l :el 11
1

...

... u.

:e .ll

l :Lit

Thls acction lhowa how IO

...., ...... c..............wi

i!Ualioo.

"

'

"' nano vllrilbles lO pcrform

E!:"' !!
l:!-:-~~

The 1imple11 klnd uf hcrolion in MothCAD la ju.i a

.....
.....--_,_,
..........
..................
~ -~

cnetaliution of tcal.v calcula1ion1. Any calculation thal )'OU


can petfnnn ooce, you can llCrOfm ovtt ranae ul valuN.
Por ..amile, IUJll"'"' you w111l c1Clllo a 1111 of mi y valuea fur
poi11u on Lhc polal curvo r-col{O)t l. The baaic i..S.:. bu
foUows:

O alwiuld IAke nn vah..,. holwoon O 11vl lll.

lbese is onc r v&Wc Cote.ch O, computod ualn tllc formula


rcos(O}+I.

Por e.ch r and O, tbcro il a cnrn.<pondin and y, comput<d


.Wn11 OIO funnulu x r-cos(O) 11wl y r&in(O).

1:w.,...,_'PI"_
..u ab<Ju1 inpu1 labia&:
"'valuea in Ul inpul table can be numbcn 01 enuiona.
Lhcy are .. prcuiona, MalhCAD wiU ovalua&o Lhc flt'll
prcqioo u 11>6 f1111 lablo valuo, lho MICOOd u 11>6 accood
>la valuc, llld IO OL

l lbe ..nuiow 111 aa lnpul IAl>lcl mUll llave lile ume


ncnaioN (OI d>ey lllllll ali be dimcnsionlelS).11 y<>U Wanl
cJI upressioo IO be 111 melUI, Cor cumple. you 111\ISI
:lude Lhc abbreviaoll for metc:n in eacb sable eru:ry.
1 input lable ordinarily bu ooe couy

for eacb value of lhe


ray 1ubocripl. 11 die lablo haa IOO fow c:ruriei, MaihCAD

ill dcflllC ooly u lllMly vahaea u 1n1 prcoenL lf Lhc labkl


IOO many enuic&, lbo exira enuia will be inorcd.
pul lablca !lle limiled IO SO demcnu. 11 you W&lll IO enlCI

ore lhan SO elaneou, _ . lbc:m iD ICVUal llblea.

: ZI

!..: =~

The acniey C011<>lvin& lhb problem la aimplc: aeatc a nngo


vsiablo 1and lhcn compuie O, r, .i. lnd y for cach l. 1lio formula
fof 91defines 9 IO ruq from OlO '.h. To C1calC Lhc Ollttt
formulas, iull pul lhc subocript I oo cacb variable in lhc fonnula.
Piuro 6 showa lhc ~ulL

:r~
e ~
. 1

~~
-; 11 -::a

: 1 1 -

-1J

' ,. -.] .
t' I

1
I r

You C<lll use IM oposlropM uy ID Crtalt a stl e{


p;utlUMSIS/ordDMblt subscrlpts. To 'Y/H t.{,flrsr fyfH :

t ; .

r1

~rn

-- ,-;;i
~ :r~

1uhscripL Otaku on fracliolwl values, so il cun1t01 be u>Cd as a


1ub11Cripl.

!:s

~
!:!--b;

~k~
EJ~I

M('

MuthCAf) creat<S u pairo{ ><JFtnilvstS In 1/M! sufocrl><


wlvn )'<IU IYf~ 1/u ttpostroplv. Thn ty~ 1, j 10 comiltU
1/v t.rlftsslon. l'UJ IN cursor 011 IN rlr hl xut111/vsls IJJ
111< '"''o/ suburlpl if you wanl to a.Id mort to rht equurio.
----~--- ----------- ---

ltllAI'

'"
'

-~YUN

ruo . u URllAILU

I 1 , .t

J '
Figura I ; lllio<l IO ....,.,. a polar ploc

69

141

Fg= 7 shows Lhc n:sulL

lfPlll"""""-I

ltcnatlon ovcr nan:c


- WI c.IU. o l - _ . .. loe 1-Wl

R.ano Variabl.,, ha .Wn. and TeblCI

Noiicc tllal in lhis ..amplc /, not O, u dcfinc:d u thc rangc


vaul~hlc. Slnco I uakca on only whulo-munbr.t value.s. it la a valld

By iuint vtctor 1Wtotlo11 aNi IN vtc opcrotor, you C<JJI


11/mlnate IN "''o/ o s.Wscrlpl /11 1114 las11/ve1 equallons /Ji
Flur 6. This Is ryplcaJ of problnu wNrt you /lcrau over
a rangt. Equa1lons r/lal use w:clor /Wlatlon lnslead uf
s.Wscripts rypically compuse lfWCh more quickly. For mort
lrfon101lo11, stt tJie prevlous chapttr. "Vectors IVld
Matrices...

Multiple range variables and double subscripts


11 you use 1wo range variables in an equatioo. MatbCAD runs
lhrough each value of each rango variable. Thu u usclul for
dcfining mabiccs. For cumplc, IO define a S-by-10 mauix
whose (IJ)lh elemcnl iJ 1+j, lype lhese cquations:

I l

t.J

[1 J

. ' . 1
1

'

'

,.

11
11

tU UU

.. 11

u u

Flgul97: T~ llITTI)'

Nooce how MalhCAD deals wilh 1wo range variables in 1 , ;nle


cquaon. The .l_ cquaon u evalual<:d for each valuo o( cach
nange variable, or a iolal of 50 evalualions. The rcsult i.s the
matrix shown at Lhe bouom, wilh S rows and 10 columns. Thc
elcmatt in Lhc ilh row,jth colwnn of thi.s matrix u i+j.

1:0;4

j : 0;9
x[ (1, j) :1+j

1
1

~-:. :7e"'1;;[["~1~)~}2?1::' ;~f~:tr;1 ~1;rr,1'r:nn11w~

12

~a

Choprll

1/ 1/rt two rQ/lgt YOriciblts havo m and n valutJ,


Wlrillblu t an owpw tahlt, Ma11tCAD wll/ sliow tlrtu mn
rt 1u/1J In a lun1 1ohlt wl1A OM tnlry for tac/r rts"11. /f )'ON
"-" /""1 rangt Wlrf4b/ts t a plot, MathCAD will plot OM
point fur ach of 1/rt mn rwJtJ.

Stttd lttrat/on Is a \.ariation on ordinary MalhCAD hcrntion.


In a !Ceded itcnition, you begin wilh a value and lhen compuic
olhcr succcs,,Jvc value! basod on lhc rll'St valuc. Thls 9CCl.lon
describes lhrce types of scodcd iicrntion: hcrating a single
variable, ilenu.ing multiple variables, and leratlng a vector.

Seeded ilerallon on one variable


Thc classiclll mcthod for esdmating square roou arilhmcdcally
Is as follows:

To find

./O, bcgin wilh a gucss,

Compurc a new guess ba:led on lhc old guess, wilh lhls


fonnula;

NewGue66 (1/2)*(0ldGue66 + &/Old~&66)


Condnue until the gucsses converge toan answer.

Figure 8 shows how IO lmplemcnt lhis mcthod in MathCAD.

r /mportant. Wlrtn

)'OU tnltro subscript /IU i-1, iur


partntlrtstz k> htp tlrt wlio/t exprtJJfon In tlrt subscrlpt.
l'rtss opostroplrt }MSI afltr you J'f'eSJ tht ltft brad:tt for tlw
lubscript. MathCAD sltow1 partntlrttts arolUld t/w
1ubscrip1; you can IM11 typt ln.rt" tlrt part:11tlrttt1 and
htp t/w wltolt Uprtssl0tt In tlrt sllbscript.

143

c-ai

eededlteratlon ..... , ...... ,, _ '-i .... , .,, ..

rtJpcclivt/y, llrtn ""tquadon ILJin! l>o1/r rtJllgt WJriabltz


..,;11 calcula1e mn rnulu. lf )'O 1ry "' UJt two rangt

Rane Vuiablea. ltcruion. md Tabl<S

J
/f-wi GI
i1
I~ LI

di1:1

1f=---

~1 .

:=!:
:11

lE>.:a
L~-.:iJ

~l!1~

~!!. 6
1/111 .

' . ,.,.~~-r~rtt;~J. :{p~:r:\f~r~~~ .~:::.r:(T'.

1 I 1 .. R

a:IM

. . . 111
1

:B ~
11

1~!~
11
/~]?)

1~~

:ti

-
-.
.... :-----

1Jl1n

lll:nlle each equadon 1Cpmately. lnslead, you must crea1e one


cquation lhat perform.a 1111 the 11.eradona simuhanoously.

ano l!DllllOll

.~18711::

'

t.

.&Z:Z17"(,l,8t7

17.
17

ow

f9n 8: Ualng 1tedod he<alklt1 ., ......... oquarw rool


Thc Importan! characterisdcs oC thls example are:

A rangc varlable, I, counts the lu:rations. Thc range Ylriablc


l.
Thc 9CC<1 value Is deflncd u the zeroth clement d. the am:r,
SlaflS at

futJJo-

1.,., 0.0001 z.i.


.,.,. z.-0.<XXllz.i.

~?4S56ZZ8

1,

11

Por cxamplc, coruddcr an lnf'cctlon mO<lel wlth four variable!: 1


Cor lhc numbcr or lndlvldlllliJ lnfoclCd.1 (or lhc numbcr
smceptible, d Cor thc numbcr docea.~. and r Cor the numbcr
ltlCOY.:ttd and henc:e lmmuno. The rour cquatlona !hit rclalc
the3c four Ymiablet over dme 1111:

In lhc equadon for tut"i. each sucx:essive element Is


dclined in ICmlS of the prcvious elcrnenL

"'. d, +

"''"

'r+/ r1 + OA'-'i

Plgirc 9 shows how IO perfoon a slmultancous ltera!lon ming


the3c equatiorB.
W.C:J

rmr;me.1111
t : 1 za

.........

-'
rr:1
ll!UJ""'-8 ITtllltlOll 111
-.OOf D'IM!!IC

tol

tt

,..

'"

:a

t '
tt

l.mt.1 l

l.!ll l
r t l . IS l t

'

............
...,tlM

...

' -"'

Thls is typical of seccled iteradon, ln which each element ol 111


arrny dcpcnds on !he previous elcments oC lhe amy.
To hal1 an /~ratlon on a cofldltlon, 11.tt IM unlilfunctlon.
Stt Chapttr JJ, "Built-ln F11111:tlon.r," fer mort ll!fonntJ1/o11
on tht untilfunct/011.

Sttded lleratlon on severa! variables


You e11n use MMhCAD 'a vector nowJon to hcntc sevcnl
variable! simultanoously. Thls is a variation on Implc seccled
hcra1ion.

Whcn you itttalc sevcnl -'ablcs, each s1Cp computes the value
olhc variables rrom ali or their pn:vlous valucs. You can't
ICCOlllplish lhis wilh sevenl equations; MathCAD would lrf to

f1o<n t : Slrnu-.... -

10 modoC an lnlealon

Seeded lterallon on a vector


You can abo perform teedccl li.cndon swtlng with a vccto< "'
computin1 a ncw ...:tor each time. Thls 1ypc or iicnlion
llCrlCI VCCIOf and MathCAD's supcncripl opcrator.

use1 1

- - -- - - - ----- -----

vl:DY wou:u1 n cxunplo ol poblcml dial lnvolvo


..O oo a va:ior. A Martov proc:ca beina willl a vector v
lfUCfltin lho wninc valum ol IOlllO quanlitlel, Cor cumplo,
' numbcr ol VOICIS pluoina IO >040 Cor diffcrcnl candldall:ll,
1 num~ ol truda 11 NCioul officea ola ll'llCk iaua1
ni*' Y, 0t lho aurt. ... d d.lltenn& coml)llliea. l!acb llcp
lho Martov proceu ClOlllpulOl I WICla by muhiplyina lho
>Violia Yoela by a mcU ..
1\R 10 showt bow IO lll upa Mark.ov procca In MaihCAD.
IU aublcripu lle ru:ned IOt IC!cnin IO individual VCCIOI'

1malrix clements, da ltduiique ~ 111/XrlaiplS IO ndcx


: WJCIOn. (To lype a ...,crxripl ill MathCAD, 1ypo [,Ut)":
la clown thc (Al t 1k.ey an4 prcu tilo 6 k.ey 11. lhe IOp ol lho
rbo.-d.. Tho aipcncripl ia lhowD bctwecn 111&1o bncl:cls: <>.)

n:' bow ID 0111.Cr tbo ~la Fiire l!k


~ ran1evarlabk k IO

k. : J.; U

... [.UtJ..

o:

'""' luradolll.

[1.1.t)&

Dcftiw Wd4l wcior v. (E111er


/1Wf!bu1 I W WClor 111 lioowfl
t t11ur1 l O.)

A : (,UtJK , ,

... tAJ,t) ..

11; : ....

., LUtl" u

.,

~M Ir~~ lftlllr: A.

tAJ,tJ" (k.-1)
Eod MW WCI 11 dqf!vd"'
o{ iJw pl.W01U llCCW.
S"-JVl11111li(/as1)-ux.
Sllow ali wc1M1 as colWMS l(
- U (u N>U IHl-J.

""""

--

11

----

~]

Fr-r-;::i

Gf9

' ' _ . ...... _

1 1 ."Q

[. .t 1

a; . n

.1
11 '

QI)

b.31
r-~
H.m

-u l~::i

<rl>

,.
......,

(lo)

...._

1.1
J.I
'" 6.:1'11 ' ,,l!lt " " ' l.'17
, 11
a .a 17.4
17.
11. "' 11.m a11.1 n.m r

11 11.f 11.1 11.U 11.UT

Figure 10: AMlri<ov _

11.19

H.,, H.'11 H. t

IO_ -

Tlll 1upuscrlp1 opcr111or actually rtlrieW11 or lkjlMs oM


"''"""' IAalf'llJlriJc. Wlwi.)1111d41Mv> U. 1mn1c(
,,G.I>, .J'OM ar oaually dqlnin1 cacli col1UM IA a lftlllrlz IA
1am1 o/ IM
co/WM. (Tlv lasl eqlllll)n IA Fl1ur1
i I01Jiows IM tna1rl:l compoud/rom tlieSI co/IUfllU.)

P'"""'

1 1

::1

' .. aa
1tJO I

~
--r

llano VuiablOI, IU<at.ion. lnd TablOI

:y
B=

!3

.J
EL~
e-;--~-~
c._; 1-CI

1l1i1 chap1cr shcr.vcd many exampics usin subscripl nowion


and rango variullics. 1lio prcvious ehA>LU, "Vcc1Ura and
Mallicu," showcd many eumplu usin -tor notation withoul
1Ub11Crip1.1. 1l1ia dlatlncllon la lmponanL Ir you uso 1ubacrip1.1
when they are not requiml, or vice vena. you probably woo't
et thc answer yoo'rc lookin C(J(.

&re are sorne rulca o! thumb in when IO use subtcripts:


To refer toan individual array elemCllt. use numbcrl u
subscripts. For cumple. IO llllC mauix clemcnt 2,3, typc:
W[(2, 3)

1:ji)

E!-:9

1
~!.:,

~-:i

-1

''
1

To refer IO an array u a whole. use the array namc w~


subscripts. (The tmn array means eilhcr a vector()( a
matrix). 1lie array name with no subsaipts is apropriato
Cor multiplying one matrix by anolhet, applying thc mean
UllCUOR to 1 veclOr, or viewin 1 wholc VCCIOI' ()( m&uU aJI casa wherc you wanl to treal thc array u a wholc. For
cumple, to view thc wholo mauix M in Fgwo 11, typc:

.-

To rcfer to OllCh oC thc 1r11y clemcnts In 1UCCC11lon, wc thc


amy namc with a nnge-variablc aubscript. This is wcful
whtJI <lclinin lhe malfX elcmenU USlng SQmC SOfl OC
ConnulJ.. 1'0< uan>lc, to dcllno
m1111lx /ti In l~u.-o 11,
lypc:

'

1: 0;5
j: 04
W( (i, j) :1 j

Pgwo 11 shows IOlllO cumplei ol Ulin amy namea whh ancl


wilhoul 1Ub3cripts.

Ml1..:XIJ.-Clln1

.,

1
1

.. '

,.,.. '"9'1 lfllN "'9

I lJ

~ ~

1 1 .. 1

'

.. U\ . ll\

....[''"\,.... . l1E\

1 l 1 l
1 '

1 '

~ ~ ~ 00

Withoul subscripu, thc variable narnc rdc:n to thc wholc anay.

1
!=~

1'

Subscripts rea to individual array clcmCllll. When yoo uso


nnge variablca u subscripts (Cor example, Mi.. MalhCAD l\llU
through the individual elcments or thc array one ata time.

C:~

d~

'

_.(1111)

'

33

....oo.

F9K9 11: Asr1lf ,..,_ willl ~ wilhoul oub&aip.

Uerative calculations with and without subscripts


U'a ofttn Casta w use vector opcrations lD pcrf(Ittl iu:ntive
calculatioos than il ia lO do them elcment by clcrnClll with a
range variable. Bul llOl ali iierave calcuiations can be done u
vector opcrations. For c.umple. llllCdcd italltion cannot be done
whh vector opcrations.
To tdl if an equation with subsaipu could be rewrit= usin
vector notaoo and thc voc opcrator. chcd:. thc Coilowin:

'"'"

IC ali tho sut>$Cri>U in the eakulation are thc


1hctt lhc
calculation can probably be dooc quid.Jy usin vccll.lf
operations. For example, eonsider this cquation:

Xl : rlcoe (0,l

--

Sinco 1rwutluough111 thc anay elcmcms. 1hi1 cquotion


could be rewriUCll usin lho vec operauir and no wbsuipu:
X : rcoe(O)

.; ."

lllJl,';.-if ';1-t\ t"/:i,UY\:!l~f.?,~

~;

. ' "

r. ~:.:~~./j.~~Y,,.il;>.'1!(..l'~. 1.f;f ' ::, ..(" ' 1 1, ' 1 .1,.. , .t 1:1h.;. , ~., 1f1

-~ r~. '.:.' . :: -;:_:. ::~.-. : .".:-~~.f; -~--. ~~::~~ ~<_~.:i :. :~. ~~-;-~~:,.;-: ..~.::. ,:'.-':'~ ..:':.:}'~; ~ . -~_.. ~ ~ :::

: \: ,,
146

.i

.....

s==:~

<.'!"orll

~11 :!!

u.nmple, srccit":d ilemtion involvr..,, 1he ~uh~cript.1 / and lI in


lhe samc cqua1ion. Sincc lhe subscripl.S are not lhe samc,

and sincc thc ....cond s11bscrip1 involves arilhmei.ic, lhis


cnku1'1tk>n cn11001 be done using vccl<Y opttllons.

'' [ mm~

U lhr. rAnR,r. vnrlnhlt1 appt"JV~ noywhem In an ('ll111ndnn odV":S


tJw1 in a 'IUh!tCript. the et1unlion ca11110f. be writtcll using
vccUJr opaaiions. For cumple, Uiis variable canOOI be
ddlncd wlU1ou1 sub"'1l1tt:

: L-~

o, : o. 11
'igure 12 shows lhe polar cquation rrom Figwc 6 compuled two
rays: usinR subscriplS lnd u.1ing vtclOr opcrntions. The socood
iclhod is much !nsler in MalhCAD.

IUIAI IOll OUfl A lflQ

UIU...._.lpta

, ,. -r,1

: t "

. ,. ,-r.1 slr 1
1

u.ctor ..t.t.tl . . . . .

:. ! ..
1
" :.

. . .

tlb ....u ............ ~-

"
C~U

: Cr me<tH

?n 12: Chonolno an ilonlM proono IO _

MalhCAD lncludea oolinary opcntlOn Hito + and /, matri1


llko lnnspo90 and determinan!, and spccial opcnllon
liltc l1er11(d sum, lterate<I producl. ln1cgn1ls, and dttlv11ive1.

opttalOn

.'!'.[~-
:li 3

This chapter contalns 1 complese I~ of MalhCAD opcnion and


dc3cribes how IO enia and U9C 1he special opcr1110r1.

:i4ii :~

.-11

Tul! chaplcr conlalns lite followin 30etlons:


Lllt ,,t O!'ft"ltorl
Complete Ust o( MalhCAD opa.ion

il[ 'i:ii -3
'![--. .... !3

. ....
:

11 : ti

Operators

5:1r~

lf lhc subscripts in a calculation vary or if lhcrc is arilhmctlc


involvttl In comp111ing 1he suhlCript, lhen the calculntion
pruml>ly canr1111 be done using Vttlor opcm1ions. For

1 : (r bU))

_,.eon.

Saml and produc oYCr a r1U1re


llow to U9C MalhCAD'1111mmatlon and product op:n10r1

~11

il
[:..,

f'rlntlnt

How IO me MalhCAD' numeric deriVlltlYO opcn!Or

Jnttnll

How to 11111 MathCAD' dcfi...i..;- : ~~iuai opcntor

I[~~

11r-1!~
11

11

1~..:- - ~

. ,

....

:~ .,

:~!4!1

_jll

'~j:

....,.... :: .' ." ' . .4:~


' ': 'J kl~ ~~~
. ~~;~~~:~~;~~~~~,.;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~&~~~~L,.J,
ffl*t'lfifil%L#ili~~
)=~~~=~

tjlji;@JtM14!A<,;ii';JktM"
'":t:1.1141iiNiW
" 1 #'1 t '
- - -----~Wi+i''.::
.
1

r uperaturs

'

l Y

:sr

Mull~icalion, dal prodoct.

. .- -- - -

c :s

...ruc

prodw

comple&c liJl o( MalhCAD opcraun iD adcr o(


ICC.

fonnaiion on array opuOJors. ut Chapttr 10.


11

rmna
"" (:s)
a(i
[Utj 1
[.Ut)-

"'

..
(lUt)I

rr

OPERATOR

1xy

:s [UtJ r

ei-produc1

ti

Uz

Soovnalion CNtt rwigo

ni

Uz

Prod<Jc:llMlrwigo

J.~x)dl

zU(z)

negral

d
-1(1)

z?t

Mllivt

z+y

Addilol1

Pnni~
~.(lhcWIVI o1

maro J)

_..,

Ved..U. (11911 opllllbrw

F9dOrill

..,
clJ

1-J

z-r

..,

~~

l-

"- -ix.-. Mril

Mw(11)

1 .,

ny

[UtJ"

Suaiol_ ........

\a

Squ.. ...

AbecUt..U., ~.nonti

a/r

lMioll

UUPk.t1i1c.~--~..... ~

~.............

i~

To creaie a summalion sign. prcss $. MalhCAD shows a large


sigma. wilh a placeholdet bc:ncalh it for !he range variable and a
placeholdcr on !he right for !he citprcssion lO be summed (Figw-e
1). To sec ic rcsult o( such suso, prcss !he cquals sign.

i :s
1

E-~

L :a
L~-~

a>r

Gloll~.....

r---~

a<r

l.oulhan

a [Utll r

Glollar lhan ot equll lo

&.tvadi:>n

Y ou can use a summaon anywhac you can use any othu


citpression, including defulitiORS and calculation cquauoos of ali
types. To calcuialC a multiple summaon. use Lwo range
variables. u shown al !he boUom o Figw-e 2.

l : .. Z9

' : l . . &I

, ,. '+;]

L:llll

lt

'

o. S.1911 -ll

L ,.-Q.m

L: ,
L:.

(l

:o~
... ,'
l

u
'

l1I

'

ta

t.U5' 11

1JL...llU , .........u
1

L ...

a [Ut)( r

~-:

..,

a [ut. r

Rllllionll ~

1,y..z

a,1:

Rqe

r-~

LI

lk-- : !

dl!

. ,;J

~
.
... .......... ~. . . . . ___..,......

..........

a u..:.o

.:

*2'

"<$1

J,lathCAD al.Jo lnclll<ks"" optral<X for summing w crors


wltoMI an Utda. To...,. tlot W!Ctl>I' sum optrOJor, P"' tite
cursor on
u:prtssioll and typt [lit)$ (ltold dowll
tlot (lit] k.Lyandprt~ 1/ot4 teyai w top o{thL
u yboard). MOJhCAf> shows a smaJILr siglrlil infrorll ofthe

a"''""

~-~

l.ou lhan O( tqUll lo


Nol oqullllo

...!!:2

Figuro t : Summalion eymbol wilh two p&aceholdore

J&cral.Cd products are similar. To cmilC a product sign, prcss t.


MalhCAD shows a large En!U a range variable and an
cxprcssion ol which to lllkc the producL This iieraud product
operator lak.cs !he product o !he expression ovcr all valucs ot

n.

lhc range variable.


ShoncuL lf-you don't want ui take the time ui "ful in tlrl:
b/anls." you can typt w lttrtJltd sum and prO<<Cl
operators as follows: typt 1$& to set IM sumo{ x owr i
and il:s 10 set tlot product ofx owr L

lc!J-..

-....-.-,.,..-----

Figure 2 shows the rcsults for sorne summal..ions and products.

Agur9 2: MlolhCAD """" ond produ<>I

a [UtJI r

l .. y

1l>e summation openua sums an cxprcssion ovcr aU values o a


range variable, much as you mighl do in a loop in a
programming language. The produe1 operator lakcs ic product
of an cxprcssion overa range.

Noglliaft

uy

1
~-~
1

~wilhlir1tbrMli

~riu..11

Surm ond producti overa range- \-

;u a: . xe _, . ""'" m

exprtssio11. Use tlrl: w:ctor sum ~razar kl suma w:ctor


exprtssion. Ust tlot ueraied sum optrall>I' ro swn an
exprtsslon oW!r a rangt variablL.

.... ..

'

....

;;~~

..(._ .:~ . . ' '. ,,. '--J


Oup<cr 12

:~,~
11

rlvatlvest i"-'11-f': ..,),,,~'~ 'h;:"j.I~:

..i~-;~I~ .~

'

1111\.lmf\Q

:alhCAD evaluatcs dcriYlltivcs numerically, retuming 111


tinmrt o( 1hc dr.riv1livc ol an exprt'~1..'ion ac 1 point.

: J

:u

...... u ...

'cratlC a dcriV11tive in MalhCAD, pr= the qucstion mori:. key


). MathCAO shows a deri ntivc. wilh placeholtlen Cor the
prcssion IO be differcntialcd and the diffcrentiation variablo
'igurc )),

1t

Sl. IU

!
o(aJ 1 111

-~

~:J! 3
~JI .

(liN:9 . . . . . . . . . . . . . - t

..,....... ,..u .. l - .. )

ICecp in mind that thc rcstdt of difcrcntiating is nota Cunction,


but a single numbcr. lhc compultd derivativo at thc indicaled
n.lue of thc: differcntiaon variable.
Sorne notes about differcntiation In MathCAD:
The cxprcssion IO be differcntiau.I can be cither real or

complell.

guro 3: Maf!CAO ollowl a dorlwdve with pl-*">IOon,

!.thCAD differcntiatcs numerically, retuming 111


fll)fOmation IO the dcrivative al a panicular poinL You must
ntcr a variable namc (the difftr~f!liatio11 variab/~) in the
tlcnominaior" of lhc dcrivarive andan exprcssion to be
iffcrentialCd to thc rig!ll ol lhc derivativc symbol. Thc
ilcrcntialion variable mll3l be tlefincd. M.thCAD evalua:s thc
crivative ol lhc expression thc dcfined value ol thc
1ilercntiation variable.
'ig...: 4 shows cumples ol diffcrcn.ttion in MalhCAD.

Thc diffcrcntiation vmiable must be a singlo variable namo.


Ahhough diffcrmtiation rewms just onc numbcr, you can
define one function as thc: dcriV11livc oC ll!Olher. fol'

cumple:
: -

i t~~~

!'I

"
. ~~ .~

,.

g(z)

dz

Hvaluatingft.rJ wiU rctum lhc numcrically compultd


dctivativc of t(.r) at .r.
h

Changing the tolerance for derlvatives


MathCAD uses lhc huilt-in variable TOf. to de1Crtninc how IO
compute iis dcrivativcs. MathCAO's numcrical diffcrcntialion
algorithm makcs successive approx.imaons IO thc: valuc ol thc
derivative, stopping whcn lhc approllimations d<ffcr by len !han

:3

lri;;-....--::3

IC.J:I

:11!.:...- ::8

' - 111

H9-==3

~[!~

d
f(z)

~--1!1

Flgt.n 4: Examples ol MalhCAO dllenlntllllon

~1i

IE~-'3

o(a> 11

- 1121. a

-... ., ..
.- ....

..

o(ll :oJ.l

Aut-1 ,...,b

..

t :

u-3

u~~!~

Jll
llf'.Afl- :-ctt

ud!1::x
ll~~!:-.:11
il l

Opa"'"

TOI.. l'lgu,., $ shows how lo change TOI. to lmprovo thc


accurncy with which derivativcs 8IC calculated. (For more
lnformntion on MathCAD's diffcrcnaon mclhod, sce
AppendiA E. "Numerical Methods.")

mm w oncnc ntr rownct


(.....,... r--.t.W

tOL l.Ml

t..._ U "'ll pi . . .>


... w.ut.1 .....

lnte!lralii

'4

MathCAD can show and calculatc dcfinitc intcgnb. To ~te


an intcgn.I slgn, press tho 1111pc:nand key ('). MathCAD shoW1
an Integral wilh placcholdcrs (Figure 6) .

Wfi1l

rntWhtl
a : I

1:. .

...

1
- 4 . . . - l

tOL:.~

..

-~

tOL : . l

..

- 4.

~ 5: El!ecl ol totennoe on d91lw.M oolculallor9

lC MathCAD's approximations to a dcrivative Cail to convcrc to


an answcr, MalhCAD marb thc dcriV11tive with lhc mcss1ge DOt

coavr&ln1. This indicaies that MathCAD's cstima!CS oC thc:


dcrivative ncvcr agrcc withln TOI.. You aec this messagc. Cor
cxamplc. iC thc: Cunction has no derivativo ll thc indicatcd polnt,
lf thc: function fluctualCS rapidly ncar lhc indicatal point, or iC
TOI. is so small that roundolf erron make it impossible to
compute !he dcrivative IO thc: mquired accwacy.

Flgut'l t :

MdlCAO-., lntogrlll wtltl ~

To complete lhc inlegral. you must cntcr the ex~ to be


lntegratcd, thc limil3 o( intcgration. and the variable oC
lntegration, as Collows:

Hntcr ~Cor lhc limil3 ol intcgration at the llllJ ax><


thc boUom ol thc: lnll:gn.I sigo. Thcsc lim iis define thc
bcginning ni md ol the inlttY1.I ovcr which to intcgrate.

Hntcr an clpcssOO to be integratcd (lhc lnltgrcwi) af\cr 11


Integral slgn. bcorc the di.
l!n!CI' a -*>le name aller lhc d (thc: l111tgratl"g varlohl. :
MathCAD wUJ ln.,g<alll wilh respecl to thb variable.

MathCAD CYalallcs lhc inscgral and displays thc: lllUWCf (Fg>1

7).

----- _._._

-- ---

'j~~Yt1~77--r-j, _ rx::;.
. . ":'':"'"~~~.
"'"'-1~'.;::T'.~. . .: .'iJ~~~EI~;s~:zc~=;:~~-~:;l~I~~(:'T:.~":.~ ,-~ ~.

l!jt@b+IK+ j '!!' &f'' : l'J'i' ' "' !/./J

-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Cb~~-""'~12

1
.
Jt ......, .. Lita

Also, because MathC,l.D' s IJ<trotlon

'"'

..

_,Jrod dM<ks tlw

lCq>I

r.v lho inlcr>&ll lriAble, ali veriabJoa la lho

_(

111. Llli

f.. ""L~

'',. a
1

~-- :i.

d:.
-:-6

""L~

Agin 1: Eft-

E=~

1
E- -:i
1

.. ""Lf-ua

r:a
~-.:a

"'-
J
I

t:- ~

1
E=:e
[::!-:

""'

l1nCI' W
llC llC IOl.DOIQ'
,
_ ,_,..,
.. - u ...,.., ,,....,

blltantint v.n.i. DIWl bo a linlo varlablo namo.

MalhCAD uses lhc buill-in variable TOl io delCllnine how


ICCUla~ly IO compwe its in~grals. MathCAO's numcricaJ
inleration aJgorithm makcs successivc cstima1e of thc value o(
lhc in~raJ and retums a vaJue whcn lhe two m"1 rcccll!
catima~s differ by lcu !han TOL. Fi~ 8 show how chaning
TOL aecu lhc ICCW'ley ol ioieraJ calculations.

iCrand mua bo dcflltd.


ie

;;J

E:~~

lkJICI .ooui in~vaiioa ll M.lihCAD;

1C limits ol in~paliaa mUSI bo lul. Tho oiprcuioo 10 bo

:;;;a

C'~

Changing the tolerance for inte:rals

ienlrd cai be cidicr lul ar canplu.

;;::,
.::l.

- , J;;J

each subin1erval separtUely.

n (Fa 1 complcac dea:riptiaa o( lhil al&orilhm, sco


dix E. "Nwnerical Mclhods. ")

'" -

tlw ~1111Jr o/tM lnttrval. To llWlld tliis probl<,,., dlvttk tlw

:AD usci lhe numcricaJ algorhm Qllcd Simpson's rule IO


linwe lhe in~raJ ol an e.tprr.uion O\!Ct an iniavaJ o( lul

r . :'.. l

INuvaJ lnto 1""' 11Mw111Mbit1Urvals oNi w11r1Ue ~'

7: MolhCAO ..,._.. and~1 ......._ ol llle do. .

..

INuvaJ lnto
std>/n1trvals and IMll SUCC<U/w/y
doubl<s 1/u ~r o/poln1s, 11 can r<turn lnco""'
- r sfor pulodlc/11J1ctlo~ wll a period of Jrt' times

.., r

n''""'IJ.

Wontln1. LJJ.1 u// nwrwrlcul


MmhCM>' 1
lt11<1rtlon al1or/thrn can IH "fool<' by an lllb<ht1v<d
l11111rund. lf tlu v.prtsslun 10 IH lnltgruttd htu
sln1lliarltlt1, dlscontlnllitl<s. or larg< and rapld
/IMCl"'111o~. MuthCW' 1 solMJlon ""'Y IH lnuccurutt.

o1-.._ on n1ogro1 oo1ou1a11ono

~'l

Op.awn

U Ma1hCAIY1a111M11Ahna1ion11n an ntcc:ral (,.il lo cmvcre IO


lll amwa, Ma1hCAO morks lhc lnu:gDI wl011ho nics.ugc not
contrln~. Tiiia error c1u1 be couscd by ui func1ion thal tw
ainularitics or "spilr.es" in llie inletVal or by an cxucniely lu1
intcrval (or cumple, from O io-).

..

.....

lhe cunor on lhc placchoidcr for lhc intcgrnnd, lypc' aga in. Fi U
In lho inlGgnrwl. tho limiu. ami llWJ inur alin var iahlc lt w <'Ad1

U1ar1 oll. Wh<n you chang< th< toltrane< In o"'"'"'"'


U<p /n llnd th< traikaf! b<fWttll accwracy and
compWaJion time. lf)"'Ju <kcr<a.Jt (llghltn) thL toltrane<,
MathCM> wll/ aJltmpl to compul< an in1<1ral more
1JCcuraldy. bw 11wlll1..U lo1<r. l/ you lncreast (locun)
IN toltranet, MatlrCAD w/U complllt mort quid/y, bw tlw
answers will be kss accurate.

Contour integrals and double integrals

--

.. .

c-t.r el - - tJ l.rt ...I ..._IW .. :


(

.. (

......

............u.

(. ("

f""Of'O'"tl-..1 ..

aclOr. Figure 9 shows an ClUUllplc.

111

&h. 1 : ~.- -

tlt...DI ,,... U. wtrtL

-- :. 1: 1: '"' .. ICtr ; . -

You can use MlllhCAD IO do cooiplex comous integrals. You


mus! fim parameierii.c thc conious, then in~graie ovu !he
paramc1u. lf 1he paramew ia llOI are lcngth, you mus1 also
include thc dcrivativc o lhc paramelOriz.atioo u a corrcction

J' 1 "> ....

'

tr L1S

- J'.. "> ....

,ct.I' :. - l

- - Llll

~1.m

Figuro 10: Ooubl9 ln!Og'alo

Warninr. Doub/e uegra laU wwch longtr lb con...,rg< to


an IJllJW<r tiran slngk lnlegra. Wlurt po1Sibl<. llJ< a

Ctwl.DI Oll<IOlll 1"11'.1;1Af.

tquivalt nt single Integral In plae< o{ a Mwbl< JtJtgral.

ll(l) : J oa.(l)

f(U ; l tMU

""M
SU

NOl lf IJIUJ:IAJI

llllU 1 .,CU

1
f(a) : -

Ittll(O)~..

.CU 4t l . tUt

F1guro O: How lo do oomplo1 ooolow lnlegtlll In Maf>CAD

You can also UIO MalhCAD IO COlllJlUIC doubla ... mwtiplo

lnlcgru.. To ICI upa doublc lnieraJ.jusl typo M '; lllCB, willl

~:------------------------

lll!I...........................................

uural. Fiw., 10 shows an e>AJnile.

IOI._, INf runt.I

filWJU~~.~lf#~G:,S~U~tJ.ftili!1.,,11111......._~~0$4U~~Jllt!).....~,~F~l 'l!l~f O.!lM~a1111cs


..a...:m~.4~t.tA4
..~P~1f!~4~1~s;,e81!1tt~l'1911A~."lt4t x._~.
.,,~.~~,....,.-~,,...~;.........

..........

l l.I

...............

~i

~-~:-~::.~~::~~~.,~rr~:.~~)~~;r~~~~~~rrr~~::~,.~J::~~r~~:~'~;~?~':"'.:1:~:~~:1:::.:t~:.:1
Chapur 12

1 .. .

: ~11~-~~

'"j"'1 :a
f~ ....11.
e:
! ill!.l- :=
~:::1

r~-~-

:!11

Built-in Functions

-::ii

-=ii

l!

P,

:~~~

iJ.!~
, ,

......

'~1i~

This chapler lists and dcscn'bes MathCAD'1 bullt-in functiona.


MathCAD's built-in functionJ pcrform a widc vaiety o(
c:omputAtional wts. including statisticAI ~ysis, Fourier
transforms. and intcrpolation.
This chapler containa tbe followin& 9CC!ioos:
Lht ot ballt-ln l'anctfom
Complete lbt ol bullt ln l'unctlon.

~ .:i.-:a

StalhUcal runctlou
Builtin functionl for statlstla lnd cor.!lationJ

llii T- :8

lnltrpolalkm ructlOftl
Uneat 01111 cublc s.Jlno ln~t>Olatlon l'uncllutu

,~ .... -

Falt Fourltr tranafonna


OIJCtetc complex fast Pourier transforma wlth /fl and "'lated
runctions

11

T1i

il

,J!I~

,J!.
11'
~

... ~i

Tlr

.:.:J

l ~-:-- ll

'1~!4a
t~d~
i_I

ltandoal nambcn

Oenenuing ran<lom oombcn wlth MalhCAD'a rltd C\mction


TM ntU runcdoa
Using thc JWiJ function to halt liention

Condllkmals
Using tho /ffunction In cmditional cqtations
Bmel l'anctlt1111
Usina MathCAD'a Beacl functionl

i,~',..

- f ----rr::

.tiM~i~(~:.r;~T:;: ~.J~o'.;::,7.Z,:~1::'. " 1~:::>< J


~

~~~~~~~~~~~~~~~~~~~~c_l_"'~'"~IJ
t ufbulltoln funttlons

'

Hyperbolic functlons
OQi

aoctioo U.ts all o MalbCAD'1 buill-in !unctioos.


cqucni se<:tiool expwn how IO wo aomc o Ll!C&C funcona,
din funcliona OI 1wistic1, lniapolation, and Fouricr

''""

H)1)0bOiC .....

OOlll(J)

~CIJliO..

lonli(il

Hypoibolic lanQlnl.

Mih(1)

'WHh)'l*IMiic1tiine

aiu.u type lhc nan>ea ol buiil-ln funcliona euclly u aho""11


: uppcrcuc, lowcn:ue, ar aiiud, u indicaled.

acco/l(r)

llWiM hypolbolic ocoono.

il lill

allrlll(rl

;r; and

y lqllaclll real capreuionl

Loe and exponentlal runctlons

1 rqircaa>IS a compla Glprcuioo

~J, 112, and .U rcnaoa1 inlqco ar uprusionl rcwmla


., iniccr
V, >a,

liWiM" h)l*bol!C ~

VJ, and VI ~prcscnl WCklrupreuionl

11 rcprcscnts a lllllJU capcuioo

a variable namo
ftlMIM rqircsenu a vwiablc namc Iba! ia lhc AIDO a
fllenamc or ia moci.M.cd wilb a filcolmo

up(r)

railecllo lho powtl L

lr(r)

Nmurll iogortlvn.

a- 10 iogalihrri:

lcQlzl
~I

runctlons

Far 1110R irOllllltion on lhc$e functions, sec lile ,..;tion on


"Bcucl functiont, ai lhc cnd o( lhis chaplel.

:onometric functiOlll

.IO(s)

a.-1k.nconJg(I.1rN1.

:umenu ar ruuJu are in radiatw.

J1ij

z)

SiO:

1*111 iunaion J1 (1). 1 rNI.


l*lel lliiQlQn J0 (x). 1 r..i. npooilNt irge<.

(1)

CalilL

y~

a.ilei 11.rldicxi yo(il~,i pc)oliiW:

:11

T~

Y1r

a.-1 kwiaion Y1(1). 1 pooilNt.

lr(n,a)

a.-1 k.ndion yn(1).1pao&r.., n~ " "

l(r)

r<rl
jlo(&,yl

"--

~--lni!WilllQllt.

Complex number functiona

Ar.;.{ill'ldinl ~--~!he~ (1,)l1l

lhe 11pllno.~1llUllbeNIL Raunta


.-..i...--l!lld2a.

lrg(I)

fiNpw1ol L
lmlginary l*I ol L

AIQ<m1Rolz:lhevWlol8whon1io~..

... . . . _ , , . . . . . . . .

......:~~:, ? ....: ;'.J 1 :: ..:,r'L ":: \ :.'. .: . i: ...... :. ";,

~ :s

File access unctions

Fourler transform

for moro inlorrruati,>11 on thcso fuoctiona. JCC Cha(ltct l.S, ..Data


file>."

For more infonna1ioo on lhete Cunctioru. sec lhe soction on


..1:ouk.1 tnnaluun Cu1K.:1ion1 ... l.1u.1 in th i1 chapt('t. All Fomiu
tnulsfonn fww:t.iocis and lheit invc.nc.s lak.e vccior acgw1\enlJ and

'pe ld+jl

--~ :::9u--"-'_~~~w_~_u_rn_~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-

E" - =9

=s

~-~

1
~-:~
1
~-:e

~-1
:a
~-:s

E:=! :8

d:a
1

~-=-

1
~: -:8
.1
g;- :a

READ(tuonamol

Slvlo vlluo road l'om il111 lilo.

WRITE(fllonamo}

SiiQlo vllklo lo_,. lo illla filo.

REAOPRN(lllentmo)

MllM road ~om !lllUciu'ed dolo lilo.

WRlEPRN(ftlonomol

M.uil lo ...

111()

Fost Fcx.ri tr>nslorm ol reol dala vodot v. The


oi1111ll* ('4

r~.,

-.1o 111Uurod dala filo.

.a.""'"'' W. Vn'll MI \,. 1 P'"*"" of 2.

~HlillllU1lu10l~l P'-.llk1Nl\il'O/t. TI1 f'A.lltlL.I ~


ol ~ 1 In v9(:tot vmuta t>. one mcwt tl.lt'l a
powtf ol 2.

APPENOPRN(IUenamot Malrlx lo~ lo :uctUllld dala flle.

cll~v)

fuiToun tranalOfm of cool*a d.1u ve<Jot v.


The numbel of .a.tni1 '" WICtOf v mUll be a
powor ol 2.

Interpolation unctions

lolf1(v)

lnvse lranslo<m oorr~ lo di. Tht rurbof


ol ~ fl vtd~ v mV&I b. pow ol 2.

Fot more inform<ion on tllCSC unctions,""" lhc scction on


"lntcrp0lation funclions: lalcr in lllU chaplel. Foc all
intcrp0lation functions, lhe elcmcnu ol vx mlSI be in ucendin

ordcr.

ni.rp(v1,vy,J)

Uno"1y ncerpoii!Oi:l valJo 1 t..sod on dola


Wdol1 l'X ni vy. Roluml. salar.

C.plinl(v1,vyt

Cotlicior.11 ol spino wih o.bC" ll"!dl basad on dala


-1crl l'X and vy. Rw-r. a YOdor.

laplfno(Vl,vy)

Cotlicionll.ol

spliW!th liilNt Wids bas<ld on da

-1crll'Xwld vy. Rw-r.avoaor.

p1pUne(vx,vy)

Cotlicients ol '!'inO wih paraboic oidl basOd on


da ""'1o<s vx and vy. Roturna a \/Odor.

Wllp(vl,vx,vy,xt

lnlO<pol.alod vilut .i 1 based on Cibc sp1;,,. a.rw


wilh coellicir!ls vs uld dala Wdoll l'X and vy.
RU.rns a acaia',

~JI. .. .

. ..

retum VCCIOI' !'CllUllJ.

Ai'~trW<iu........--- ;;'Y;..;;'" ,.i;;.-;.i"' ,.,. f;i.

~3

11',...,ltboewNl-11anda.

-m

:< . 1.'.

~ 1 i(f;.:;' 'ttt:"i'si*ebt..!'ajriof";11/t, 1 te1:b,,tu NiriM'tddiwMMMIUMt!il ., k

C..:

,.,,. rq>ruct1ts

.r:.'.'. ~: :::: "~. -::. ~.:

Vector functlons
For more infonnation on lhesc Cunctions. scc Chapitt 1O,
"'VCCIOn and Malriccs."

u"

veelot v.

lenglll(vl

tunbot al ......

las~v)

lndu al \&SI OIOmon nYodct v.

mu(v)

l.laxlmum elomtlll in vtdot v. (F ~x -1or,


Nh.ms l!llJlim...n r..i pa11pi.ro11rn.. !T\llimml
knaQinar pMI.)

min(Y)

u inim'"" t1omtnt r; vodot . t"" comlo """"'


181..-ns l!\IJl im...n r..i pat1 plus ; lirN>s mininun
inoilary P'fl.I

Functions for population statistics


For more infonnation on lhesc functioos, seo "SiatUtical
functiont, la1et in lhis chapl.er.
ll'Mn(YI

lilNfl"' """'*'" ol do! -

llldn()

v.
S..00...d d4M>loon o4 d.a Ylot v.

'ffllY)

vMianoo ol illlavodot "

[~.. ,..; .': , ,,,~ .:~.:::~;}f ~:: :: (;":; :~ ~r '~: :'t:t~ ;L~:~:::;::'?i.~.;,f;.::;y;;~:,:Krt:t!~:~:Y:v~~
m

Ch.tptcr 13

Linear regres.~lon runctlons

Matrix functlons

For mon: inonnation on thcsc unctions. 90C "SiatisticAI


lunction<." latcr in thiJ chapttr.

For more lnformation on lhcoc Cunctioru, seo Chapa 10,


"VOCKJl'1 and Matrices."

lf: ~

~- !3

Corre!olm (Peooo's r) ol dal1 -on vr llld I')'.

rowl(M)

Number ol rows In malrix Al.

llopl(YJ,Y'f)

sq,. ol r191->fl lne lor dll Y'ldon vr llld I')'.

coto(M)

Number ol oolumnt In matrtx Al.

;.,c09~n.ry)

..... ~ ol reo-i<>n lnt lor d.111 - .. id

ldenUly(n)

Jdentjy mllltlx ot 1la n. Aaturnt

~M)

trae. ol M: ...,, ol lhe dla<onal ........ AllllUll

-rix.

be. squart matr11.

Olhu slalistical functions

li(11.i2j_ _ _ _ _ Kronodu1i's a.Aa!Uiidkin-:-Rliuns 1 r lx2.

For mon: inonnation on thcse functions, JCC "Siatistical


fuoctions." lattr in thiJ chaptcz.

l(n1,n2,n3)

riz

Eull<' gamna lndian.

trl\1)

t1tlr lndicn.

cnorm(1)

Cunulativ normal distrb.Alcn.

hlot(lnllrYtla, dlll)

tislognwn ot dala vldor da! using nl!Vals


MS1red ( In i1WrVals.

othorwiMO.

tugmon~Ml,M2)

'""""al,.......

Compleltly anlisymmtlric
3. "' n2.
a1d n3 musl be intogers betwwft Oand 2 (or
botftI ORIGIN and OR/GW.2.1 ORIGIN" O).
AtsulisOW"'Ytwoartlhe....._ 1 lorevon
pemnAaliont, 1 lor odd penn'*'-.
Now matrix madi by putting Al I 1111 1.12 lide by
lide. Al 1a1d 1.12 must haw...,. IU!lber of,,,,...

Soc Chopttr 14, "Solvlng Eq11ations," for lnlllruCliniu on how lo


l13C thcsc functioos.
roo~11pr,v1r)

Vu ot ""'where l>f i1 O.

Flnd(v111,var2_.)

v.w.. lhot "'*'" OOMlrinll in ... llM. R.Unt

Mnorijv111,vor2~~

fl

vrllin-t.Olriiiiki.Ttl.rlon IOl"'"*.iiiit in lulvo


..... n.t1wne .,.., lf lhre - -

gtlfT\'lt,
Y9dl: ti ll*t l f l nMJre 11..n u1.y#11Mlt. lA

mi'( or l1\ll'f not be en ldlUll mloOoum.

~=-3
l!:- -~ol
1 e,~

E"_..

.1
~-~
11

~,::

:~

~~1:

. ,.;-.;/i,~'t:
..... ir.'
'''~" "'"'ff,f~;~r~--i:.w "'.r." '. , :r' '-""""''~, , .-.,,,, ...,. '' :,, ...
,
,..-::1> ~r11.r .s"~::: ~, "C;1.-:."1r 1 ..~"1)...l~('~l!. ;.:...$1.:;F'-;(' Jo ..'~}i!\ .,{? 1 -- ~ ...f.~.. 1~

t'x-,11_ .Y.. i"fv:. .1 1.-1

.;, ....: ,;,;L-\ ~

1 .. .. ; ' .;.:

!~=-

151

Miscellaneous

Statlslicnl funcliuns

ftoor()

Groltffl lntogor s ( ,...

col~)

loat intO<, 21 ( rul].

md{)

f\andorn ronber bt!wMn Oa1d 1. for more


tnformlllon, - flo Mdbn on 'Rlndom ruri>tn,
lator In thll chlpi..

ll(corid.ii.rl) - - ---1.ffc:Md.o,OiliWll011.Formor11ll0illion.
-

the Mdlon on 'Condltbnlls,' lllor In lhll

dll!>C
4>(1)

~ tlep IUllCiioii:TI X'&......0.

mod(11,i2j-- ----l'li\Midor on dMIOg 11 by x2. Aeeul hM elgn ull.

undl(x1 ,12)

Aolums x2unti 11<.0, then hllt1 llorWlon. f.or mor.


tnlormatlon, 9" ihl Mdion on '11w ltllllncllon,
latorlnlhis~.

Populatlon statlstlcs

: (1/IC)l:

nr()
Retums thc V1lrilnoe O( thc clemcnts o( v, ICCordlng to thi.

onnula:
nr()

l[l! ~
11

Wh,-n yoM MU vecrors In 11JJJl.tt/colf1U1crloftJ, bt ~ tlv


data llartl wltlt tlttMftl tao. lf J'l'M M.lt a w>ctor and
don' 1 dLjlM v0, MOJJrCI,[) wlll a111oma1tcally ttl o O.
Tltls ~wloiu data poiftl can dbtort IM va/ULs rtrurntd l1J
11alls1/calfanc1lon.s. lfyour data VtCIOr! Starl "''" .,. Stl
ORIGIN to l, iu&tscrlbtd IJt Chopttr 10, "Vtctors and
Matrlcts."

formula:

t.;

-11.

..

This sccrion dcscnllcl MAthCAD's stawtical unctiont.


MathCAD lncludes functions or population sta1istiCJ, 1U1tisticol
dislributions, corrclation and rcsr=ion, and counting data Cor a
hiJ10gram.

-D()

.~
~_JI
I la

1!_u.a li

,..,

mean{Y)
Rctums die mean c:l the ele.menes of v, ICCOnting IO thiJ

l~~

Lcl!.li

MalhCAD include3 thrce functiom or samplc stati!tics. In thc


dcscriptions bclow,N rcprcscnts !he numbcr o clements In the
spccificd vector or vectcn.

!ii

u~:.l! ~

.:- ?:;;;:'t:,: \: :::1

~~, .~r:.s:~~-:a~t~.~ t-~::~;s:r.~t-~~r <;t:;,~

Buil1-in Functiona

~~3

Equation solving functlons

1 tcal Hd 9 or .. 11gtm.tlt.Wciot' 1
morw lhln OOI orgurnrl.

-.

~- -- 3

cor~YJ,Y'f)

.,_

r;I=:;

t .;-.1:.

: (1/IC)-l:[ - -n()] 1

ltdt{)
Rtturm the IUln<lord devlatlon (suore motor thG vwtanco
ol thc clcrneni. ol ,..

tdol()

4ar(I

- - --,

.-,---...---~ ~. ,~r;;~,.Dt~~. :}\!.:_~~~~~;~~:.1: l~-~ ~:;i~~:;:Gij,-:iIT~~)~~:~):~R.~~0,:~rl;~;/r:~~:~:<\~~:;r.~~':.jt~~i~.,~~'..:1:1.;;~1l


-;J ~~:~~~~~~~;~:;:-~r'~;':::"k
~~\~\-"".t_. .t\i~l: ~~,~L~:~~"t~
:'l' .:.:l?""
"':.~'{"'t
"': ;~s':~""'
!"' .-:~":;\"~'':"':":.........~.....---- Buil~infW1<tioN

Oupl 13

trlbullon unctlona

Re1uma a 1e1lar. lho ilopc ol 11"' lou1-1quarea rc~rcuion


Une Cm lhe dala pointl in vz and vy.

hCAD lncllllb lino func:lioos for llaWlical dialributioru:


rm(l)

CwnuLtve oorma1 function: lbc up-.1 rrom - 10 z of lhe

llM\dard oormaJ dllril><ltiOll


CIAOJ:a(X)

lawupc(n.J)
llctW111 a ICllar. lhc y-inccn:cpt of lhc lcasc-squarea
iqreuioo line
lho dlll.I poinLJ in vz and vy.

roe

J~.Jii)-u:p(t2 /2)

:sl

dt

Re1wns lhe v1lue ol lho Eulu pmma CWIClion al 1. Rlc real


1, lbc val- ol lhia ~ colncido wilh lbc CoU win

lo;.

J-.Cn>

....,, H . Zf
.U-(1) 33.U,

Mri1I IM"'

a:m

P : conh,1)

r l. Wl1'1

: IOf'9(.1>

l.UDU'1

.
1

i>rTtlation runctioa.a

!MI

MalhCAD includes onc funcon, /iis1, toe computin frcqucncy


dialributiona r~ hislorama:
Wlt(biltrvab,dalll)
~ 1 -IOC repccscntin lhc C~ucnciea wilh which
valucs in lile dalo YCCIOI' fall in lhe inlUYals reprcscnced by
lho i111uvab vcc10r. Tho argumeou t111uvals and dalo am
IWO YCCIOn oc mal Dlllllbcn. Tho resultin YCCIOI' , onc
clcrtlClll lhonct lllln lho t111ervals VCCIOI'.

-~-

'

...u.ta)

111 ; . . . . . . . 1

llllwMI : 11

s,u;_: u Jtlt.. t -

--*

w.... .t.

u ....tw

" . . ...

' ' ' .,.. 1

Linear interpolation
Linear imapolaon is a melhod far using a set of dal.I poincs Jo
csmalC valucs. MalhCAD's Unurp fwlction pafomu linear

f l 1~14~
t

:,.~, r. *' : '


11

..

iruapolaon.

liDtcrp(n,YJ,s)
Uses che dala veccon vz and vy Jo compute a linearly
iruapolated y valuc corrcspooding Jo che lhud argument L
Tiie argumcnu v.r and vy must be vcccon of che same
- lwglh. 1lle vecior vz must conl&in real value.s in u::mdin

:a
k

'"

'
Flgln z: A tolalogrwn

.."'

..ta

r
..t~

""-' ..,.... - -.,.i.

11

11

1111!1
.............

onkt.
Lincat inlCt'pOlation corrcsponds JO clruwing strnighl linc.s
bclwccn che data poinl!. To find che interpola~ valuc r.an .r. MalhCAD find.s thc two p~J inu ir alls hc..&wttJ1 and
rClums che corre>-ponding y valuc on Jl1c strn1gh1 hnc
bclwocn Jlic cwo poinu. Far x valucs bcforc U\O firsl poinl in
vr, MalhCAD CJ.trapOlaleS lile suaight linc bclween llie llll
cwo poinlJ in v.r. Far .r valuc.'l hcyoo<l lhe lasl poin1 in vx,
MalhCAD c>Un1iol.o1eS lhe suuighl lii>e be1wocn ~>e WI
two poincs in vz.

Fiurc 3 shows some cxam ples o/ linear inlCJ]JOlation.

=..L=1
-e

~--c.

~-:;a

-::::J

:a

,..,..t .......

~toeT

1-;;..

e ;

~Mlw.._~

r :. ~1.e.u.._...1., ..w

=ii]i3
......

J , .....

11 :. ti

llAIUC: 1 MlllOQM

:a llM<r.D

ZZ.t:l'

.. .tMU.l 11.'32
--<MW :H.m

l
~::

Ma1hCAD IMu s~dl roUJtes IO compuie corrt/allon,


llo~. anJ tn1eretp1 by /he /eas1-squares lr>tlhod/or
COlfVJIU lllUtlbers as >WU as real numbus.

Mta
1

-. : 1 ....

1
:e
1
:~

Histoi:ram funcllon

rr(Yl,YJ)
lleturns a sca1ar. lile anc1aoo a>cCicieru (Peanon '1 r) ol

Pigwc 2 show1 how 10 use his1Dgram1 mMalhCAD.

Et~

llhCAD includes t.httc llllConl fm-carelation and linear


p-euioo. Thcac unclOlll wor\; OD YCCIOQ ol dala vz and vy. vz
d vy mw& llave lbo -bcr ol clancnll.

When you IUt wctors In lnurpolmion / &U1CI>11.J, bt sw1 tlv


dala slarts wtlh tlcmtnl uro_lf)'<>U u.u a vector vand
don' t define v0 , Ma1hCAD will auioma1icaJ/y ut o O.
This spurwus dala po'1t1 can dis1orr IM valU<s rtlurncd y
1/ie 11trpola1lonf1UOcticns. lfyour diJta vccrors narr ..;rh
v 1, sel ORIGIN"' /, astscribtd iJl Chapur 10, - vwors
and MfJlrtces.

MaJl1CAD lgnorca da1.1 poinu le.u !han che firsc valuc in


Wtrwrls oc grealet Iban che last value in tlerwrls.

e111
rr=s

f9n 1: Slati&lioll ..,_,. UMd 1ot-t911rMoion

Mall1CAD lncludea a linear i1111:rpuluiim function anJ rour


Cunctions Cor cubic spline imapolation.

1.ntervale1 S dt vlue < 1ntai:val1+1

Etr~

. z:1.1m

-1....- dt

Por complu 1, lhe valuc:a ..., lhe analytic continuaon ol


Iba real funaion. Eula'1 pnuna Cw.:lioo i1wldcfmCdCar1
ooc ncpjve m1escn.

--- ---------

Nr(&)

vzandvy.

L::1
r,-=a
--1-0

lnterpulull11n f'unc:llun1- . ~ ' .. ~ ' - ' ~1:'" ;.- ,

~0

.)

...C.J .,,
.u..1.i zauu

:~>

sawstbrreal.

f()

r .-c:ru
1

ll'1111i. rua111111111- _ , . . ,

lecwns lho value ol lbe error funclioo l l .Z:

illural:

M.llthCAD h11er1>rcu Jn1erwJ/J u et ol poln~ <lclinina: a


1ucncc ol imorvab in a hU.ulgrwn. The valuc.s in lnurvu/J
mu.'11 be in uccndiug onlcr. 1lic n:.<ull o Jltis functlon li a
vccJDC/, whcrc/ is Jl1c numbtt of d4la valucs such Jhac

Et~
1 ......

: J~;/4&)-u:p(t2 )

r~

E!

Piuro 1 show1 how tbese funclion.s arc used.

dt

s mUll be ical.

u:!(")

C!

llopc{Vl,YJ)

161

~~Wtt~"f';
~Jlllfl'\'

~:."'> ... .. . ;L

:b::.~::. :.'.."rl; ~. .z~~ ~~:ii:'"' <."

ii+

~,.

.'.';'.: /

l. L~L~'l;J:::.;t-:]

;:~:fl

ChlpCer 13

Thc following cumple shows how ~ functions wort


.. t f

..

j
1

: .

t1l.l

..

Assumc that you want ID fil a spline cune to dara points whose
it lnd y-coordinatcs are storcd in the vccron vz and vy. In this
cumple, usumc !he linear end condition: thc spline Cllt\'e
should approach a stJaight Une at thc cndpoints,

.. :. ,...l)
1

fl

r,4 11 ..... 1,
t..r-,olat.4

U9'.efop(n ... ,1.m

H...-.p<n .... 2.m

Figure 4 shows how to compute thc spUne curve Cor 11111


cumple.

""

Ll[z;;]

;~=
:5-iD

11.-..,,c .....,.,4.u . . .

... ,. '

..

... 1
-1

....
1

.,

1bic spline interpolatlon

.......,c"....... t.I>
tn.,< .........a.m

od curve are continuous. Thc curve is constru:led from a


ics of cublc cquations, cech connccllng onc polni and thc nexL

Sttond, apply thc /ltlerp functlon ID thc VI VCCIDr COOlputed


in thc lint stcp, v.r, v,, and 111 z value at which ID
lntcrpolaie. MathCAD rC(utnS thc conesponding 1 Yllue on
the spline cine.

1.m

,......,.,...__.

l*l?< ..........i ...,

r- "",,

-t.r

....
1

.i~~!i
-ll(l

&

~ 4: Splno arte lot llle polnta 1ID!9d In x end 1

I!~-~

Hcn: is a dcscription or thc steps involved in thc lbovc cumple:


Thc cquation with thc lspllM fWlCtion in this examplc compuies
thc sccond-dcrivative array v1 Cor thc spline curve ro lit thc
points dcscribcd by thc values In v.r and vy. Thc lspllM functlon
ma.l:es thc spline curve approach strnight fine at the cndpoinil.

Once the v1 array Is computcd, the /nurp funcrion computes thc


lntcrpolarcd valucs o thc curve.

Note lhat thc vs array nced to be computcd only once. cvcn Cor
mulriplc intcrpolations. Tis is thc cfficicnt way to solve thc
problcm, sincc thc spline calculationl that lcad ID vs an>
llmO<OnsUming,

:i~S.

1O;--ia
. ~D, .
l~"'-=i.
. 'l IJl
.11r

~,

_,

-:.:11

:L~:a

l Jlli,~

:;.~,f~~~ ~ :;~"~.')., ~~:~~ ~;:::./, ~ :~ ~ T-:,

-',

~-.,~ ~,t~ ~) :.','.' ~ :~ ',,'' ~-"(,1.:/;., \~/

11ii~

16

Buillin Function1

Herc is a more detailcd dcscription ol thc cubic spline !unctions:


lspllne(n:0ry)
~pUn<(n:,vy)

cspllnt(n:,vy)
Retum 1 vector of ICCO!ld-dcrivadvc coefnclenll n. (Thclo
coc!Tlclents are CU5tomarlly med In thc /11Urp flJnctlon,
desaibcd bclow .) The .-gumcnll vz and ~ must be 11:81
vcctors o thc samc lcngth. Thc valucs In v.r must be In
asccnding orda'. These thrcc funcrions ~ dilfcmit
cnd conditions for thc spline ano lhrough N+I polnts:

UIC thc /JpllM functlon ID encnte. spline ano lhll


approache.t 1 stralght Uno 11 thc cndpolnts. The /sp//M
function constnlns thc spllne curve' that 'nlf"'J and
VJ~.

I~ J . - . ~:111

l.l[z;;] IJ!:)l:a

............
.,,,_e.ne

r cfficicncy,

Flrst, UJC lhc lspUM, pspline. or apllM function on thc


dala YCCIOr1 ... and vy lO genente. VCCIDr " Thc VCCIOr VI
conrains thc Sond dcrivatives of thc liued curve at the
points in qucstion. The lhtte spline funcllons corrcspond to
tllrce di!Tcrcnt cnd conditions: the cnds of thc curve can
tppro8Ch stnight fine (lsp/111<), 1 piirabola (,pspllM), or 1
cubic curve (cspllM),

r 'fl YI

1.-.,.c: .....,... t.u 1.m

:. t . s

,;e spline lntcrpol11lon is mcthod that 1111 curve lO tct O(


ni.sin such way that thc fint and sccond dcrivativcs o thc

.. ,.............

.. :niiftU
1

..

11

lnwpolaUon

MathCAO implemcnts spline lnterpoladon u 1


Htep proccss. Thc two stcps are u Collows:

aa1c 1r1.11c 1111~1"

1 :o ....

11-..............

3: Eumploe ol -

~:ri~

1. 31:1

tt111etl,

U<W

19 ~

L I - INIDfWl!IOll

1 ,

~f:;~".l: ;' ,. :~::r~~~~~~:~M~.'.~}i~9:;'.~J'.'.X~Jt:~.~~'-'va'

UIC thc pJp/JM functlon ID gmet'llle 1 ipllnc cUrve thll


approachcs a perabola lt thc cndpoints. The pspUM
function constrains thc spline curve 111 diat Y1o'"Vla 11111
VJN"'VSN-1

Use the cspUu runctlon ID gmerMe a spllnc cune thll


can be fully cublc at thc cndpoints. The csp/JM
function constralns thc spline curve by oxtrwpolatlng
thc S valuca; v10 11 cxirapolated li-ty Crom n 1 lnll
Vs1, llld V.f( la OXtrapolaud IU.C.ly from V'J(.1 ni
VSHl'

lnterp('11,n:.YJ'.K)
This funcdon uso. thc data VClC1lln v.r and V'J lnll tho
aocond-dcrivative vcct vi to rctum thc lnterpolazcd 1
valuc corrcsponding to tho lut .rumcntz.,,, should be a
vector or cocfficicnts computcd carllcr by using lspUM,
pspllu, ar cspllu on thc WlCto!I v.r lnd vy.
Cublc spline interpolation oorresponds to drawlng a <rnoodl
curve ~tw=I thc givcn data points. Thc section orare o
thc curve be~ cach pair o points corrcsponds to a
dilfcrcnt cubic cquation. 1bc cubicares 1re computed 111
that. at cach data point, thc slopc oC lhc cubicare on one
sidc matchcs thc slopc or tho cubican: on thc othcr. The 111
vccror catrics thc lnformatlon that dctmnincs thc euct
shapc o( thc spline curvo.

two polnts lt !alls ~ lnd retunu thc comsponding 1


valuo on tho cubic an: bctwcen those two points. Mir ;r
valuca before tho Clnt polnt In v.r, MalhCAD extnpoialet
the cublc are lhlt appliel bcr:ween lhc fim two points in v.r.
For z valuca beyaid thc lasr point In v.r, MathCAD
extnpolllea tho cublc an: that applics betwem thc lut two
pointa In Vlt.

Wan111. Do,.,,,._. IM lnurp fanctio11"" ""'""' c{xfar


from 1/w{lltftt potU. Spl1u
weNkd for th ty~
fl{ cmapolallofl, Olld llw Comp!llN WJ/u,i art lll/U/7 to be
ue{MJ.

art""'

lnterpolatln& a yector ot polnts


You can - thc ~ opcrallOf ID retum a whole o(
1
lnlapolaud valta correspondlng to VCCla" o( data polnta. ni
worb wi1h both lnlerp and lllllerp.
1

Figuro S shows btnr ID pcrform this opcrllion. To lll'PlY thc \OC


operator ID thc !ancdon, put thc cunor on thc functlon 111111C
(lltl~por lwerp) and

press (UtJ- (hold down tho [lltJ u,.

ni pnm thc mimll llfp).

IDllClft.t DWDrOUll<ll

1 1
.. : 1

... .............,
:

........ u

.. ..
1

1
1
..

1 lLl
1

._ ......... ..
,_.,,
.. .

.,,
[ ...-1,.Sl
-1.ra

t-..,c ......... .,

l'lgln e: 1mt<po1o1ng -

:.!

1 : -

...... ,..,..,.
u.....,...i..
94,~el

al

-t.~

-tt.>tl

o1 pa....

To flnd thc lntcrpolatcd valuo Cor 111 .r, MllhCAD rinda tho

l 1'.\i~.~l~v.t:~~;'\ [/;~,

'.;t~/~J?~J;:[i'1.~d;~~~~!f1~1~~1&fh(U~t~l1~~;.~4~i~~~~t~fl~t~t

,,~.~.,,,".'~,,:.
' - ~';J',1 j, '00'~,~~. :;
.r,fl.~~ti:.t:~. . . :t;(Jl, 1J
'.,.~~'1i

!tV.~""'

.Ji

ifl ait-'1

. " J~.1: '1 .1ii

. ..

~~~~~~~~~~~~~~~~~~~~Oiop<:::::!'.:~13
st Fourfor transfurms
ICAD conl&ina rour f..aicw to pcrform Casi Foutlcr
.tonN (FFT1): fClf real data.J!t and ha lnvcno llfl, and Cor
>!u dala, cf!t and iu ID- llf!t. 'I"- Cuoeliou MI
~ lhc71WIY to llld lllllll'll veaon.
yorMlfl. Dl/f~al .,,,,_ -

di/!lf'flll COllllCAlloAt
>11ecnslA IM 11UdolfJ4' of IM FOllriu lrOAJ/orM 4lld

Df

~ IO colf/u1au t/w ru4'u IM VOAS/onn"' lllCTU


~onic. TN ducripdolu below apfdll MazliCAD' 1
(QJJI dqWIJOlll oftlw Fo~ VOAS/onic. U'JOu wis4 IO
Wtfc 1/teu tkJIMllolu. 6# Altcnooufonru o{1/te
wr uOASfonrc, al llw od o{ lltls wcdoA.

licJI "'" dqlM o waor v/oT llU ..W. FoMrlcr tr<lllefonnl,


' surc IO '""'"'""Y. q,,,.. ,,, ""'dqlM V. MalltCAD
""'"'lcaJ/1 uu ll to llCTO, Tls C1111 dtslrt tlw ruwlu a{
r Foivwr tr"<{onnf-1">111.

r. on real data
ICAD coolalns IWO f1lllClom - Jft aDd l/ft- Cor Wt
icr 1nlllfonna oa tal cllll:
)

l1lil Cunclioo tc1111111 k f.ut Fouri lrlDlfonn ot a W1Ctt


DI real dala rcpRICllllC me&P-1111 rcular itllaYlll
la lhc timo domaiD. n.o RllUk 11 a ._111r ol compa
coclficicau~ '41ur.a ia -~ domain.
lt v <Xllllai11111 demam, IM iauilllC vea.ar o/ coetricic:all
C IR compuleld to lllilfy Ibis formllia (wbcre I is lbo
lmqia.wy unit);
11,

(1/.,/;)

1' 91.-eap

(2&1. (j/D)ok)

ID lllla Cormllla, 11 is die aimbu ol elcmcDll ill v. 11 lllllll bG


111 inleer powcr ol l ~ T1ID - i t WICla cailllll
~' .. 1 okmc&lu.

r"' a /ast FourlcT11'0/leform o/ rtaJ dala, w second luUf o{


1/te tranJ/orM /sjJLSI lc conjugaJe o/ thcflrst. Tltls Is wlry
Ma11tCAf> dcards tite second lwV 0/1/w rwt wctor,
nturnJ111" wc1<>r only lwV as lart as 1114 "''"'"""
NCIOI', pl11o1 OM. lf you _,., IO scc IM SdCONI /uUf o{ IM
ITIJ/lefonn, uu Clfl /1Utcad o[ffL

r;;

1 .....

cl:a
c!":!l
1

~i:
l

Tbe veclllr v llWSl contain 2'"+1 clemcnu, whcie mil a


wholc numbu. Tbo RllUl1 VCC10rcontaina ,,,.i- 1dementa:
lWO lcu than IWillc 11lll&ll)'11 thc arumcnL , '
t/tal t/w

#COlld ltaJ/ o{ tlw trOAJ/onn. wltJd llOI 1lw11 as part <(


t/w lplll, /s W COllj"IOIC o{ W /lr1' /ta/f. lf t/w
dllv-dolMI dala ar eowtp/u., 4lld ilf arw ln'l'O/Jd. Uu
idf1 oslcad.

llfl(ITl(v))-v.

"=!!

[:;L.~

(This is die umc formula u thofJI Connllla, ciccpt Cor tho


minua sio in tho ap functioo.)

~~

[ Tlw mand ilfl/uttcdl>ltl an uaa 111..,.su. For o/l real v,

;-:;.[

MathCAD contains two fwiclions - cfjl and lcfft- Clf fast


Fourier uansonns on C0111plex data:

~[-3

1' "i,U>(-2Jli(j/D)k)

165
Builtin Punotion1

Ffs on complex data

fs

llld appcndin lhCln ID tho vcctoc v. Thcn MathCAD


computea a vector d whosc clcmcnt1 satisfy this formula:

:1''.W 1~11~::.( '; .,: ~;,':'.:I{IE\; ;i_~:;J.5,~(~::j .

r-rr~

Tbe arumeAI v il a YCCIOr 1imil.v to thosc gcn<r111~d by thc

cm""

r:t

_r

Jfl fwictioo. To compuie thc relUlt, MathCAD farst crea1e1 a


new >CCIOr w by taldn Lho conjugat.cJ of tho clemen11 ot v

Tl.uflutct/1)11 UCIJIU O real rulI by OSSwnllll

Thla funclioo rewnu thc invcrse Fourict transform of a


vector oI dala n:pn:senting valuca in lhe fnlqucncy domaill.
Thc icsult is a vector reprcscnting valucs in lhe lime
domain. Thc lfft fwiction is the in verse ot lhefft funclion
applicd ID real data ill thc lime domain.

(1/{;)

.-

llft(>)

41

--.:__e-

o:'. ':\ ( ...'1, .... ~.,:<' ..'f(."}'.~.. 11\".,;T/) ~;,,,. ..



~f.\l,...(l' {!;:H ~ ....:-lw'1 t!}t\~,.... ! ~' '"'~ ' 1.~ ., ni .~ ~ .i,, ,) ,~~{: , .-:. !,.....
:f"r)..,. " 1 ~"'.' ~ ~ ,"~ ' J t1 ,.N" '; : . (" ;; ,: :}" ! ,::;..:,-; f(.!.'. ~;.:' ~:. '."'f ~.

cl'.3.:a
~-

d~
L~~

cffi()

111i1 function n:IUtlll thc Cut Pourier ll&Nfonn ot a vector


or complcx data repcUcntin& ~ually spiicc.d mcasurcmcnll
in thc time domain. 'l1lc arument v must contain 2'"
clemcnts, whecc m la a wholc numbct. 'l1lc rcsult la a vector
or complcx cocfficicnts rcprescming values in thc cquency
domain. This Cunction n:tumS a vector of tho samc sizc u
lts argurncnt.
This Cunclion il identical to tho/fl Cwiction w:ept lhac
,
1l\C vector v can contain complex values.
a 'Thc n:sult vector hu tho wno numbct oC clcmcnll u
Lho argumcnt: 2'". (Compare this wilh thc/fl Cunction,
which IWll'lll 2 1+1 clcmc:nts.)

ldfl(v)

This Cwicon rrtunU thc invenc Fouriu tranSoml of a


vec1er or data n:prcscnting values in thc cquency doolain.
Thc n:sult is a vectoc n:x=ting valucs in thc time
domain. Thc tcfjl fwiction is thc invcne ol thc cfjl funclioo.
Thc argumcnt v must contain 2'" values, wbcic 111 is a wholc
numbct. Thia fwictioo n:tumS a vector oC lhe samc aizc u
i11argumcnt.

"~"::: : :

ru~ :ul ,....,_.-u~pncw

,..,
:.t 1

h ttUd
1 I tMlt_.

J " . .

...

, :. arncet

'

f"N(U .. .1

..

->

I
-4

... -..,
., ..... '"""'..

: lwth)
\ ;.

11

, . '-""' ..,.1. Nt
1 11
11.-1

1r-.-1- _,

~,:~
..

Ftglll91: UH of tul Fourier

--... .~
. . ..
,,...,.

-)

...--1n

MalhCAO

Altemate forms of the Fourier transform


Sorne appUcaons may n:quirc a &lightly differcnt vcrsion ol tlic
discrclC Fouri<r 1J1111Sfonn rrom !he onc providcd in MalhCAD.
11'1 usually Cailly casy to define a pair ol function tluU ives the
desi.tcd 1111wer in iams of !he exisng FFT CwictiooL

For cumple, lhe Collowing dcfinitions roe the disoeie Pouri


uansfonn and iu invcrse appea in Rooald 8111UWcU'1 TliL
Fourlcr TrOAJ/orm 4lld I u ApplicaWttS (McGraw HiU. 1986):

TM cm and iclft/1UU:tto.u are aac1 l11wrsu. Tlwl /s,

r(v)

(1/o)' ~

iclft(cffl(v))v.

f('t)

~ r('t)-.z>(2Jti(V/D)-1)

Figure 6 show1111 cumplo oI Fouricr lnlllSDmll in MalhCAD.

'

t(tJ ..:q>(-2iti (V/n) -1 )

ll>cscdcfinitiON diffcr from MalhCAD'1 in iwowaya:

1nsiead of a fac1er of 1/,/; in fronl or both romu. thac is a


Cactor oC l/n in front or the tranSfonn and no Cacwc in rron1
ol lhc inVCllC.
Thc minus sign appan in che cxponcnl o{ !he uansform
inaiud of in its in verse.

r..

~66

. .. .

.-~ ~ ~ . ~~ ~~~. :~r:.t<;~-t:.; 1/1'..~f;f~i ;:r ~. ::\~;.;~.~~ :~J.i~ ~1;::.,, /~-: ;.~ ;;~ ~~.:;-~':. ~]}~':,.~:.~~ l'_i'-~ :~ . 1:~
H-1\ M

01

faJA;o,;h;;'i: :~zj~ ~:/L.


i{

'b

1.,. ....

'> fr '<;'L' '. 'I?i1~~;~t::.::r:;; i8J


!

Ch~ ~... 13

ro implcm<nt these deflnitioru in MathCAD, define two new


functioru u follows:

J.xftt () : (.;;) etft ()

l'~:o!i li!l!.8.!!11

eroo u.c 1/fl and fft in place oCJ!I and l/fl, MalhCAD relllml
ru1"tn thal fl131Ch BrlCCWCll 's formulas.

t : 1 .. m
I

"""',.. ...... ... .


rt.Of lilJ90I Nlt'M

t"(t , ,

r,

l..

:I!-- - ~

......

... ,,t,, .. ..
'l't. ":'t .. ,. t.

t1

t.

"

1 >

,ot,

mm

11

Each time you rccalcullllC an equation wilh the ntd function,


MathCAD generares ncw random numbcn. To fon:e MathCAD
IO gcrerate new random numbcn. move !he cunar inio the
equation with !he,,,, function and press !he calckey, [ri ].

J!un1

l~- :8.
.

11['

MathCAD generales ncw random numbcn bA3Cd on tJw toed.


The samc sco.1 will always gencrate tho wno random numb<n;
diffcrent sc<ds will scncrate diCforenl seu of random numben.

lf :' !- ;:9

[&ao) randomiH [.J)

MathCAD promptS you for a St:Cd valuc. Pre.u [..J] to acccpt tho
cu=nt St:Cd. Then put !he cursor in thc equation with thc rnd
function and press [r9). Since the randomlzer ~ bcen resel,
MathCAD generates !he samc randorn num ben it generares
whcn you nntsW1 MalhCAD.

, - --o:;.,

; - : "

"

~.

,,

\ll "::8

u-

Jl

MalhCAD' rwtl runctlon allow1you10 hallan itcrallve proccs


b&scd on a ccndition.
The synWt ror !he rwtl function In si ~on iJ as followr.

until(lbq>r1,&xpr2)
Hcte E:rprl 11 die teSt expn:ssion: MllhCAD halts any lteratloo
In the equation when it bccOmes negativc. Expr2 iJ the value
n>lumcd Cor C*:h lteration until Expr 1 caoes it to hall tho
hcratlon.

ibo IUllll functlon has no effoct on a tcaU< equatlon. On IR


equatlon wlth a nncc variable, MalhCAD wlll lteratc thc
cquation u mua! until the fint time Expr1 ~ums a ncgatl ve
ntue. Al that point. all lterallon 11 haltcd ror the cquation in

d!
J __._

(~_..-

:=j_
1

1__,.

lt:~,- ~:%1

"""""'"""'""''*........
U~'"'..
**:: a
..
. ..'.. . . .
, ; ~' ( , .: .:,.;.\ (, J~

how lO U9C thc rutd/ function IO test IR itet11tive yoceu or


convucnce. Thc itention in thc equation Cor :r rontinucs ll!1
.ri 11 within mor a. Figure 8 .00 shows how to ""'tho last
function to dclect whcn iiention hu halted and to compute ti
sl1.e o( lhc resulting 1rr&y.

Jlll

Thc randomlu command !ICts !he "9CI value" for MathCAO's


random-numbcr gencmtor. Each time you rc.11:1 !he !ICW,

To tt:set MathCAO's random numbcn, type:

The rwtl Cmction iJ mcCul In itcralive processcs with a


specilied caivaence condition. For cumple, Figure 8 s!IO'li

Wont111i.De1 llOI ue rite nntilfiuicdot1111 equottotu wltll


rnorc titan onc ronre -1oble <for v:amp/e, ,,.,.Jdp/e
,nunmatlons). MculrCW will hall oll lltrn1lot1 on ali NJll~
""4blt1 tllt flnt tne tJtat tltt Jlrn ar1ume111 o{until Lr
MfOllvt. TlrJs does llCll iuuolty produce rltL dulTed ruwlt.
For on oltmiatiw irtetliod, Stt rite nat -D.C/11,
"CotullllonoLr.

-;:

1 IL---:!J.

Figure 7: Random ...,,boro

The until function

qucstion.

:!-'::11

.Ir! . .

' fEW

(.J)

This rcscts the random numbcn wlth a diffcrett seed. 1bla


cau"" M11hCAD to scncnte a dlff"1'nt sel or random numben
from what you ICO when you IWt MathCAD. l!ach lime you
want to resct MilthCAD ID genentc thll new set o{ random
numbcn agaln, u"' !he randomlze 10 command allln. To tcie a
diffcrenl set or randorn numbcft, U9C !he randomlu commlnd
with a diffcrcnl numeric argumenL

~-~

:Ir"~
~, ; ' .
)19 ..,/ '" : l.

1 1
1

[uol randaal.H 10

: ~:~

lllif9(ll

1 ....(U

'I .., ,,p,


.11""" 11"'1 ;: ..
1
. ,"~.'~:~~1~:
,-r,J i1<1l7

To - a ncw ICl of random numbcn. use !he nndomhe


command with a numeric argumcnL For cumple:

~ - ~

:-:

lfyo ,...,,.to cltLck o IUI CO.rt I~ times wttli IM rarulnm numbers, KSt rltL randomlze '"""""to nnr 1/w
raruJnmJur ~twttn colcidalions.

.~J .~

Thc function rnd{:r) calculates a random number bctwccn Oand


:r. Figure 7 shows an cxamplc of random r.umbcrs in MathCAD.

xltt () : 11/.fr;) l..cfft ()

~1::9
~~~

''" .; . , , .... , :. ,

RIUldomnumbers-

6 ;

Built in functiona

.:-~

~P

;t.-V/;; , .

:~

,' ,

, ,.

o ,

- - - .......
......,

Condilionals
llonlo-'11--" u.&wr rl a.

_ 1 1. . . .

........
. ~ . ---. j
,.,_-_, '"-. I-. , -.
,. 111

1 ,. 1 ...

;.pm

.... :&a

= ..
..t,....u.a..._,

.....

.., :

_ . 11.u

11"'9 I : UM>g

" unOl-IDhellM ........

MalhCAD tw no logical <:entrol slnJCIW'CI Cor branching oc


looping. But by using MadlCAD's iffunction and rclational
opua1D11, you can 1cst a condition and changc thc behavior oan
CJLprusion bascd on lhatcondilion.

Hcic is a shon descripon or tllo VCunclion:

hii
'

Wlie11 IMftrSJ art1U1Vlll o/an 'i!ls/al.st.MaJhCAD dlHs MI

eval""" Ie secoNl OTlllml!nl. Wlie11 Ie ftrsl OTllU1Vlll Is


lrue, MaJhCAD dlHs 1'01 eval""" IM 1hird argllml!nl.
Ma1hCAD dou

''"'"""'

""'de"" e"" U. IM NMWJ1ua1td

--lcll ......

Figure 9 shows sovcral ciqllllioal lllin toodilional-type


conJIIllCtiona.

Thc coiuJi1to11 arumcnt oC thc ({fuoction oCwa involvca one o


lho Collowin rclationaJ operalDn:
~loo

...... ..,...

11-e2

l lAl"I-

11>12.

eC>-2

1142

l:i.2

l lAJ.t.J)

tlS.OZ

el lAJ.t.ll 2

""""'*

Ae!alioool oquala ( 1 ile"PfffCionl


oquol. OlhorwlM O).

1
ftd I

.........

;!han.

< 2
2

G...., Ullf\ OI tquol lo. (fo lypo


11\topMOI, t>oid clown (Alt.J key
end xow tht Okey 11 lho tap ol
lho krbolrd.)
Lfti1hen01oqual10. (To1ypo dil

ape<llOI, hold clown (Al t. I ket

el (Ut.)f 2

Nill oquo110:-(to 1ypo lho opal,


hald down (Alti key and "'. .
11113key11 lhttap ol lht -

krbolrd.)

,...., ..., . .. 1

n:lS2J

...

,<a1 ,. mna1

>1.na1.11

,e a> r<a> .-. re.ne,

.u..-...

t<:B
...

Mal I tri l l ,((al,-f(all


Mii) I 111() . _

>- l.,

"'111> .u..vt

...lhan.

llld xa.. lho g key lho lcp ol


lht i..yt>olld.)

il-.Z

18U5 COlttll I _ , 18 llllHClll

f\g<n U: CondlionM In MdlCAD

M:B
...

:~:~..:.e ._.,;_,,:,, >1)JM

MalhCAD includcs BesseJ functioruJO.Jl , J11 , YO, Yl, and Yn,


which corrcspond to lhc llUllhc:matical Beuel functioru Jk anJ

Yt as Collows:

ll(condltloa, truenl, fabcval)


Rewms eilba 1nuWJ1 or/aluval, depcndin on Lhe valuo o!
"'ndillo11.
Thc condillo11 argument oC lhis can be any exprcuion,
aldlough lllOSl OICD it invoJves 1 rclational Open!OC dial
retumS eilhcr O(Cor Calse) or 1 (Cor IJUC). U conditlon is
ZUO, dio jf Cuncon rcWml Lhe valuo or/alm>al. IC
"'ndilion 1J llOOzuo, dio jf unctlon IClumJ thc valuc o(
iruevaJ.

Bes.wl functlons. ., '" ,,..<-'>'

llolhCAD

lg(r)

JO (&)

J;r)

Jl(&)

Ji<>
J()

.rn (l , &)

.r.. ,,,,.,

e.;:::

YO(&)

i1(l
'i,r

YA(l , &)

Y~x)

YG(C,><)

.-:::

Yl (x)

..

:y-.:~:-,--:::: ,.; ~":r:~-:;;~-~,..,,.,,_-~

_,_ ....2t' ''':':=:tr:r~~~D:r:;:;:'::':\.:: :::?:~ :'~ :' :;~;;;; ~~

!~i~

1 s
1r; -;..
:1
e;-,.
,e_

Solving Equaticn."

:C

:~j~

:~~
~-;..

!3

;!_~
1 3
IC._m

l'C" , _

~,..-3

ll
(E:... ~
r1

IE(-=3

tf 1j
!JE:..,.11
_ -.3

II

~--~~ .

d~

,. .......
Jl. ~.:11
..-:..-,,
.

...

MalhCAO lncludes two speclal fc1U11res (Ot 110lving cquallonl


numcrically: lhc f'l>OI functlon llld .ro/w: blocb.
Thc rrm funclion fUlds lho zeros o< an arbiirary exprcssion. This
11 equivalen! IO solving a single cqualion for one unknown.

Solve blocks se for solvtng s!mu!WICOU! cquatJons llld


lncqualities. By erucring 1hellc equations tnd inequalitics as
C011Jtrai111s, yoo can ask MathCAO ID rompuie the variables lhal
tol ve them and then tae !hose variable valucs in other equations

In your documcnr.t.
This chaptcr irlCludes lhc following 9Cetions:
Tbe root rundloa

Using the roor function ID IOlve fer uros o<., exprcssion


Sohe blockl
Usin Flnd and MINrr 10 solve a bloc.t rl equatiolU
How toltt blocu trest eqaaliolll
How constraints, dcllnir.ions, calculatlon equations, tnd
plou are ttealtd in sol ve blocks
Outcomu o( rolTt blocu
ln1C1Jnting the resulr.t of solving with Flnd

Uslna the tolnr tfrecthtly


l>omon11n1ion1 ol how to me the w lvet. pl111 cxample.,

"-"
U,11Jt< ..AIJ ''"'VHlltJ

lbc "'"' lunclloa nn..i, l

Tho

IUOI

ti.#,.,~,, fu.n,:llon ''~-;;~-:;,~~~;~---

approxJ1n0tio"'
,nu:cunw
.. _,_,..
; ~.......to'~""'valau.11,,,,,,,,,,
,.. '"'""''..,,.,,.
MJ11

""U"' ... ___


M......
1

~-..

"'fl~d

-th<>J calltd liv Jl<'<J11t wvtht>J. lllltrN/y, MmhCAD


tlv
WJ/iu of v11i1hlo a.r a 1tart1J11 /'<'fol/or

(iero) ol 111 O.llfCUion,

1At f'Oa1

~ ... .,__,..,_,.,,,~......._,,'"
M,,,, _ _oq.)FM

Whcn ,,,., 11~~Y lho """' lunctJon, lho WJrWb ar11wncn1 mua
llw vaJuo u 11111.in valuo or
'cllC&I" iA f&ndina dio ealulioQ.
>o dclincd. M.ilhCAD wica

To JO/w uwral ~qll/U/0111 lilru1aneoiu/y, iu~ solw bloc*3,

~,3

_J...

LI l::J

M&kc aire lho


ia de!Ined wilh 1 CllC&I valuc befono
l'OU use lhc ,._ l'wnccioa. Moa docurnen.. includo 1
dtilAi&loa like dilo lbo.e lbo IOOl l'llnclioa;
vari.oble :

VU

=1~

a I Ll,-t, , ., LI

FU.&11 -.oit W QlllC llllMUm.

~~

.....~.

valua

M.lllhCAD wil11ohe (QC compla roou u welJ u real roou.


To find 1 comp1e. llDOI, you _
,..,. wilh 1 comp1e. vaJ111
far &he initial , _

-M

Solvin 111 CJqlll. . ol lho fomi UprrUNI/ uprWiotiJ

:::;; ll

lt

. . _u...1 .. 1111- .. ,. ........ _ .

Is equi\'l.leQ( 10 ..... die f'OOl l\mccioo u CoiJowa:

-.

C'OOt(xprionJ-xprwaaion2,variable)
Por cumple, IO del' 111UMW 11 !he 10Jutioa ID lho
eql&llion ; - lllia eqllioA;

=-1:a

r1

.... i,. ... 11 . . . . . . . .. . .


I

lto

.....~1 .. aa. 1J i.w


"""'"! 1: Uong plot and ... ,...,, bao. i> .,., ""* ol 111 --.Jort

c!3

~!:a

U/C.aJ hu 11mall do\JC ne.ar iu mc)( . lhcu rocHU) . tJmay

convcro IO a vaJuc r th.at i1 n:.L111 vcly Car fmm 1ho Dl'llual


ruot. ln such C&ICI, cvcn lhough l!fr) 1< J'Ul, r moy he lar
lmm 11>c poinl whcref(r) O. To fond 1 m1YC accurale mil(.
doc.:ICAIM\ lhO VhK"t O f<>I .. ()f , lfy (inclillli[ IHOI( J{ 1) , 1 J.
whc.rc 1(1) jf i)lf'(i). IJ ' (i) hcrc rtJrCw1u dw: ooivll1Yo
olfli).)

Ma1hCAU t:anrnJt lhul mot, h ma1h lhn rool mw.:1ion wilh 1ho
aro< nol contrKlna. TI1i.t cm# can bo cewed by 1ny of lhc

lollowinK:

TI.e cxprcuion hu no~.

"

Thuc are local muiinl or minime oC lho c:apreaoion


bclwcen lhc initial gucu llld lho zuos.

1l>o u:ro.t or Uic ex>rculOO

ll'C '"'

from UIO lnhLol K"""

Mlf en ""l'fC.S.ion f(i) with 1 known me a, !OlvinK lor


adJ1uonaJ flX>tl ol /C.1) ll e4u1vk:n1
1olvu1H'. 111 l\)l>ls ol
lt(i) fi)/(Jc-<J) . Thi.t procalurc iJ knnwn u "dividin OUI"

'

known rooll. Dividing out known r<x>U is wclul lor


rcsolving two roou lha! may be closc: togelhcr. ll's ofLCn
r.asicr lO solvc foc roou of h(z) u dcinW hcre than to uy lll
find other roou Cor fzJ wilh di((crcnl gucssc:s.

1crc are disconunuitics of lhc cxpcssion betwCCZI lhc


initial uess and lhc uros.

To find lhc causo ol lhc error, p/Qt tite uprtsrton. Thi.t will hclp
dclaminc if lhcrc are any poinis whcre lhc c.prcssion crosSCI
t.ho l.Cru axI arn.1. i JO, appmiimatcly whcrc they Alll. 1( you use
an inial gUClls valuc closc: IO whcrc lhc 01;prcssioo crosseo lhc
zcro u.i1, lhe root funclion i.t more likcly IO converge quickly.

Definlng a user tunction with root


lf you defino a usa uncuon in ter ms or rool , you can u.o il In
ilCllllive calculations. Enw 1 dcfuiition of thi fonn:

runctvrlble.s) : root (expr, vr)

Hints on using the root runction

111 lhiJ defuiition:

Herc ere aomc hinlS on u.iin lhc root l'unctioo:

t~ can

""11ablts can inl:ludc any variol>lcl Uial o~l<'M in


lncluding lhc variable lO be solvcd. lf you includc ..., as .,
11gumcn1 or/1111c, thc:n lha1 arKUIOCJll spccifes lhc KUCSS
valuc Cor lhc: root Cunctioo. lf you do llOI includc OJ', ll'ICll
lho tldi11i1inn usca wha..,vc.r ucu valuc iJ 11ivcn ju.i 11>.>V<>
lhc definitioo of /~ .

The rc.wh o( !he lunclion is 1/10


flUICtioo.

;;;~

-il 1,.J La1

J.

aoewer : root.(a.1 - .11 ,a)

~.,

Fiurc l lhowa 111 cumple oC lhe 'OOI function.

fbca you 111e die lllOl lw>aion_ bep lhele ua~ in mind:

Mo1hCAD'1 root function doc1 nol alway1yleld1 solution. lf

a.r tkJcribtd laler IJt tliU chaper,

lle l'CIUJ1 ol lhis fln:lioa is a numbcr: lho va.luc ol llOl'/Qbk (QC


rhicla U/Wt.UU. is airo. .

:'

[! [

MttM.u.

Solvln1 Equationo

Whul lo do whcn thc roul uncllon dou not


convcrc

~
<:::

To changc lho 1CCW11CY o UIO root fwicllon, clwic llio


value of lhe variable TOl. TOl swu wilh 1 valuc oC J0' 3,
lf you mulo TOl largcr, lho root Cunction will converge
more quicUy, but lhc answci will be lcss accunuc. lf you
makc TOl 1mallu, UIO mol Cunction will COllVcrKC m"'
slowly, bul lhc answcr will be more accuratC. To change
TOl , includc 1 dcfnilinn likc TOI. : O. 01 abovc lhc
place u1 lile docu111cn1 whcre you uso lhc rool function.

;/!:a

lf an exprcssion has multiplc roou, vary lhc inial gucs1 IO


find lhc:m. Plouing lhc fW1Ctioo is 1 good way IO dewminc
how many roois lllcre are, whcre lhey are, and whal inial
gucssc.s are lik.cJy IO fuid lhcm. lf lwo roou are closc
IOgelhcr, you my havc to make TOl smallcr lO distingui.sh

be any functioo namc you choosc.

"'"

a<~vI

P. '.

1 1

. ,{(~.1 n.... -r l ~~ ~- L~
.
.
44.l-~,,.J;llf7'n"'"'
.

....

v1iuc o/ thc mot

Furc 2 SOOW$ an c:a1mplc of how such 1 lunction can be uscd


10 fintl whole vecllll' ol solutioiu IO lhc rool function. The '
argwnenl w/in lhiJ cumple is lhc KUCSI value, ond lhc socond
erwncnt u 1~lCt11.0Cd in lhc solution.

lhcm.

:t(b.

l~
.. PO .O
~~~~~~~~~~~~~~~~~~...""~""'."""'."_.~
= ..~~~"'!'~~:;~~~~~~~!~~~~~~1.~IJ'IJ.
L .?. . "
. it T

'
l7J

i.-..

"' - "'" ,..... "' .. "'"~


....,,... ,,'
JO ...,.,.. _
_,.,,,~~""

'' ..
"
Tho fuu . . . . _ .... U ....... fu. .... """"'" ... 0
...
_ ""'-..- .... -............
lllal cpreu,oo.

~ :~
, .. ,

"'"l,u/,.Jtlia,,1.,..,wo/tlvf"tdtfl11<dvarlabltTOl.

J bl 1

E:~

'

; z :

Al

'

--- --- - -

.:. T r
14

'?'"~C'.'."'.';'.'T' ~'.\':'.:?1;~:.

' :: ' '

; ,: ''."'";' .'. " :

~-.

; ' ''. .

~2~

s;-=:-.:3
llJICTIOll toa -

rt.d :

ltOOI

l''h.d . . ...
U.h ....u-:

ntot[: -. J

...........

n.~~U.

._ .,.. u r.. ...,.,.., '


:. 1 .. m

: 1

Solve blocf<s. .....,r J1i.

lttoltht,....

:. '["'-J . . . ,,....
u.,.... r.. ~ta u.,....

........... .

.._..,

,.,1.

"

" .

To solvc >evcral cquatlons and ill((jualitics slmullaneou!Jy, UJC


MalhCAD's so/w blocks. A sol ve block holds a group of
cquations and incqulli1ics and cnds wilh n Flnd or Mtnur
funcrion lh111 salves roc thc unknown variables in thosc cquatlons

and incc.111alitics.

Thc bloclc begios "'ith lhe keyworct Glwn.

Thc lxxly of rhr. block l. mndo up of r.qunllon: onllnary


definition.1 and constral1t1s. The consurunu acc thc
cqunlions or incquali1ics lhat MathCAD lrie<J ro ''ve

h'iiil

;;;::s

~~- ~

.._1 "~
t:='

A 'lvc blockl ooruisl! of lhc following Jl811:1:

C:---

.._ .

r:.... -~

r__. !3
11

C' --

u,. 2: 0.llrW>g .....

~---"" ~~

The hlock ~ncb wilh any "'l"lion lnvolvlng eillicr of the


lullowh1g 111111:11.. u:
rind ( VU'bl .. l, vrJabl .. 2,

, .)

Solvin1 Equationa

Figure 3 shows a documcnl contalning a 'lvc block. Thc rcstof


lhis chaprer de~ribcs how to cnlel' constraints aod U9C solYC
blocks in your documents

IOl.Ul ILOCI"""'""

......... u .'"'t

<X'

lnerr(variabl .. l, variabl ..2, , , .)


Thc v.ariables th.at are thc argumen11 of Flnd or Mine" ani
the variables to be solvcd for. Thc Flnd and Mw"
Curction1 rctum values as follow1:

IC Flnd has onc argumcnt variablc. lt rtlUm.! thc value


or lhat variable lhat solvcs thc coratraints.
lf Flnd has more !han onc argumcnt, it rctums a vecllJI'
of answm: one valuc for cach variable to be solved.
Thesc value<1 togcthcr solvc lhe constrainls.

Mine" is similar, but it rctums nlucs that minimizo thc


emn in lhc consttaints instead or solving thcm.
MarhCAD rtcognlus Givcn, Find. and Minerr rtgordltn
of capltal/zat/011. F uamplt, givcn. FINO, tutd MinEtr
art tquivaltnt to IM standard/onru oftMst Uy.!ords.

-------------.

g!--:B

J!'.::s

id!~
l~--~

~'

el (AltJ- 2

> 2

GtMtor !han.

l..-2

t1cl2

1 < 2

l.fttlllan.

tl2:e2

l (lltj) 2

;;;., l"-1 or oqull lo. (To typt

1Sl2

t..

-- (UtJC e2

down

ti

Figure 3: A -

lt1""1ortQUllto.{'101)1lt ttn

"'**".
hold
l.U t 1Uy
aM-lho9byollhotqrol
hlw)!-1)

np~~ttpreailoo

.....,,.. .--u:

COSlanod 1o bo oqua1. (To 1yp1


, . llialionll oqulls, hold down
(.Utjhyandpr.a.)

t . '1JlllimJ

:3

,;d!:!

"""'"'""

ti t2

ol lho M)boanf 1

. . . 11

.J!~

CaNlninl

1N1 -lllor, hold down (U tJ


lwf llnd"'"' '""o Uy 11 lho lop

" i ....

- =- ~

Mere 11 a li.tt oC possiblc forrns for conmaints In 90lvc blods. In


this table ti and t2 reprcsent arbitrary expressions:

I t

____so.i.eqlrMSlonOOOllrW..
(MhCAO b... to lnd t oollon
lhil n>tOMlon lt ltftl.)

"'*

11.ll~

ll.S1"'519SZl

;(E:._ . .!!t

JI

-----------

11

C.-. Mll

e .

m !

The variables that are the arguments oC Flnd or MIM" must be


defined abovc thc top of !he solvc block. 1-fathCAD UICI lhese
definions as swting values or guesscs in its aolution. '

.:;-_.... _ ~

JE

---~

.'.f 1 v-~-:~~;l~rt-st5:f:~:r:r::J.~~2:

&imullJlne<>uly, Thc block b not liml1e<I horltoru.ally; any


flflmtlion thn1 tlnru ott UJW'I ht!low thn ()/w,. and ho"'" the
bouom ot ll1r. Jilt-.::l lla UN1~hlr.,c-.4I to ht'I b1 lhn hkN.:l.

- --

wtfl to1ve blodt

Constralnts
The body ora "'lve block holda co1Urral1111. Unliko ordillll'}'
MalhCAD cqualion.t, constrain11 hold exprcuions on both sidca.
Constrainl! come in two forrns: equalit.y constrainu and
lnequality constraints. Equality constraints look like lhis:

expr..ssionl express1on2
(To lypc thc constraint~uals slgn , prea [Alt)a). Whcn a
constralnt like this appean In a solve block, MathCAD aucmpu
ro find values of thc variables that makc thc IWO sidcs equal to
each othcr.

lll((juality constralnts att1 similar, except that they hne >, <, ~
or S in place of thc . As wilh equality constraints, MalhCAD
trie& ro find values of lhc variablel lhat make thc incqualitics
hold true.

MathCAD dots - " " - corutraif!SZ JU1n1,. n solw


bx:b.

Por cumple, ., lpCCify In a COOSlrllnt that; + 1 t2, type:


....:i

J"'2 [llt) "2

'WcttWlf. EquaJir, otld IMqlla/11] constraints ll'UUf ~


zcalar eqwuloru. 1?w upns.siolU"" thtr stdt of a
t:onsmAN CQNll)t i..volw: ron~ wuiablts, nor Cdll tk] ~
wclllt' or 1'tOJ1 tqlllJlJru. (To so/w /ora wctor or matr
cfnnJu, dqlN af111tCdbn witlt IM sotw block, ID
duaid IUltr "Uling t~ so/wr tjftctlwly." laur bt tlJ
chapler.)

Flg1n 4 lhows a IOM block w1th ICVCr1I kinds ar coostraint

1
" .... ,. .... ,.. ............. ,.. . -.:.. . . ~-= ~-, =-::.~::.~= ~==. :-:..:.~~:;-::.

Olap< 14

........

.'

:. l

,. 1

. .. a..a.

. . . u-

....
,
...... .

_....

' .. ..

_..olN

11

] "
;.

eqllation lik.e:
tunct ion(parametr~)

'

Wn<lo " ' - - " ' ..........

r~l111. Wlvn IJ/*1

''" blod 11110 a doc1U1V.,,jlr11

,,.. .,_,.,, Tlw IJI ,,. , ...,, Wlliu1, IM rnvcn.


co1111raJ1111, aNI IM l'IA4. l'/Aolly, plll lrla1/CAD bad

,'""'"'
'"""'"MalltCNJ
"'' '"''"'"""
~ wjiJt auc-allc '""""""
' - """'""' cal0Jatlo11 lltOdl t>qo,.
1 \Uee't.~

- lhc valuc 111 u... 'Viable lhal IOl- lhc COOllr&llll.


an c1 ll lhal valuc ia Y ol die followin ways:
Uilay it - end dio ave blocll: wilb an oqllllioo lik

ilid(vari&bi}

cfuie a variable willl it- ead lhc aalvc block wilh 111
ualioo liko:

vari&bl : rilld(vari&bl)

"""'" l . '1.:1JW1'71

tunccion (parameter3) : rind( va rabl e)


Thi1 funcon reuuru a vcclO. See "Using lhe solver
clfoc.:tivcly,.. la&.er in Lhit cNauu. Of more lnformalion.

~~r3

dvarl
J ..

_l~

~;
l..:.:

1
' ............... 1

11

U you lllC a IOlve block co aolve fcr acvcnl van.bl~. Flll cr


/tiIMrr will havc icvcnl uumenis. Flnd and M U..rr relllrn
va;llln In whicb CllCh elcmenl repracn11 lhe IOlvcd valuc o{ lhc
appropri&IC variable. You can ci ll dlCIO YllllCI I any ot lho
tollowin waya:
Dplay lhcm -end dio aolvo block wilh cquatioo lik.c:

irn :iJjj

lhia poinl I lhc docUlllCOI, dvari4bfe hu lhc aolvaJ

iiiMC

iiM"~'
,,~- -;,

.~<l"tf

Ma1hC' Ar> ddh1t.1 J wJf I wllh dlO 11~vtA valuc o/ WU' / ,


dWU'l witl1 1he eolvod valuc o(..,,., .,.i IO m. 'llic namoa
oo die 1en c.,, bo lhc ......, u thc namei on lhc ri ht. bul
no! lkK ba.

1...,...1 11,

- -'

' )1

11

LUt

wl " "' ...

a..--- . .. .

.,........


.....

. . . ,......
u

[']
lfMl :. n 9IM.1>

names.

. . . . ttt
poi &.U

s/uJw11 i11 Figure 7.

l 1

g-

w:Clofl. To ere- o 'HCllN U.te UteOM on IM lcflo{1he


defulition abow:. press [l:c) . .triza, wliue a ll tire
slu o/ 1he vtellN. The11 [l t
plauhokrs wll variable

011

u-

I 1

Figw-es 6 anti 7 sho"' cumples o( lhe solvo bloclts ll>al display


lhcir valuca or dclino variablca wilh lhem.

. . . . .

rt..C I)

, Clrel

... u ..

Stt Chap1tr /O, "Vt e1ors and Ma1rlc11," for ll![ormatlon

l 111...11:il

}F1Y4f. '.. !R'.f


,~,Plf
~. ,

.. ['"'!
l

- -

~,.
Ul#h4\U4AiZAO 0244ZMQUJ

,... , ......... .

~ 1
WV:4\f};.:eJl, ./,P::~'1tll'

~-

..
..'' .'

f"YNe l . ~'1 . .. "'90. . uf a ..W. lalo111Jk -

,::~:a

-:J

rind(varJ, vr2, )

! l

1 :al

! FI nd(var1,varZ,nr3, )

Wandnf. 1/1he varlablu ~ilif wlw:d do lfOI ali haw 1he


Sanut Ulli t.1, )">M COllllOI display 1hem as o W!CIOr or dLflM
1/tem with a/M11Cdo1t. Yow """'' drflM variablu/or IMm. at

l=-u

rz

!.2' .3

l .=e:;,.;-

..1-

ti ohol-' 11

4var:J

i.

.;=; _

Ful and Mln1"witb several variable.

rl .. h'& -tl

Define a uscr lunction wilh lhem - end lhc: solve block


wilh an cqllllioo like:

Or.lint. varihlc.c wllh lhcm - ond d>0 tolva block willl an


cquatirn1 lik.o:

~. !

1 ,

f9n 5: ~blodca tiel...,.aN>gievUJo

UJC a iolvc block IOIOlvc Ccrone vuiablo.Fllldor MIM"


1vc onc 11rumet11- lho variable neme - llld tt:t1rn ono

IOOI

--

_(:a

nUe I '1..M ...

""'"""'16 MJ/w bJad.

and Mln1"willl ooe variable

ca-

' '.,

rrU.1 dv 1olw ~ J'OM prnNlfl Ma11tCAD ,.,,.,.

"""'"' IO calc"14u ""44""

.. .

MiuhCAD display lhe reauhs u a vccwr wilh ooe clemclll

pcr variable in lhc Flll Cunctioo.

t-~
!2.::.r !!I

' ,. a

.......... _........
,
.................
.

Ua1ACNJ Wo-' calculalion ...otk ""' " 1lv

t: ~r~

177

Solvinc Equ.1tion1

~ -~

--

,... '-'... '1

n .... _. .. , ,...1.._._..,

4:-

: rind(variabl)

Pllff ' alM>wt oaamiloa of 11i11layl1111 v1l11t.1 <W d11ll11ln


vlrilblCI wilh Flnd.

......... , ..........
1

Define a usa fwictloo wilh il - end thc IOlvc block wilh an

Thil u.seful conslJUCtion is dcJcrihcd in the toetion oo


"Uain thc aolvcr olJccllvcly ,"!ala In lhi1 cha>CU.

a..... ......................,_,

1.iH

9s

valuc oC lhc variable. dvarible can be thc umo rwnc u


wulable, bul nud llOI be.

,......_. "' .."' ... H

de

Figure 7;

""'""'

) 1

11

a.. u..t ~ ..
1

......... I

1-...11t,

--"'""-

..a.u ..:
. . . . . . .. . 1

v . - w i f l fle ....Ult ol 1 ""'9 biocl<.

...............

L_

'. \ t :::,, ;=rot-.

~--

..

. ,,,~ ;.~ .; .':~;-::.:; :,/~'.' ~:

: :.::; ,, .. ; - . . .,: .

, :,>" ": ~~,7~;~ ~. ~j

ChlJ>kr 1

Othrr topics
The rtst of this chapl.Ct contains tho rollowing !IXtions
dc.'ICribing VftOUUS A.<IJCCU O !Oolving with !IOlve blocu:

"Jlow solve block! QUI equations" shows how MathCAD


tttai.. differcnt kinds or et1ua1io<u In sol ve bloclts.
"Outcomes or !'Olvc blocks" describes the varlous ways thal
Find and Mlnurcan succecdor ail.
"Using thc solver efTcctively." at thc end or this chaptet,
shows somc useul ways 10 UJC 90lvc blocks in yoor

documcnts.
l )'Oll want mon: ckuikd inormation on MWICAD'a numcrical
rncthodJ or solving. i.:c Appcndix E, "Numcrical Methods.

HowSCJlvebloc.ks'lreatequotlonr: . ,. ; ; - ,.
MathCAD trcats eqlllltions in sol ve blocks diffcrcntly rrom
cquations in otlitt paru of lhc documcnt, as describcd below:

Delinitions and constraints


Local clcfinitions (dcfinitions with : ) and c:omtrair.ts are local
.O solvc block$. This means that any local dcfinitions and
constraints insiclc 1 solvc block wiU not aITcct variables outsldc
the solvc block. Whcn MathCAD is solving, it evaluaies tho
dcfinitiOR! and constrnints once for cach step in the solution.
When MathCAD finds thc oolutlon, lt p;wcs thc valucs 10 tho
Flnd or Mintrr (unction, 90 thal they can be uscd in othcr
calculations.

Plots, calculatlon equatlons, and global delinltiom


Plots and calculation equations (equations with ) in a 90fve
block behavc as if thcy appcarcd just above thc GiW!ll. You
cannot 11.'JC a calcul.ation equation in the middlc of a solve block
lo show valucs computed in the 90lve bloclc.

,~

l -~

I' .

~~
~-=

:s

JI!
~-JllK--~

IEl:3

,.

~i-~

Global dcfinitions (clcfinitions with )al' behavc as if thcy


lppCnm! )11!!1 olK>vc the Glwn. In gen<:ral, you houhl not u.e
global clcfinitions in solve blocu.

~:-11

Glvtrr, Flrrd, and Mirrtrr

~~~

A1Mltional uJCa ol <iJwn, 111""' 11ml Mlnerr a10 llJegial tn 1hn

lly o a 1olvc block. Yrn1 cannot neot olwi bkicu.


All tllh' fu11t:llon. lncl111ll11R u..ir<lefl<l<l lunctkK .,., lr.gnl b1
tl\'f'hlod1 ,

Vtctor nnd ranitttl t'quntlon~


llW' flltlN'f"4C~Mlt on f'hfM'lf ciflti uf A t"OfH1rnh1I C"Mll'Wlt hft mnard
OAptr.:uhJUI (catitc..tlooa lnvolvl111 tau~o vaalahlu), """ lut, of

matricu.

--

,.-.J~
.J.ls

11:; . . . .

~ !~ .~
~:!! i

id!.
:
ri
JI
~1~-~~

- .

. . ..

..

----

.... -~} :~~:fo ~.':,,:?: :/T::1~N~tW:llt:'~Uf{;7;~2'l~~~r:I.'.i.:i~l'l~~;:t

--

l'

Solvins Equationa

~=~
~--~

Outcomes ufsql\'e blocks-

MathCAD tktum/11u "1MtMr IO ttarch for rtal or


compla 10ll'1/ons ba.ud on IM st<lT1tng va/,.., of tltt
Wll'i4blt1. l/tM IULSJ valUL/or a llrlrlablt IJ rtal. tltt JOl""r
trkJ to flnd a rtol J<>IMllonfor tlitJt wvinblt. lf tltt '""''
valw u complu, tltt 1olver loob /oro complu JOlllJ/oft.

This scction clcscribes the possible outcomcs of a solvc block


and how to inierprct thern.

llow MalhCAD's solver works


MathCAD uses an it.cntlve method 90fve equations llld
lncqualitics in a 90lvc block. This ltentive mcthod swu whb
!he gucss values for the variables ID be llOI~ and the
constraints and ends with variable vaha thal atisfy the
c:onstraints. 11te iterations talcc place intemally; only the final
result ;, di~played on thc Mal.hCAD screen.
At each iteratlon, Mll1hCAD uses the most recemly axnputed

Outcomes or solvlng
Thc 901_. SIOpl undct r:wo coodit.lons: 11 lt flnds a 10lution, or i

h re.ches an error condition.


In a 9Jlve block thlt cnds w!th Flnd.. the followlng ouu:omcs m
possiblc:

StM:ce& lf cach constn.lnt is utisticd wlthln thc 101cnnoc


llld the JOIVtt anno1 man any Yurther rcfincments 111 the
IOlutlon. lhcnthe rcsult fJ a successrut solution. Thc 'lvtl
llXlllS and rctuma the nriable valucs in the Flnd function.
The solVtt al' 9CU the val..c o< the mable ERR to tho
magnitudc ol the cnor vcctcr (the sum of thc squarca of lh
erron). (Sce thc description undcr "Whal to do whcn !he
IOl'l'CC succceds," on the next pagc.)

Dld aot mida IOlutlon. lf the JOIVtt cannot mate any


fUJ1hcr lmpro'lelllCnt.s to the 10lution but the c:onstraints t n
1t0I ali utisficd, then tho solVtt IWpS and mlll'b thc FlnJ
wlth the emir dld OC reacb oolatlon. ERR iJ 9Cl cqual ID
thc magnirudc ol the crroc vector. (Soc thc dcJaiption und
'"What IO do when thc IOlvcr doca no! rcach a solution."
lalrr in 1hl1 occllon.)

Nul rot1n'll"I MllhCAD ... 111 ,._~ ttRlllnuc IO -ch h


a 1<~udon rorcvu. Ir MathCAD tries a largc numht.t ol
ltou1km1 wlthout lt*:hlna 1<>lutklf1. tho .. ~..,. ~,. 11wl

valucs or the variables bcing 901~ llld cvaluallCS the consttainu


and dcfinitions in the solve bloclc. Each constraint has 111
assoc~ trror that mcasurcs how Cu the consttaint is Crom
being true. Thc crron are compultd as follows:
Por an equality consuaint, the error is !he ditrcrmco
bctwccn !he expres!ions on thc
ni the right sidc oC the

ten

symbol.
Por 111 inequallty constnint, die error Is Olf lncquallty 11
true, and the difTcrcncc betwcai the
and tho right
c.prn..lon lf it is ratsc.

1cn

r-or a slngle-expre.ulon consualnt, thc error la the value oC


the cxprc.'-ion.
To1tf"thnr. lh4' r.snw1 Htc-.:ltncl wlth NK:h cor111ralnt..,.. known

,., thc """ V<ct11r. 'lbo emir vectoc la not accMSiblc to tho uOCt,
111 it 11 .,, l1111t111111111t o MathCA0'1 lnlt\mal aolvln1
hM'\thoch:.

"'""....e"",."''"'

m0<h lh'1 l'lnd wlth tho


(SM ''"'
dee..:rlpdon Wkb -w1u.t to do whcn 1h.o ... ""r.c 11 out
c:onvcraing. Ulcr in thl 10Ctlon.)

A1 r.1111:h atr.1. 1hn eulV'f'lt CMlllMIN new v11lahla vahlN lntotMSt..1


to mlocc thc mKnitudc cmn In the constraintJ. 11te C011Jtr11int1

ax1>i<lr.ml 10 he utbfietl whal the ttmrt havc magnitudc


Jr.n lhnn HI/ .. (H)I, 111 variable tluit hegln1 wilh thc Yllue 10.J,

1n1

but yuu e O e lum1n lh .. vhM' to t'11Mtlfl dN" lflclt1lrf"ll 11C't'Uf9il'Y ot


lhe soluuon.)

-4/'f"'"''lx H, "N..,,..rlcal M111tod1," 1l11crlw11'1J1 rnr1/tod


lft '""" d~ral/.

Too rnr ..-1ral11ta. rr th<n

1r11

fcwcr con1tnln1J !han

l.11hln11, 1""9\ MathC'AO rmot nm llM" 1olvtt all. ,


M1llt<.:AO maA1lho1'11M.I wllh lhc e.11ot hH '~"

C01>1tr1lllta. (Sce thc dcacrlption uodcr "Wlal to do "'"""


thenl ero 10 faw Clonltralnt." lALCr in thlt ttetion.)

"..

.; . :> ' ,< .;. :

1~_ ~ ~.

" . .,;; .:, e

'l. ..

1i

! .. .

...

M~,.,...., ei.c11y lbe ~ lleoritlloi, but lhc l'C3ults aro

diffet<nL ll dlc IOl-Chlol mato any fllrlhcr impro\'elncn11


llic IOlu!Jon bu lhe C<lncaJnu 1ro llOC lll ali&t"ICd Crho ICCOll<f
CUe aboYC). M
mcwn, lllo ...._ lll)'lo'ay, Tliia llla"':r
ollcn, bui llOC a1.,...y1, mlninibe. lbe t.rroq in lho C<lnalniinis.

~rr

""""'
'' ' """"'lal

wu...,,,

ClllJ411. Muicntu
pru,111 a.o
olJSl)/14J, ""lflruurt
l/w .,,..,.., O I COIUtraJ111t. lf)'f)I'
- Minen t" ,,,,,.., l>Jock, ''"' '"'4id al""Yt
adtJJ11o11a1 <lwdt ow U..
oftlw '""'"

"'"'"'hl~u

~o/

/11e/~

Tho
lltia llleti()Q dtacriboa ....)'l lo deal "'lh lito
ou1comea o/ lito ""'-

di/(~

. ' . . ..
.

"' '

- -~ .. ''" .~ "~~" . ._. .....,.f)j


.

'

<.

'" . .. ,.

e,.,.,_'

IOl141io11tn111it~11.0d

)IOMc~~llilal l"<~/or

Wbat to do ben Uae SOiver su~

lllllltiaa.
Pi11re 111o..i IOl>oo bloct 111ai 1iaa ttacJied 1Ucccssru1

............. '::.,.

...]

. .,

lj

1..

.'

"'

'' ' .1 ''. .

'

. ....~ -'twirt u

.._

.....
1

' . l

rp, ,

.. ' ,

ff7'Hffl~
"'"""d

.,..,, '' ' e, , ,


1
,!.tt' kd!!'rW
'<'
V ' ' '

. .,.,,

1
' ' f,,.Y:?t
' , '),"t.
'< \ " ' '
J.' :: su!:" ioo<
t1 'cr:hl
tft

rtt

pouJh~

"\' d \ 4+.

__
u 1

-,_
..-ii,
.j!J

- -~
-

1
..- :il
-

r-71-:3

~-a

i'G::;; ::O

;;; c11:x;ttb f4G!J .11'EfUW(SEfi.IPJMii.4'Pli11f14&=eUGMi.4 4tW 41 ::w_


"""'',._

'""

A .IP

<. .

..,.u_ u - ,_, ..&.u-

..

u.,, ,.tllt .... lldul -'ti:


1

......... ,

.... .! ......

IO a dili-...1.Wlloll.

~,

F-.:3

ol........_

-u-.

cttrr....t ..- 111 .. ,.,,..... " - rw w

- 11

......... ,

(....,, ...

a.da

Aguno 9: A dll-nl QlJM8 -

oo1.u.,

u--.

, .............. )

I ~ ... },... -u- J

. .. u-

r-ll.tU

Maihcw can l'Cllan only ono IOIULiai for a salve block. Thcto

....,.

.._
. ...........,

\e

rl . . IUhr-4. - ' U -.

... "''

.....

MotlrCAIJ
''1"'11/o,,z t sol.., b/od:z, Ut ApPelfdb; E,
"N"""rlcalZO/ivz
AletJtods.'

~l

c.-.. ,.... 1.

.:.1
1

- ........

~'' ''lllnibt1 a zo4'tto11, For lnfonrtalio11 011 .-\ow


~

..a .... r..iaw..1w

,... t~u. o1 otrcl ... ll

..~_..-

.....
.. ,..
1

l
1 : l

... "''

::ac~z; '~'l

tvI Lt14

') 1

Ctlrt.,... .... 1

...<--""
. ..
, .... rr....&

0-. U.l ..... te . t . l -'ti.:


1
1

ID I

noC -

oolulion

The solver reachcs a point whcrc it belicvcs il cannot raluce


tbc error VCCl.OC' 111y Cunhct.

The solver reachcs a point from whicb thcre is no prccrrcd


direcLion. That is, lhc solver lw n:> ba.sis oo whM:h ID maU
funher ileralioos.

1bc solver n:achcs lhc lirni1 ol its aa:W11Cy. That is, tho
roundolT error in futthcr compulations would m&U il
unlikcly aJw 1bc li0lu1io<i coukl be mudcl 11ny more accllfllle.
lbis olen happeru iC you >et TOl ID a valuc bclow 10ll

E :

. .. u.

I -1. Ut

Flgl.n 11: The -

The solver recunu lhc error mcssagc dld DOI nod IOlu lloa w>da
any of tbc Collowin conditions:

u-:::. [;: ] ,. """''

..... ..., .,

..

f']
tp..1 ,. rh'-

~"''a

.tu

t _,
,. 1

c..- ..1. . . . . . .

~ .............
1
1

,... t.ur-uU rl INI .... ti

W.,,.1,,r. C1ta,,1i1 TOL


sol.., b/ocJ; w/// 1101
11ec.,S4rlly
bt a'"'"' acciua1e Zoll4do11. MotliCAJ>
11111rat/y zo/,,.z t/k C01Utra1Ju1 a.r accivottly a.r

... "

l:A~ ........

.-

You can use vllucs rclUmcd by Filld in funtl<T C<ilcut.110111


bclow lhc111solvo
bloci;
OQi..dona
FlWll
8. In lito documen1, u &hown in lhc tui two

n..w.,,..

"l

Tho vaJuc of EliH ia llCC e<ual lo 1111ni1uclc o lllC cm,..


vcc1ar. Fluro 8 dcmon.u..,, how lo sec lhc vlluc ot ERR.

Q ... ,

LllU

"),,;. ,

,,.; ;

.t.cu
ti ..

' ,,. :..

. ' . . " '"J

~blo

1 '

Tho FiNJ funcuon re"'"" lito -ai"C<I valuca o lito variablca.


Tho
Vlluc, laliafy lito COnstnUou; lhc C11Urs .1rC
lcu litan TOL,
Thu8.ia dcnoqlnned by lito la11wo
OQualiona
in Fiurc

~'>'

11-

. '

may be mulliplc
1o a set otcqllltions. To fllld a
dUTercn1 10lulion, Ir)' dilTCt1:n1 Rllling vllucs ar m1er an
addiliona1 incqua1ry COnsaai111 lltal lhc
solu!Jon <he& nat
atfy. Fiillrc 9 lho.., how cli.ffetcnt "'-tin l'aluca can Yicld 1
IOIWla dUTC1a11&omlhconciaFiillte8. FiiUrc 10 sho.., how
IOIUtiaa.
IOadd an
1o f0tre
1o lind 1 diffeanr

,... , . . _ . , _ ti ........... .

\'

"~"'""'" .,.., :".! ' '' . : ~ 1 '-"' '. ':'. .r' +''~ ,,1 ",< ~ . .

. .~ .-:.rrr~r"f"-'"r' ., . ,:1'~~i'~11 "'"";'


."~ ~

Aller l lllCCc.!sfuJ l<Mution;

1/)IOy "'' "'1vt1 di,/Jfoltyftlldt1 a SIJll<do,., 11o/11111.lpz

to p/0111w
CW\fu I '11'1Sllotc. piottbt1 t'4ll /JrO""k
l"'Plilcal ut1Jv flo w/vr, l/w
'Wi/I
11./p
1/w
-labie1.

..

_.. . . . . . . . ,

..&p.lI

.a.u- ..-lt ,,_ M'ltt. .1 ~.t.)

Figure 10: AddW>g ....-.lrainl ...._ . d - 1 oWllOn.

Whcn lhc solver docs noc rcach a solutioo, F/Afi i1 marl:cd wilh
lhc mcssagc dld aoe reacb solulioa. ERR is se1 e<Jual IO lhc
magnitude of lhe error vcclDr corrcsponding ID whcre !he sol=
SIOpped; sincc the consu.ints are llOI sati.sficd, ERR may be
relal.ively largc.

The following problcnu may cause lhi.s son o{ failure:

What to do when the solver does not reach a


solution
Figure 11 sho'W11 JXOl>lcm ror which MathCAD could DOl rcach

Tiiue may be no solutioo. lf thcre is no solution, !he solva


will auempt IO find the variable vaJucs lhal re.sull in lhc
llllallesl possible error.

a soluuon.
EGMZ= ?4)Cf+IP .

J.

'

- ~

-~-

- -~-- --,

e.. : :::~.:::: ;~ '.Stf{'t!P''T'.f:'[)'.;m


i::'.'. ; .:..; ..': ':'.;!: :'. 'J
IB2

Ch"j)ttt 14

You may ha ve gi"Cn real guc.ues for a variable wilh no real


solution. lf thc solulion fot a variable is complex, thc solver
..mnOI find it unless !he stattin valuc fot lhat variable is
abocomplex.

Thc solver may havc goucn lnlppcd in a local minimum for


!he error values. The solving metllod that MalhCAD u.es

,.u sometimes rcacn a point from ..nich il cannot minimizc


thc ttmrs any further and Cail to <Clum !he actual solution.
To find lhe actual solution, try using different suning
..11JC.1 or add an incquali1y lo kcep MathCAO rrom getting
trnppcd in !he local minimum.

11t1..,. .... . t ~ .... ,_..te tw r,.. ..1.u-.

"

:. ti

"-

11 may llOI be possiblc IO solvc thc conrunints lo within !he


dc.1irc<l tolc11111Cc. U thc valuc o( ERR is relatively small,
MathCAD may havc rca:hcd a ncar solution bul be unablc
to ~~ve nll lhe con<1rainL1 loan error or less Uian TOl. Try
delining TOL. with a larger valuc abovc thc solvc block.
lllCJ\"ming thc tolr.nnce nuy cnnhle thc "11vcr 10 filkl a
solution before rcaching thc ao:incy limits o( its own
aril.hinctic,

U you are in~tcd in t.hc variable valucs anyway, dc!pire thc


fact that thcydo not~m a solution,changcFllldlOMIM"
in the cquation lha1 ends !he solve block. Mw" retums variable
valUC3 cvcn ,.hcn thcy do not ttduce !he crrors to within TOL. or

zcro.

........- ..

(!o_, ... ]

This me,.,uc indicatcs lha1 !he solver ancmp1e<l 10 solvc lhc


constraints for many itcraons, bu1 was unable lo reach any
slopping point This urually mcans tha1 thcte is no solulion or
thnt lhc guess valucs for U1c vllriables wcrc very far rrorn 1hc
solution.
To gct around thls problem, c.hooso bcucr gucssc.. (Graph t.hc
curves In queslion IO de1em1inc reasonablc guess valucs.) U !.he
solution may be complex, be sure lo me complex guess va!UC3.

What to do when there are too rew constralnt..


[( you try IO use !he solver on a problcm wilh more variables

l'lgur-e 12 1how1 an cumple in whlch Uic IOlvcr doe1 not


convcrg-e.

.;,

Solvin& E.qU1tiono

~~

E:>- ~

1
1

~=~
:-3

-
E-! 3

EL!
fi:.;.-

11 l>Ol """"9rglng.

thnn constraints, you see thc cnor lllC3Sage loo ftw COO!ltralota
(Figure 13).

What lo do whcn lhc solvu Is not converglng

~. :~

~-~

:. flllifflt)

Aguro 12: Tho -

.....,,....,,.,....... -

Thc solver may ha.e gOltcn trappcd in a point tlw is nota


local mnimum, but from which i1 tanllOI determine whcre
to go ncxL Thc s1ra1egies for avoiding this problem ne !he
same as ror avoiding a local mnimum: change !he inilial
gu=cs or add 111 incquality to avoid thc undesirablc
stopping poinL

t~)'.:'.~'\: ?"-,.!~

,. ta
!

:a 1

_ . ...,

... ...-

="

1 :-a

a.1 .. ha ................:

Cl.-

I:

w .... ............ - ' ___.. - v .t :


S SI
: 1
e I 1

..........

1 :a"
:

.-...... u.......u-: a ..

],.T.....

......... !.

... 11 . . . . . . 1

lt 2

[:] :. n-'
,.,... rw ._ ..., .... _.,,,
-

li-r--I

..121
la

ti:- - ~

~~
11

~-:'.!!

1
ll
IE-- -:3
~--3

d~
JI,

~ .....?_JI
,

'lftJ

rw; 1N

rs;ro 1a;a1p;w..111
. . , _ ....., .. wlU. . . -

Figure 13:'The '"'or cannol llO""' a~ wt!h 1Do

low--.

A pmblem lite t.hconc In Figure 13 is ~rdtttnnlMd-t.ho


ron<trnints do llOI givc enough inormadon IO rwrow clown a
soiutioo.
To tL,., !he solvr.r In MalhCAO, you must provide at lcast u
mony con<lnlints a. lh= are variables to solvc. Ir you f. t.ho
valuc o oome or the variables, you may be able 10 tolvc ror t.ho
rcrnaining variables. Figure 14 shows !he same problcm as
Figure 13 wilh x, y, and v lixcd. Since Flnd tolvcs only ror r ni
''"!he two constraints are sulUcicnt IO find a solurion.
Yo1t can/orct 1/ot sol~r to work ~tn witen IMrt!OTe too

/tw corulrain/J by addlnt dummy constninlS. Dummy


coru1rai111J art tquotloru //U ... 1ha1 olways lwld ll'llL.
Solutlons obtalntd wlth d111Mty coiutrolnts wlll bt! ot:tual

soluilons, bw thty may be onJy rt!prt.ttntollvts ofo lar1t


clau of sol1ttlons.

f'Vnl:n.~ ...... ----- ~

ID F1nd.

- -----.,.----- -..,

~---~~-------- -~---

--~

a........

!::?!

slna= lhesul\'erelTl~lhely
liJ xclion providca llinu oa uain M.a&bCAD'1 IOlvc blockl.

C:...\h rrlU hot..- .. C.t..,.,_a fan.I


fC.. U4 fl "'t114 ~-. _..._.. 1
...1 1 - 1... 1

te tt.,

din in: a uscr funclion that salves


"'o/ MaihCA0'1

""* IPul r...umo 11 tha ability "' dalliMI 1

>Ctioc1 in LanlJ ol 1 1olvo block. U you ddlno a fwiclioo in


n11 uf FIAJ. Uwi lwictwWI wUI aolvo lho limultJ111C>ou10tuatlo11a
J inoqualiw in lhe IOlvc bloclt each timo you - lt. This can
uocful for IOlvin1 ~o( problem1, neolin 10lutiooo, and

"'"
define a uso lwiction lo 1a1111 ol FINI, cnd a IOlvo block
h 111 ccuation lik.e lllil:

rltt , ..._

u.h -

''-"

u.
t I . -I

1 I Ll t

11~

r.1.ru.1.u l.llli

flgurw 15: OollMg. -

/UN: 111 fwictioa MlllO.


faars il 1 lill ol vllriablel lnvolvod In thG c<W11lnin11. l11i1
lile can cou1al11 .,
u( I'IAJ and Ulhu v1111blea. ll
any ot wv1, wv2, and 10 oa 1h111ppcer u arumenu ol

i""""'"

/UN:, MathCAO uac1 d>c.ao arwnco1 u

ucu valUC1 for lho


IOl YU. For any ol wvJ, ..,,.2, and 10 oa lhal do noi appcmr
in lhis list. MAlllCAO U1C1 Ulc utU VlhlCI providc:d )1111
abovo dio Gt..11 ia lho IOlve block.
V<V J,

""'2, and ID OG IR tho vsilblea IO be IOlvcd for iD

mcFui

The rcsult is lhe value (or vector ol valucs) lhal IOlves tbo
conani111111Jin tlle valuea ivea ll faari.
urc ll &bowa an eiauple ol dcfuW1 1111U IWIClioa in &ami

'INL

.. -

e;. ,

ol Flnd

Solvln ror a vector or resullJ


11youdcllnaa111C1 fwiclioo In tun11 ol F/Ad, you can uaa 11..c
_ , fWICtion IO IOIYG Cor. voctor O( ruulu. Fipro l6 lhow1
bow IO et 1 vector ol 11111Vcn lhal coocspond to a voctor ol
larut valuca.

............ . .. ,.,a-w.--.--.....:

"-

c~r~
t:- ~

cl:a
[:j~

E:!i

~~

~
-1
e .:a

l"

f, -u ... ;:;
1

.~

!.:~~

1.11

a.r

~.r..c:c.e,u 1.

ii....I

ce-.. _ ...

l--f,

f,

111.l

Sulvb11 &uauona

!-

u .,_, .. ....,., ...

....... o. r.u_. .. .,....,

--1.11..

t::.1-~

........., ....,....,, ~-

r rw ,,_ ..1... .t e ,,..,. ,.....__

,,.,. ,...,....,.,, ... 1

.._

v....

tunc(tvul : r.lnd(varJ,n.-Z, . )

hil dcftnilioo:

61'~

r..t..r.oet .1.11 :.
t I

.. Q
.:11

..
1

~,......,_

- '1

a..--t.

wrl U

...

hU-

ret. ~

,.,.. ., ,

1.11

'-'- :

--

' - _ . . . ( - 6 1 -.....)1

' 1 u.
M"

f le . - I

1 : . ''

_._."' . - - .1

rr

IC.0.14 -"'- \&I u

- - tr ...,,_.,,

"""

a.a I

.., .1 ... ,..

r : .ai

1. , _ . ~

rr

" , 1

"'''*[''',]

r.. ~

- - . ti

1-

..,.. .

I-

.........

u-

......_l

-- ~

tm
mr

- ca u

llOtMIJ... l fl..M1..-J

.11:z1

..... J . . "111. ll

. ill

F\gur91e : A-ol~llotw

Womln1. A vtcior o/Jo/u1lo11J ..;111a.l:11n011y 1lm<1 lon1.r


10 "'' "' 1h.m" slnxl prc>Mtm, Jltu:1 M.uhCAf> """' wlw

IM co11JtraJnr tqua/llllS and 1Mq""1J1lls onc1 /or tacll


tlt.ntnl uf lhe v1e1or.

Solvln the same problem Cor dlrrerent variables

F\gur9 17: 8oMng ...... io.. ... ~

1lle docwncnt shows that lora ll'l. loan on a 30-ycar mnnall"


anda ,.yman& ol SUXlO 1)()1monlh,1ho laq:ut ,M,..ihlo 10111 i1

$97,2111.33.
With a (cw limpio changa, lhe wnc documcnt can be wed IO
IOlve Cor the inlerCll ni.e. Suppose now lhal the amount ol lhe
lean is known IO ~ $120,000. Whal intcrCSI f1llC would yicld 1
peymcn& ol $1000 pa mooth7 Figwc 18 shows Ulc an.swct.

To U$C lhe samo IOlvo block ro tolve Cor a diffcrenl Vlriablc, you
llCICd chango only the variables mentioncd u argumentJ IDFINL

Por cumple, coasidtt Figure 17. The solvc block in lhis

doc:umem sol ves a mongage problem: to find the largest


pos.Ublc loan Cor a iven intaes1 ialO and monlhly paymau.

EJ :iJ
~~
~&
]

.__.

r.

.-.......... - -~ -- - ..- ...

----------

- - ~ .

- .....

. .

..

-:,,.,~-,~:1:r;~.;:;~~ ,;::::If:'!T~2:;~'.7t~E~::j~~'.~;'.::~.u:; ~;c:;;;~~~::%~?;;:~flit:'.r~r1


Chopt 14

11
1 11

_,.......
, .......... "te

c..u.wi:

11--

,..

,.,..., 1. .:

....

..... _.!

... :.u..

i . .. ...

,.t ,.

w .. ,.... ..._, a.- ......t.:

u.

ca...

...--['-']
1<10""""'

"""'"-'

:.n..m

r::t...1.. .,.,,., -

,. 18: SolvinQ lor ... - , ...... ~go

:hangc thc documcn1 ln Figure 17 IO lhe onc in Figure 18,


JW lhese !lq>s:

First. pul MathCAD in manual mode (so you do not havo ti


start thc solver until all lhe changcs are mide.)
Changc the uess value for loan (die variable you solvcd for
thc fst time) IO thc IClual known value of loan.
Ir nccc!Wlry, chJtC lhc actual valuc of die lntc~ nuc (lhe
ncw variable IO be sol ved for) IO 1 gucs.s value. Usually, lho
old 1e1ual valuc makeJ 1 rcaooiable gucss valuc, so no

change is ncccssuy.

Changc actual loan IO actual 1and IOOJt IO /In die Flnd


uation. ThislellJ MathCADto 90lve Cor 1 insread of IOOJt.

Oo back IO MJtondllc moda ID IOlvc lhe problcm for lho


variable.

11.
.11
~::...i-- 3

!fu-~

'-l -

new

~=~
Data Files

=--

E- ~

~3
E.---~

Mad!CAD rcads and wriies doJtJ fllu - ASCil text files


containin1 nummcal dala. By reading data files, you can pull b
dala from Olhet soun:es and analyzc it in MathCAD. By writinf
dala files. you c:an export MathCAD's n:sulll to word
proc:cssors. spreadshcets. and Dlher progruns on your compulel

lf"=-- -!t

MalhCAD includcs two ldS oC functiom for readlng lnd writir.


dala. READ, WR.ltE, lllCI APPEND read or wriie a single value

J!::i:

Ita time.READPRN, WRITEPRN, and APPENDPRNrud a


whole malrix from a me wilh rowi and cotumns oC data or wri1,
1UCh 1 me rrom a malrix in MalhCAD.
t..

E_-!)

This cMplt:r contains lhc Collowlng 9CClioos:

Data llles and 1De-ca1 tulldloas


Ponnat daia files; dc.9cription

r
.

11
.1

oe

L:-:8

oe riJe.c:ccss tun:tions

Rndln& aad wrltlq amtntduttd n1ts

~.~

r:

HowtomeRl!AL>, WRITE, llVJAl'PEND

!::

Rndln1 ud wrltln1 ttnoctsrtd (Plll<) files


.
Rcodlng lrlCI writlna anays whh READl'RN, Wl!ITE/'RN.

lllCIA/'/'ENDl'RN

~-:!I

1-"

Ad'1'111111SS ol 11.ILWl'lfN nd WRITl!Pll.N

[:.! -:!)

ComplriJon o( MalhCAD 's two typea of J.lo..ICCCSI

funct.lons

1 j!t
1
~-.jj
t.f!~

Rt8dln1 and wrltbit compln data

~lin1 wkh oompleii dala 11 ~ ol real numben In da..;

E--

'
~

'~
" 'jl
..~
'~.~~~;.'~~::;i''_;;,,~
.\~\~1~
~~-".'>!r~: :'i;1~!~
..4::~''"hl1
.-'".l~. ~.
li.lf.' "~ .~ .l>;:.i.:;;.;r. ' '
ii!:.l!l.y;, ''"'
"

~....

.:;:~~\'!<!'U~. .

.;.,.,;

. - ~~,~,

. "'n~""'1!'ilW<

~liiii~&Elllilillli~~~~tl{~~~~~~~~~~=\:~(~. .. J~~rJ~~~.~j:,l'., ~ ~~ ~;?'.?S5(';3;:'!'~i''.J'.Y:::: 1 ;;v;~rD;;?T''f l'." ~:'} :T;) ;7~~,.., J:I ;>.
~

Data ml'!i ond file-acrl'Ss funi:tiom1

FUe-accew runctions

e:~

lhil IOCOO detaibCll rc..ea ClOllllllOll IO all o/ MalbCAD'I

ilo..-cu tuo...;~~ '

Tho &ablc bclow 1how1 MalhCAD'a aix filc-acccu runcllooa.


Tho arumcn1 ol ICIC functiool, lhown in lhc table u/IJ""'1',
cu be 111y ainlc variable narno.

E~ ~

1ormat or MathCAD data mea

,._.,..

be a ICX& falo 111 plaiD ASCD ronnai.


.whCAD reads filca dlll cauiJl d numbcn acparaat.d by
ommaa. speca. ar caniqo rcwma. Far eurnple, MalbCAD
oWd rcad my d dio bllowin& ASCilfonnat files:

-..

f!Uil(IU.V...)

l\lld aVllUliniiil a iliill iie.llliil11111 tclllr.


Writ a VlllJt lo a dala flie. 11 lit aiteady uiall,
niplaot k wih 11tW lle. Mull bt UMd il adeWian

~ MadlCAO dala filo -

WiTE(fUMr)

al lhe lolwing bm:

a file c:oniainin apc:rimmlal dila ClpClll'Cd wilb

111lIT&(fJltvrl : expr

cllla-acqWsUioa bud_.. INI aol\wvo


1

a -111H falo c:RalCd by priDlin 1 apreadsbeel 10 a disk file

OUlpUl Croma BASIC pqram

dlla downlolded l'Olll a mainlmmo dalabuo

APPENO(IUtvar)

column ot numbcn lJpod iDIO a ward proccmor and aved


ID plaiD ASCll fOl1llll

ibc numbc:n in lhc dala fila cu be lnieen like l oc -1.


loatin-poinl numben lib 2. 5 e, oc B-formal llWllbc:n like
1 5
1-1
MadiCAD c1oc1 not rQd aimplell
wnbc:n from dala filel ci.a-11ie 9CCtioa oa ~ lnd
mtin cornplcx dala, 11tDdo(111.ia c:lulpca, b waya io
cal willl cornpa dala).

u- ceo- .s

Appond a vlluo loan txisting lilt. Mu.a bi Ultdr.


dtliniion al lllt lclcwing bm:
UlllCJID (fJlevrl

: txpr.

liUDPRN(fll.-;ar)

l\lld a llrudurod dal1 lit. AolUffil 1 ll\llrix. Eid1

WlllTEPRN(ftlovar)

Wri a millix no a dal1 lilt. EIGh row in lhe


-a btcomeo a lino In lht dala filt.11... bt Ultd
In. dtfinilon al"" lolowing bm:

h In lht dala lle btcomot a row In lfla lllllrix.

o').

D.ITUU(ttlvar) t

lPPENlPRN(fllevar)

wcumplo. lhia lllldlll9bols ~ bDa valid U...111 a

-..trl.w xpr

Alpt<id a malrix loan uisllng lile. EIGh row in lhe


llUllltx btcomeo & ntW lnt In lhe dala lle. UUll bt
UMd In. cWlon al ... lolowing lona:

&hCAD dila filo:

200, SO

U?SJIDaU((Jlvar)

2S.12S,, 15a-2, -1,,125&15

laihCAD alJo avca dila ill ASCll lllel. Wbm MalhCAD


iriiu dala IO a dala filo, dio dala filo caolaim aumbcn
lplfalOd by
c..n.p .......

"*'a.ad

11OllCJ.D llOft /Utl (.MCD/flu) IW flOI va/Id dala fllu,


llJOM _,., kl crfQU a """1/116. JOM lrUUI U# o IUl '"""'
or oilter protrtw lltal CIWlllU ASCII /lkJ wl14 '"'"'""

1a41trJ eJtpr

Tbclc tunctiom "1aro lhc followin propcrtica:

You must iypo lho ruoction namo in aU cape.

Thc lrW11C111/IJCY<Vollhclc WlCtions la llOl cvaluaied.


lnJlcad, MalbCAO looU roe a dala fo wilh thc samo namc
ftktar. JU cumple, il lhcfUevor argumcnt ia
upenrw.4al, lbcll MatbCAD will Rld oc wrilC IO lhc file
llXl'llMNl'J>AT.

r:~

9~

c-s
1

WRffE/'RN, andAf'fENDl'RN, thc dcfault cxtension la


.PRl'I.

E.1!1
E= il

d~

1
~-
E::-1a
IE--:8

~~

1~~

Ir MolhCAD cannot fmd oc open 1 dala file, it marlr.s thc


filc-acccss funclion wilh 111 error. Ir MolhCAD lrics 10 rcad
a file and lhc
is incorrcct. it maib the fWlClion wilb

rornw

an error.
The WRJ fE(/llellOT), Al'PEND(/l/ellOT).

WRITEfRNif&levar), and Al'fENDfRN(jllellOT) functioos


must appcar a1onc on lhc lcft aidc ot a definilioa.

Each ncw equalion rcopcns thc data file. Wben you rcad
data, far examplc, each ncw equation awu rcadin al lhc
bcgiMin ol lhc file.

11 you havc two equalions in thc samc documcnl wilh


WRITE or WR/TEfRN, ihc data from thc sccood equation
will overwrilC lhc daul from thc first equation. To avoid lhia
problcm, use A.PPEND oc APPENDl'RN, which appcnd to
thc cxislin file inJICad or ovciwritin iL

E=~

El:a

bcauocia&cd.1'11- lelb you lhc file widi whicb ~


la IU<lC~. Thc lwo name1 aro lhc ume, hy ddaull To
chanll" lhc iwociallon, UJC die lllk.pl ley io u""' daw (or
whllcvcr filerwnc IJlllCAl"I allct thc WI e<wil sin) aod
typc the name ol yoor data file. {Ir dcsin:d, you can sxx:ify
1 Cull pathname includin di=IOrics.) Pr= lhc Enia kcy
((.JD ID complc&c lhc command.

tr you cnier a .flltvar wilh no period in thc namc, MalhCAD


<hoo""1 die file cx1c111ion fo< you. Por Rl!.A.D, WRffE, tnd
A.Pl'END, lhc dcfauh fl.lc cx&cn$ion la .OAT. Pot READl'RN,

Chan&in& file assoclatlons


You can use thc ruroamr command IO makc a file-acusa
function rcad ar writc from a filo Olhcc !han lhc onc tllA1 mal.Chcl
111 argwncnL Hac '1 how 10 do le:
Entcr a .file access function, roe cumplc, ll&AII (data), iD
your docwncnL

Use lhc fllrnam command on thc argumcnt or thc


fc-acccas funclion (dala in lhc case dcscribcd hcre). Typc:
[Sao) filen.- data (.J)

(Replacc dala wilh lhc namc ot lho fllo-acccu functioa 'a


wgumenL)

MalhCAD prompll you wilb a mcmo lik.o Lhia oa lhc


mcssac linc:
Variable-data, rileot......S..ta

Use lhis prompl ID assoclal1 thc variable wilh new


fcname. Variabl- td1s you thc JWM ol thc varitblcl ID

1l>c variable namc i.s now a.ssociated widi a ncw filcnamc.


Each fileaccesJ function tha! uses that variable as iu
argument now Rads from oc wri&cs IO lhc data ruc you
spccified.
You must rccalculalC thc equations in question befell:
MathCAD wiU read oc wrilC wilh lhc ncw me. Put lhc
cursor on lhc equation containing thc filc-accw funtion ir.d
prcss [r9], lhc cale kcy, oc procc$S thc whole documeit
wilb lhc process command.

--

ip::t=:,: ..~ '.;;;:;~'.! g ::~'.::r;;\~r.:~st

I'

1'>0

Ouptul'

Readlnand wrllln unatruclured nin. , . . ."

111i' W"CIM1t1 cli~ u.'l:W-., hcl'k ton~'" Ht:AO, WHfrlt. ami A.PPF.ND
lO 1r1I lU11J w111c tlntA iu unshttt.:ll1101I Jiles. An u11st11tt.:tu1cd dala
file is a file lha1 con!Jlins numben, bu1 llOI nocwarily in row1
arnlf11l11m111 .

F,

tinta n11t!t m11 hr.fnrfl thfl mnp;f'l vnrinhle. Mnlh\.A.D ~how~


lhe lllCUllge end or nle on thc StAIUS Uno anti !tops fCA<ling
dalA. l lhe mngc variable end' bcoce lhc cnd o( lhe data,

Mn1hCAD igurnt.t tho n~lta tlAIA in tfl(l lllo.

Rru1llng d11111 M'ilh tltr N1':Av fllncllon

Fgurn 1 shows IWO way1 10 UJC RE.Af) IO rcnd dala rom a nlc.

l>CPOllC>UIL MIA , _ MI'" flLI

.. :. 111*111

1 I 1 .

.,u.

........ -

.&.t.

u.-

11"" 1untinn lncludr,a two RF.AD functlom whh a cornmon


argmnent. MiitJ1CAU mls ,.,,.., v1l1tc1 hutn d.e tlalA tllo
cach time il cvaluates lhc cqualion. Foc.cxample, if j rangea

fmm 1 kl 10, tho followina t.1111nlion wlll rtnd 20 1t.1a


valucs and !um lhem In pairs:

a[j: IU:AD(ed.ata) + R.r.AD(ed.ata)

,'

In an C<Jurulon with READ anda nnge varlablc, MalhCAD


rcads one vulue ror each valuc or lhc mngc varinhlc. tr lhe

To ~ rrom a file olher lhan lhc one that marches lhc


arinblo nrunc In parenthc.tcl aller Ute RE.AD, u~ lhc
nrrnamt comrruind. Soc the de,<Cription in lhe flm .ectlon
In Utls chapler.

: l
1

~..,.,.,....,

. ........... ta ......
mmttt. IRI' ft1e.

..,.,.(,> m..m

eo.,.u nattett r.
...,...1....tat '-La..

'
eU.-(1)

M..lln

Wrltlng dala wllh lhe WRJTE nnd APPEND


funclions
Figure 2 shows how IO use lhc WRITE funclion IO writc dala ro a
data file.

' "'
1lof'il'h,,> 1 :l.m
lt..-c.tlh .. ) 11'.3"

"""'

11111 flLI ITD

Figuro 1: Tho READlunctlon

Thc first READ equation defines N u lhe fint valuc in !he dala
file Sf7.EFILE.DAT. Thc occond RF.AfJ cqu.ation fill! lhc array y
,.jJh lhe first 100 valucs in !he data file EXPERMNT.DAT.
Whcn MathCAD rcads d2la wilh lhe REAIJ runction:

F.nch ncw e<untion mox:ra lhc lile and .i.1n reitdinR fmm
Oic bcginning.

.-

ne

DOTA lal

~1-~
,~

,f.

~"3

E -:3

t:::~

~ -~

~~!~
E-~3

=I~

...

~:.:-._ ~

ne -

r111

Jllltlhl.tlte) : fl

' :....... 1
1 : l.'llt 111. ,.,..,
1
nct~:

.~.:e

~~

:.

~!-B -

E~-

d.
.A ~

Wornlnr. Yo can111~ rNd two sou:cuslw StU of data from


tht sn'"' fllt by u.rln( ,_ ""'""" READ tquatlol.

Agu,. 2: Wrling dota wtth fle m!ITE lt.nction

t:;":--. i:::!

1ll

11
Data Fil,.

Thc !lrst WRfTE cquation wrltet a slnslc valuc IO lhodala file


!r/J!l'llJl.l>A T. TilC ~)lld WRrfl! cquallon wrltel many vah>CI
IO thc data filo llXPl!RMl'<T.DAT, onc valuc Ot eath volue O Lhc
rang~

varlnhln 1.

When MalhCAD wrlte data IO a file, lt l<flanues succealve


clI value. whh 11111Ces. MathCAD abo ln....u Une brukt IO
kcep the Unes shor1er than llO chanelen- When you - WRm,
ali valu ar uv11<I tn lllll ni whh maxlmum pm:IJlon,
rngardlesa of thc global fonnal or lhc documenl.
M<1thCAD l(norn 1111/11 w""n lt wrt111 tla1a lt> a Jolofllt.

Llke lhc READ funclion, lhe WRITE uncdon ltlOllClll Jhc file
and
at lhe bcginning ror each ncw equation. lf you wanl IO
wrhc 1lntn to a file nttn ICVCral dlrrcrenl cquatlon1, - tho
A/'rt'.ND uncllon ln!tead o Lhc WRITE unctlon 111 lho ..:ond
and snhsoquenl oquallons.

tart.,

Womlnr.lfyo rut 1/ltWRITF.{Uttcllonon tht-{l In


tw0 uparott tquallotU, IM tlatafrom 1/te ncoNltqNOtlo11
wlll ovtnvrlte the data {rom the jlrsl tq111Jtlon.
Figure 3 shows a document lhat reads data from a file. pcorms
llOl1lC compulations wilh lt, and wrllCI ll IO llnolhcr lile.

. .~

t\jfi?IJdfibi.

-ir wa .. tn

to

Dota m1

?.
J 1'

....
,_. " ' - , , . ,. ... n1.

l llMCl->

'I _....,
w ,.

lltM(lll

.-.

........,. __

...........................,.

J
tttt..0 : - -

FlglJ'9 3: Flodlg """wrlllng dota -

.......... ....-lt . . . . . _
lo,; tala fll

_ ,...

Ch..- u

in: and wrilin: structured (PRN) files

...............,

lion discusses how 10 use READPRN, WRrl'EPRN, IDd


DPRN IO read IDd 1Wilc dala in llnlcllltCd fl1ca. A
:d dala file is a dala file with a fued numbcr ol va1uea
For cumple, if Y<JO priot a rec:ranular atta from a
ltCI imo a file, thc -.Ilin l'OW1 and c:olumns ol
: wiU be a 11n1ewrec1 me.

- - ""' llllt ........

.2S

l.!lt

.n

1.11

.r

1. 111

.!H 1'. 33

.11 IZ. 11

l.I

LU
L46 U.'3
:1:1. K
~
~R
Zl. 5
LY U.T.I

.... ~

.sz u.a

"

... :H...

1: a matrix willl lhe READPRN function

...

Ln

L1'

tl.'3

K.K

shows a file o! '*a aeued by printin a srcadsheet IO


e. Fiurc 5 shows a MalhCAD doauncnt tbal readl 1bat
' matri.l..

U.D

u.a

'"
u. ..

... M

.......

...
...
.....,
.... ..
.... ...
1. n
l.U
5.46

l.

ILU

f . IZ

r.u

U.

ILO

~ ~f!

o... ru..

e ~

J '!3

-i 18

,.-~

..

191

To rcad from a lile olhcr than thc onc lhat maiches thc
argument or READl'RN, use the ruename command. Scc
the dcscrip1ion in the first scction in Ibis clusprer.

~.,=-

~!i

Warntnr. Each liM 111 the dala file wwst co"'4i111he s~


11wnber of valuu. lf-you leaw 1aps orla/ values liU ERll
where MathCAD upects number:, the READPRN/W1Clio11
witl no1beable10 rtad 1heftle. Ma1hCAD tk1enru11u
where one number ends ONi the neXI begins by lookingfor
space:, commas, orother la/ thal separa, the number:.

Agi.ftl: ~ ~doialnD ama.U

Tho READrRN f wiction n:ada lhe enlire dala lile, dclelminca


the DIXDb<I" o( IOWI and coJwnna, and CtcalCI a RlauU from lbat
dala.

W1- MaihCAD rtada dala wllh the REA.DfHN fwiction:

Bacll lllllalK:O ol lho IU!ADn.N function r-i. an '~


dllafilo.
Tho Rl!AJJrRN funclioa lnoru anything Ollior 1111111

DUmbcrt in dio dala lile, includin rext labela and qllOIC

-u.

-.--~

All linca in thc dala lile mu h.tvo lhe aamo numb<I- ol


valuca. (Linca containin no values are igllOR:d.) lf one lioc

bu fewcr or more valucl, MaihCAD will retum 111 emir


mcme.

Tho l"Cllllt ol readin lhe dala tilo is an "' by 11 malrix, where


., il lhe numbcr ol linea conlaining data in thc lile and 11 is
lho 11wnb<I- ol valuca pcr lioc. To defuic a ma&rix ol data
R:lld from dala filo, llSC 111 equatioa liko thil:
JI ,: UADPIUl(LJlevar)

Do""' iw :Mhscrtpu o~ M. RBADPRN l'CIWnl a mauix, IO

. llO lllblcripta ~ ncccuuy.

~:; iil
F~m
~:- l

~~!~
~d!-j

~ !! :8

;!!=J! it

Lil~

.. n 111C "-""- wa

r. . . .

llAtlMli a r1u urro 1111

: llADI~
.T1
.H

. ff
:J. IZ

r."

1.11
l.M
ll.:J:J

U .UI

l.U
l.t5

'
J,U

4.4

" '3

1. a

a:i.

D .S

' " a.u " n

"" H .et U .

t't.t.l

... u ... '" .

....
... ....
1.Tf
l.14

..

J.12
l . 7'

,_

UI

1.n
l .'3

.....

J . ll

1 .111
U .XI
ol. 13.82
1 ..

14 ..
U.41

~ 6: M&igning 1 vorlable 111 -

.e.

....'"

S.Y
13.K
l.fl

1.~u

1.11' 1. m

1. !l51 1. a 1

1. m

-e.

..:si'

1. 11' 1 -1. 11' -1 . ..,


t .7'3 1 - 1. 7'.J -t.as.l
L:Jll U .. :LIOH 1. 351 1 l.351 -,1. lllH
1.m " ' ._.,.. 1.m 1 .z.m '4. "111

t .1'3

z.m z.m

1
1

:e 1

1
Agt.n 7 : Wriling doll 10 a A"ucand dola IN

>

I I.

C\ICNll. . &""'91&.rrt
1
1

<l)

<I>

. ..

1.sn. t.'511

'l '""
l . .n
, TU4 Lt\..U

'511
1 . MJ'I

L9\.ll

z.is11 J.IMJ 1. -.1


1 L> <,Ml 4.MI

1 . sen 1. m 1.-t1' -t. wrw -1. 1511


l . ln.6 Z.~lr-tlt. - l.I~ -l.'19.11
""-" l.~""4ir-U -Ln..M -t.r.u
l . lSll 4 . ............. -z. l".ll -J. 9MZ
-1.
-4 . rJ

l.,.,, . 1n r. tl'

t.,

Q)

. .ti

l+-~i1

. . . .. .
.., l

RIPllaf-.l

_....._..........

...
.. ...
- . ..
...

1 :

J ,. 1 '

Somelimes cach c:olumn ol valuca in a data lile rcpresenll a


diffcrent variable. Figure 6 show1 how to use sup<:JJCriplS ID
c:reate a vcclOr from cach colwnn in thc data lile.

E~~

9Vfltwe ........ ...


1.11
1.11
l.IS

- - - ----- ----- -- -- - ----'.'~~----~~~~~ .,.~ - ~ 1 ... :~.';?'..:Lc-;2:::L:i::;:J:"J.~.: ::~'. ::: ~.' .f. -

C"1CAD

~...
1'. '3

"".

11.5
U .T.I
ff. '3

...

colWM ol dall "1 1 dala filo

Wriling data with the WRITEPRN and


MPENDPRN functions

Agt.n a: Tht -

Fiure 7 shows how to use thc WRITEl'RN fwictioo to wrire


data IO a SlruCIUrCd data file. Fiw-e 8 showt lhe resultin data

Unlik.c thc WRITE fwiction. the WRITErRN wiclion wricu OUI


lhc dala in columna.

fc.

do 11e"""'

AQ<119 1

.l~a~
1 ,,

mszawao . a

ca u ;ca :a a .. :

e a cp&X\Mft

~~~~~~~~~~~~~~~~~~~~~

.... ~ . ~ -- . . . ... .-......,~ ..a..; .. ~~

"il

~-

'
:;-::

.___.__

...

--

.........
194

.....

..

~;.

Choptetl5

iVhen you use WRITF.l'RN.


Equations using WRITEl'RN must be in a spccified fonn u
follows: On thc Id\ should be WRITEPllN (tilr),
,.1...,,, fllnnr is variable name. This is follawcd by 1
ckfinitHlft ~ymhol (:"'")ami a mntri cxpre.~,ion. Do not u.u

'"< wirablts"' Dlbscripts wllh WRIIBPRN.

Each new cqualion wriu:s 1 new file. t two ttuations write


IO thc samc file. the 9CCOOd cquation wiU ovcrwrite lhc fst
cquation. Use Af'l'ENDl'RN if you want IO append values
10 Ole lnst.ead o[ cm:rwriling lhc file.

The bullt-in variables PRNCOlWIDTll llld


f /lNPRE.ClSION dtU:rminc lhc fonnat o[ the data file thal
MathCAD crcates. Thc cumnt value of PRNCOlWIDTH
!pCCifies lhc width o[ the colunuu (in chanlctm). Thc
cumnt value of l'RNl'RECISION specifics the numbcr of
decimal places shown. By default. PRNCOlWIDTH 8
and l'RNl'RE.CISION 4. To changc thesc values, entcr
ddinilions in your MalhCAD document above thc
WPJTEl'RN func:lion. (Sec Figure 9 Cor an cumple.)

By using lhc augment funclion, you can ooncaienate scvttal


variables and write them all to a data me. Figure 10
demonstrates how to do this.

l :. "

.a~l]
t
~

111111t ta ..

u.r--co- ttt

ttl:rfttrlp) : ..,....<....-et<x,1J,ll

TM datafl/u cr<ottd by WRITF.PRN can~ rtad by many


sprtadshuts aNI word processon.

l :a 1 ,, I

t.J ,. lh[J ~1
... ,.1
......
,..
-um

J :

1 '

l.. --

.. . .

l.'181
1.1~
1.11' l.'JOl
l.l'U l . llSl Lm 1.7'3
l . :XH 3.0H :a. .. 1.351
l . .,, <.m
1.m

'-'"'

1.1~

1.1U
~t.~l

l. .,,

-1.m

-2.911
_._
,,.

~tltM:I

..
--

flo<_. ~-A docunWnl lhlC .,... . a dlll !le wilh 10 _...,.. oolumno

ond, _ ..

p1.- o1 ro-m

-~

11~...w -~

-111
1~ =!!
1 ~,.

',

.:!3

IJ iij
11 .
.i

~,..

! ~-~
- 11 .

I~~
1

P1tCDUUlfM : 11

llU'WtC---'' !.

ui 3

l!~]i~

Figura 10: Wri11ng MWral oooc:alonalld vacton

111"" a1ll'.1\llD ""

!!i

' 1

11~~~~

~a-~

~~~

'.li-~

1-1!
11!

.. Ultlt nu:ti.mt tntA

,.. ..t. te u-

~;~r;:

~ ~! ~
~J.

1 !'- M

_J

'~.:::::ii

t ~~~

l .

~.:~~ ~- ~ -. )?.L;:.{:..:;~~'.' ; ,.,,

+*

ww,s&

Advanlages ufusing READPRN and WRITEPRN


Matl1CAD's two sets o( file-access functlons are approprlate for
differcnt situations. Thi! sec:tion des:ribes whcn to -l'RN
runctkm~ and whcn not to.

Advanta:es

or READPRN

RE.ADl'RN is genmlly prefenble ID READ. When rile dala


values are rcgularly Usted out In columll!, READl'RN brings die
data inio MathCAD in a readily ecccssible fonn.
RE)J) i! rt>quired for mes where the dara for a single vlriablo 11
a:atiercd across sevttal lines in the file. Onc cumple of suc:h a

me i! lhc files clCat.Od by WRrTE, whcre there are u many


numbcrs on each linc u will fiL
Remember. use a Bllge variable subscript IO rcacl wlth R/!AD',
do not
&'Subscript toread with READl'RN.

use

Wlu!n some llnes In a dalaflle llave more dala wJ!sus thtut


01/u!rs, sorne data wJ!sus may ~ mis.rlng. Uu a tui tditor
to rtplact tite misstng WJ/sus wttli U!TOS, titen MU
RE.ADl'RN.

Advanta:es

t ;s1-+t:&t1ww 'Hfi-&;>A@:,;;; ..;-.., I

Reading and writing cumpleJC data

This oectJon des:n'beo wt)'1 to deal wlth complcx data In rcadi


""" wrilin data files.

READ and WRITB


MalhCAD will tcad and wrlre only tt.a.I numben to data files. L
you use WRITF. IO write a complex numbC< to a dota file,
MathCAD writes,..., numben: the tt.a.I part and the imaginary
pert.

You can t11e twoREAD statemenu in a single equation IOtud


n:al and Umginaty pens of data in a dara file. Figure 11 shows
two documents. one thlt Wlites complex data to 1 file In
reaVunaginary pain ni another that rcads in the same data and
reconsttuclS rile oomplex numbcn.
t w tf!

llj)llW.:111

.... t'e

Aat.

-.I .... I U. ..._,.trte' Mf'IUle

n1 ........... .tu. u.. ""tui. .

ti!

me-.> :.

J
nta - - t..... ta I ....111...,1..., ,.,,..,

or WRITEPRN

WRITEl'RN genemlly produces more JCadable files than


R-.ADf'RN, ince lhe tinta vah>eJ.., ncatly llncd up In rows md

Mf]

llllft!l!lil
~

'-La t ,._,,.., ... ,~ ,..,... r.... .. ._. tu

....,.ht.1.

.u\ .._ ..

columns.

U.e WRITE lnstead of WRITF.PRNwhen you want to crowd u


many valuc~ as possible into a anall data me. Using WRITE,
Mall>CAD acates data Ole with one space bctwcen cach va1111t
1111d the ncxt

M<m ttxt edito'S can read files created by eithcr WRITE or


WRfrEf'RN. llowcvcr, WRITEfRN Cllll tn'lle file1 with mon1
lluan HO t:olumn '""'' llnn. Ir )'C" U\AI ntllll t:an1MJC ...,..,, nlM
wlth more tl1an 80 ooh.1nns ptt Une. use WRITE. Altcmatlvely,
u>e WRffF.rRN and 1CC rRNCOlWIDTll In such a "'Y that
dota llles are limitcd to RO columns.

: SM<J .. ' . . . .,

"'- ,..,.. . _,_ .... _

............. t

1 l..'"11 11,. ~[..'"1]


f'9n 11: ~ n!..ntng oomptu-

READl'RN and WRITEPRN


WRrrt!l'RN wrllCI only real numben IO a tl.w Ole. Whcn yoo
wrlic a complex !Mlrh, each column in lhe mui> becomes rwo
columno: cno repretentina the real part lnd one 1he imagirwy.

<;\ '= -- -

o.>

(O

(/)
(1)

-...

u..
e>
e
.;::::

-co.

1
.!

6! .

:::!

..- ~.. ~ ..~

t"'
.;:

...

!I

:s:
"'
....

""
"

..

-: :::~ .. .:_ '\


:..
y '.~;:,.).'" . .
.... .. .-....

..- .;..;.. _

....

-'~

)(

11

.____::::.__,

.."'

..,.

In

11

..;
"'

"'
1 .,.,
"'

.!

'

,.,,. ,.,,...
: ..
..

.!

fil
2

fil

1!I

.
.!

..

s""

- ---

..

i
1

:""

fiTE~

ri 11 --

.:J 11TT-a 1
1
.... """".. """".. ""..
i
"""" ,.,. ,.,. "'"' f
.h
- llT

;
.."' .... .......:.11 i'

l -i ::*

'

:)

: ~ :,~:ti:~~ktL~,~J~~ :k::&J~':~2~:rl: __r~ .~

1 !

~1
gJI

i. jj
J~! 1

-!1

j~ -l

j:1

;i~ 1~

ls"' J

i-

~ 11 ~:

. 1ii~.!

)(

X
11

:a:.:. .

l~~-:;i

!-

Plots

ll. :..- 3

t::

1.1 !=!
1 1-

:":J

I! ,
11

i1e;- !9
1 1~_] ~

MalhCAD plou 1ni bolh -ne mld cuy IO u... To croo., a


ploc, jlll lypc me teystrote: . Thcn fill In the placchoklen ror
hal ~ lkJI and, <~~Jonally , ula llmha. A M11hCAO 1lucum<>nt
can hold u many dilfcn:nt plou .,. you w111L

.I~

Plol3 ty,ically havo an opualon or opreul<"11 whh ""I


variable oo c:ach nis. MalhCAD plots one polo< ter cach valuo
ot the rane variable.

.- lll
!~

ili ~
11

-a

:1~~! ~

ll~]! .~

: ~!~

,r;;- -UI -:::

1 ~ 11 .!!!

.~ ~!r1 ;;-

~.l:.. .~

,. J!~
l_I

l ~'-:il

- n

Once you've crcatrd a plot. yoo can lonn11 ii IO 1vur liking,


1etting lhc slze, grld Unes, ,Wing, and plot symbolt.

Thb chap!Cr describes how IO create, use, and formal MalhCAD


plots.
Thls chlp<er contalns the lbllowlng l!lCtlons:
Crutln1 a plot
Basict stepa In aeadn& a plot

Whattoplot

Ho ID plo! dltfermt liods oC c:xpressiom


Axis llmlts aDd aatoecana1
How MalhCAD tcales plOll; choosln yoor own aili limilJ
Formattlna ptoll
Changing plo! slze and type; loprithmlc axes ll>d grid
Unes; global ple< formal

- - -- .

- -

...

~~ifi;at~rJ\,,..1 ~,,,,.,.,,,,.,. ' -~. " '' " '_,.~!. fAAm~:iC[:S:tmz,,,;~;;j;.~:?L. , r

~~~~~~~~~~~~~~~~Oupur~16 ~~ ~~~'..____~--~~~~~~~~~~~~~==
Whattuplot : " .-:.
describe
to
on tho plol uca,
E: -s howfollowing
Uu IN
UyfN INOJTOW UyS 10 movcfrom
rrJllni: a plot

auioscaling
and how to ch.ante Ule plot
[T&.bJ

plactlooldu IO pU.Ctloo/der ll1td define tltt plot.

a plol reion, prcss the alsin key (t). MalhCAD


""' .. ernpcy plot wiah placdloldcn (Fiwe 1).
CrallC

Fiauro 2 sJiows a typical plot with lhc placcholdcn fiUod in.

..1

~1_.ru

:o

'

1 1 "

, ,...+;] , -[,;]

"

E- ~~
E~

flQin a: MalhCAO ploll a u...o..1g..,.

1n1:1'119m11CYploC

lho plol, fill iD de placeholden:


Tbe placelx>ld dio middle ol dio bcrimolll axis belda
dio variable 10 plat apinst. l!.olct 1 mop Ylriable, a
aiblcripled v8riable, ar uy odler cxRllioa lor dlil uis.
Tbe pllcdlolder dio middlc ol lbo ~ UI bolds 111
c:iprcsaiou ID plot. lial.a' a tmp vsiablc, IUblcripccd
van.ble, ar 1111 odia" oxnaion Car 1bs uis.

Tbc olhcr rour plac:dlolden bold die uil Umiis. To act u.il
limiu. ai&a' nwnben ar acalat oxnaiooa Car lbele
placeholdtn. lC yoa kavo 101110W.1imill blank,
MathCAO wW ICalc 1ll09e lillliu ll()!!!Nically.
1 aa with an cquatioa, MaihCAD will not procca a plot unli1
~ prcss

}11

Wcml1. MmltCAIJ plou complu nwnbers occordlt IO


wir rui/ xuu. T1wir ilnagtary pam are lgN>red.
U1111 oU. Ml1llrCAD provldu a quicr _, w Ulltr a
pi: istud ofprusbll 1 IUldJIUlllt t tltt bkutJ:s, rypc

y-xi3 e:xpre33lonlx-xl3 expre33on. TllU


OYO hav1A1 /() "'w tltt C/U"SOf /() tht y.axis aprUS)lt
IUld wail.llgfor IN plot-oz W rtJraw 1U )'011 UIJU toclt
cliarac~r
tltt y..azts.

"

lfyo11 uu 11tt eq/llJdo ollloff co'"""1NI w""" offa plot,


/rlalJCl.f) fruus t1tt p/ot display as show1t. Tltt p/ot wiU
""'rejlect any clianges lftOlk tlstwlttr1 t IN docwrvltl.
Tlit vo/Jus ilt niclt a "/rou11 pi art Ion Vyo saw and
load O doc11tntltl COllllJUliltf /t.

.., ~:'....\.,: , (,.,,.,_~

;1 !

pul

spccificatioos.

Each U1IU on a plOI dependa on a range variable. 1l>c rango


variable musi appear in bolh the x-uis cxprcssioo and thc y-axil
u prcumn. Ma1.hCAD plou onc point lur coch valuc o( thc
range variable.
ThU scction dcscribcs various ways to ux range variables oo lhc
UCJ of a plol.

Plotting a runctioo

E_ 3

E
><

what

works,

Thc casicst plot to creaie in MALhCAD shows vahJCJ o( a


(wiction ovcr a range. To creai.c 1 plol lil:e lhis:

... IV

sccti005

e~
E--~!J

Thc

La
1

Define a rango variable t lhal rangc> ova lhc valuea you


wish to plol.

Define 1 Cunctionft)

PIOIJTI) on thc

y-uis venus Ion lhc

X-&.\S.

FiJWC 3 soows an cxample ol this bnd o( simple plol.

c:!J

E!1iJ
~.Ja

1
~:li
1
E!.~

l'\.Ofl lll; . llJOllll

: -11,..,. t . . 11
1

na> :.

:E:2J
-u

g!:a

li

11

d~
~
~-r
!
_ _:__________________._,__40_1.Z_l~U"ta_....,J~-- ...._________..._--------------------~~~-

[r f Jar, in llllOllWic mode, movc tbe cursa out ot tbo

poo. Whcn MalhCAD socwca lhe plol, il dra.,. one poiDt


' cach value oC cach rme variable in lhe ~- ar y-axia
prcuions and COlllCCll tbe poinu wilh auaiht U-.

----.-

f\gln 3: Ploai>g Mcdan

~ '~:-:-. . ,.

.:

,,,,,

' ' .')

" ''''" .. ,, .

.. ", :.

..\

\.

202

Chopter 16

Plotting a vector o( values

Figure S shows how ID plot two vecton against each othcr. Use
this techniquc wh!ll thc IWO vecun ha'-c alleady bccn
romputed at thc point whtte you want to malte thc plot. Both
veciors should be the samc lcnglh and in thc plet, both must use
the same rangc variable as a subscripL

To plOl a vector, yoo mllSt use a rangc variable as a subscript


dial runs lhrough the clemcnt.s o thc vector. Plot thc rangc
variable on thc ~..vJs apin3t thc vector, wlth llJ rangt voriab~
lllbscrlpf, on !he y-ui!. Thi! ploU each point in the vector
againSI the value o( its subscript (Figurc 4).

NT!lll: M ICTOll

1 '" 1 ,.,.
1

11<--

l : . . JI

! ..a

l\Dlt DC A ICTOI

~~o
-o.
$.

Othcr applicatioru might compute x and 1 indcpcndently from a


thlrd variable. ~ long as thc iwo vcctors
the same rangc
variable, you can plot thcm on !he same plot. Figure 6 show1 a
polar plot where both z and y dcpend on other variables (r and

""

O).

t r .....
1
1

~[QJ

11 ~=

-l

' -El

.: 1

!e~! jj
I~~
:;!Ji

11
l~"'l-3

,.

:~!.~a
,-

Se..enl Hx.ls expreaion orenas tevtt'al y-axis exprcssioo


1lierc must be the sane numbtt or cxprcssiont on each
uis. MathCAD pi-Ola one 1r11ce Cor each nwching Y pair
Eooch tnllehing pair mtlll slwe the same range variable, \><
not al1 thc cxprcssions nocd slwe thc samc rangc variable.

1 ,. 1-rL1

l! ~--a
.=.s

E_:.-- .8

Agurt 5: Plo111n91WO-.

Warning. Subscrlpts tnJLII bt porltlvt lnttg<rs. (lfORIG!N


subscrlpts must bt grtat<r than or tqual 10 ORIG!N.J
Thls mean.r tltat tht z-<UU variablt iutd In a plOI /t
Flgun 4 can run throgh wholt-nW?!Mr wilurs only. lfyo,.
"'""'to plot fractlonal or ntgatlvt Wll11ts on tht z-<llis. plOI
ofMllctlon, as In F11wt J, or plot two w:ctcrt, IU In Flturt

' : 1 "

, -r.1
rl

t : Zl -

~[t- :11

I~

1bo z vector in Figure S il a llst or evcnly speced valucs. 1bo 1


vall>CS are romputed rrom !he x valucs.

~: ~-

R ! ZI

To plot tevual yni! exprcssions \'Ct!IJS onc uis cnssi01


erittr !he y-axis cxprcssions scpented by commas. Ali thc
cxprcssions should use the samc range variable (Figure 1).
1i"'El

[)a&'lt4!1l!

- - Oll 1-IS

l\Dltl!C -

' : 1 ...

,' ,. ,.. [,]..

: ..... .. . -J

i' ~- ~

~D
.

'

~11

I!; "" ~

-=~I !t

IH

lt.otflll: M ICTOll Cl>PWVID ll'KPl!lllllfU

r[..l! i!J

...[.. ]

!t . lt

.l

Plo11

r ti-~

Plotting two vectors

To plOI valucs and lhcn U9C them In lacer calculations, you mtlll
ston: lhe valucs in a vector. lnsttad o( plottlng a Cunction, as in
Figun: 3, calculate a vcctor of valucs and plot thc vector. Thal
use !hose samc vecta valucs in Olhcc calculations Curther down
In thc docwncnL

:~~

Figuro e:TWo ..aon comput8d lndopldondy

Plottlng other expresslons


Figures 3 lhrouh 6 show :101110 or !he most coounon 1ype1 oC
plots. Plots are not Umited ID following thcsc cumples. You Qll
plot any two cxprcssions against cach other, u long as they
&harc the same rangc variable.

Por cx.arnplc, lf l Is a rango variable, you c:ould plot f venus .rI,


or trw; venus /n(CI). Thc only resttiction il lhll dio two
cxprcssions slwe thc same range variable.

Plottlng more than one ex:presslon


You can plot sevttal Unes on dio SlmC plot. Each llne la callcd a
tract. A plOI with multiplc tnlCCS can be in cither of lho
following forms:

One x-uis exprealoo venus severa! yuis exin:sslons.


MaihCAD plots one 1r11ce ror cach yaxis cxprcssion. All
cxpre..ions should share lhe same rangc variable.

t .. LI. -t..S

J '

'

~-

-4

f'9n 7: PloC- nUlple , ...... _..,.,.


To plot ~ lndepcndent curves on lhe same IClt oC axes. ~
two or more cirprcssions. teperaltJd by commas. on thc -u :1
111<1 the same numbet oC cxpttMlons on lhe r axls. MathCAt
matches up thc cxprcssions in P9in - fir11 x-axls cxprcssi<1<1
with Clnt y-axis expr-cssion. lhe ICCOlld with the 9CCOlld. mi
on -111<1 dBW1 a nce f<r each pair. Each ma1etun1 pair of
exprcssions should me lhe samc range variable. Figure 8
111cumplc.

"1

.1P...a

~'
11 ~1fi~

------------------------------,

- --- - - - ----.........-.-- - - - - -- -

-~.----~----~-------- - ---,---.-,----_ - ----------

~-----_ _!
""""

Nn-----JI 1 ..

IUll1"' -

t t -11.-t.t "

11

l ..... .

'

, .. ,tJ

.B

I a

-ii

.... .

llllUt"""'

lorlz.ontal and ftrtlcal llnu


you plOl 1 number ar a tcailr valuc on lho y-uia venus a
110 variabla on lbo a-uil, Mad.c:AD wW drtw a borilonlal
.. "lhM vaJi.o.
ia uatW
lloc:; oo

a aoatinc rcecraico

' /( s MSUQ//y 1111 UTD' ta "" ,_ dl/Jtrtltl r111111 varlabks 111


' l/w same ITOU O O pkJl. /f'JOll llU IWO fOllll variables I
'tl same ITOCt, MOJIGW pWu OM poW/or toclt Wll11t o/
<!OCAi r111111
FD' uamp/.t, VI r011gts vouglt 20
polllU Olld j lltr"llt JO OAd 'JOll MU bollt TO/lfl -1ablt1 I
llw- IToct,MIUICAD trlu 1oplo111 takJI of(J()() poiltlS.
/1 Is, lto-r, ptnnl.sslbl110 ..., dl/Jtmu rait11 Wlrlabl4s

"""""'

I '4/ft,.111/TOCIS04 IJv IDlnl p>I

o crcalC a 'IUtl:ll n:fermce Une, plot 1 nap V8iablo oa lbo


-tala a oumber or alar oa lbo a-u.la.
pe 9 abowl plou wilb -.ertical 1114 borizomal linel.

Axls11mllsand out05Cllling

:rJ:

~ca
" . "'

To changc 1 fixcd axis limi1 IO an outouled limot. movo lhc


cunar 10 the limil aiid uuc il wilh [BltepJ. MalhCAD
lcav\:$ 1 placeholdet oo !he axis limiL Wllcn you rccalcu~lll
lho plOI, MalhCAD automatically 11Cales tlic missing ui1

vaJid ICal.v exns.slon u 111 a.ili UmiL

.& I

...['a]

:.--

'

.. J:

1
1

~-

.&Mal 1

-"'>.u.
11hl(1). , . . ,

Flgutw 10: PIOlwlfl ~ .... -

U )'OU UJC aui.oscaJin, kccp lllCIC CaclJ wmind:

Auioacalcd plOl.I Clll takc up IO IWCO u.loo IO compulC u


plou w~ yoo spccify lhe axis limiu. lf you want your
plou IO compute more quickly, set the axis limilJ manually.

AulOsealed limiu in indkalod on SCZ'CCll wilh balC-braclceU


undct lbc awoscaled llUlllba. (Thc.so balCl:nck.cll - not
ahown in prinaouts.)

When aulOSCaling, MalhCAD .calca lhe axis m that ali


poinu are visible on the nph, but the uppcr and lowcr
limi11- n:lativcly round nurnbcn.

AuuilC&lcd a.da limi11 lb nOI show dime111ion1 unlll of


measurcmcnL IC you plol dimensional valucs, lhe nurnbcrl
shown are lhe corrnct magniUKlc ot lho buo ayllCID ol
uni11 dcfmod in your docwncnL

'

$_,%,4ffAiiLpC;&.11..40?PJlfk
.~41,~ P.,....f.!.
\*-ff'rfrfkt':'!5!t't''.~ e#~4.
.
t. ,,
, " -~ . . ... . .

.CA&Alu:n.,,,._..,.:P.W,;t Sl:t~~

To chanc 111 aUIOllCak:d lllis limil IO 1 fcd numbcr, f1I11


lllOVC the cunor IO lhc limiL 1llco lypc in 1 ncw limil. Tbo
new Jimia rcplaccs lhe oulOIC&led limiL To erase lhc
11110JCalod limit and lcavo a p~holdcr, lypc (Bltep).

Asu UmilJ need nOI be aimplo numben. You can cnter any

1 1

;. t

limiL

n.or

OUIOllOll.D

~:~

fr

IC you lcavc an u i1 limi1 blank, MalhCAD computes and showt


a>proprU.&c limia lor t11A1 uu ouwmaticall y. Thi1 IJ callod
ouwscallng. Fiurc 10 Jhows a plOI in wlch ali rour axis limi11
..., aulO<ICalcd.

..

~~
cle

'

111

Fr:i~

ot

dea:ribcd 1a me acclillll "FonN.ainc

lou.. die aid ol dU c:hapw.)

Ploll

:r
~

loU. (To ldd evcnly ~ar lopridlmically lll*Cld rid

- rorma1 me plOl

,1,1

rv-e: Ploot _ , _ . _

AJJ w 1raus
plot U!ar1 IM a.W llmlu. For 14':4
a.W. ali uprtuUN""" ltVu IMt IUS
co1"p<Jliblt .Wu.

"

'

'

11""9l:Plol"' ........._ _ ... _ _

nu

J J J

"'4

-r
~~I

el[JJ

..B .....

-ii

..... ,t .

"

.,......

.,... l.& I

-ii

-J
11

~f

il.1 J~

1 ..... . -

'

- - . , ......

16

. ,

~-T

--------- ---

~ .

: '

~'.:;):

. . . ,

'. : ,

. )' :

-~

-- - --

- ----~ --

~~: '';~---~.~;~~

. \ :. . .

...

. .(

<.;'.'.}/.'~!~>;:::~
'""'"16

206

Fo1111111tlng plo15'. ".'

,i, ,i,..r:1~\.,

... ... .

Whcn you crcaie a pklt. you can change lhc sir.e, show grid
lilld, !CI lognrithmic Jealing, or ch111ge the plot symbol by
formattittK !he plot. Figure 11 shows a plot who~ sir.e, axis
scaling, and grid lincs have bcc2l changed from thc dcault

Chnnglng the formal for a plol


To format 1 plol, pul ti>:: cunof on lhe plot and typo f .
MathCAD shows a plot spccilication on lhe message Une, u
shown in Figure 12.

Ollnat.

PLOlllJ:

J h 1 .. Sl

, ,. ol+;]

! . 111

1 1 I l . K

: 11

..+;J .tl

.J ,,

f1I)

lllCTOll

-,..;]

- ::_ -14l-l:t41111dmmll

Plau

E-. ~

11111 b the me1nln1otthc1ymbola In lhla 1pocilk:atlon:

E- s

, :!)
i:-

~!3

Jocoa.y,1

... 12, Not ''*Jtfk.tlon O mueu lloe

Rgt... t 1: A loga1~ ocolod plol

Matl1CAU will rt'.display tl1e plUI IO rellect ti.e 1iew


rpecilication. Note that for lop, aubdln, and sir.e, MatliCAO

....,..

1l1w1 pairo i1' numl><cn: Ont lh<I y ul1 p<iCllkallon, then tllll
0

~:

""'JMIPOI)

cl lllo pmious C)'dt.)

...Jd-y,1

- 11 -

U you change 11111.ls rrom 1og 1a linear JCallng et.;

_,., MAtliCAD prompll )"Oll IO rculculale lho p!Q

'

S<.tdYiOIOl. A1i"""""' dollrmineoy:ull;


oooond nutnbof-- ..... loltMI:

""' ~ ul""' runbor ~lllo

""""'"' .. _.., tpaood dMlionl.


l,flo~...... nogril._;
n."'->l, cMloofloulo..,r.iin..-,

l'or loa nta flil numbet ~lllo.....,.,


el~ pettlfda. On 1 log ulo, lhlo Mlino
-hol, 2, tWI,

m..,. ona llb:ht>n par qdo, hlllny 14>

l'loC..,...,..

DOI. dol kJ! -n po1rc.

Yriij ;; '

horllorUI .....

'

I'*" ..

lm! bor. H

lwO at m<ft inc..

"""bot thwn tom lht .,.. 111 Mm'l<I

n; a...1. O... biif IO Oldlpo1n1

1u

'"''

Ono Xol\OWl'I lor Md1 port


i'1ronnododwt111h<.

-o;;~ 1lgn ll 1o1-i> 1..._

........

o;;~ ""'""'lor -"pon.

AOC18nllM oonno<10d ..,, ....

Each llllor ~ IO ona hc:e on lhe plat.


Tilo 1a1. . n inlttpreCld ~ 10 lllotalllo el
ple! lypoa llwn In,,,. tibie .. rtilt.

Sn\11 <bnofld ""'""' lol - " port


bllncndo comodlcl wc11 . _

po1cydo.
(flln 11 "-- a ple! wlh twa oydoo, ,...
IMoiontparcyda"" ... _lcll aalL)

P\:lilll1.f'llMblfClot....W..,....18hlijtt,li

..... Socand""""'"' ""'.............. wlclh, In

iyp... ..

U'IO.Pilftlcomododwth1111Qi'ir.-

-h

ll-y,1

--

&IOP. PiW1 oomodOd -

(.-.rld ioglttlwnlcaly);

loglrillvnkalr tpaood ~

MalhCAD'a ploc 1ype1 dclamine how poinui are ah<


ploca. Uppercae lcaen In lhe plot type rep-tllCS1t po
l)'lllbols conn<eted by Unes. l.oWcrca5e rcprtlU1t a
l)'lllbol fet cach poinL The possible lencn fet ploc t
11 Collows:

lL

tpaood-

E!~

-1 .
lu.

On a logarilhmlcally 9Cl.led ploc aili, boch uta llmh


be positive.

1 loglrlhtNc . . tMdod lnto


1hown on 1 log ple! _-.,
tpaood gril hl. E.ch C)'dt il 1 ~ ~

~-----3

1
[!i:. ~

bdlmlcalo

. . ... dold, .......... ..-,,..qdo;

~-3

lf both numben ror lop are O, !ben che plot b ~


aumbtt is O, then thc plot is 1 tJCml-log plot. lf neltl>
2a1>, the plot is a log-log plot.

n, "'*911>1, ncydos. !Cydoe n

~-!
3
-1

Somo nott:11bout thc rymbola In lhla 1poclllc.ttion:

~- 3
r~

Log cydot. F'nt nulril _........ ,...i. ...,.,.,.


doltmthot 1.axil. Ti-tunbn ..
ritetnlld 11 lollowl:

, .,..1

.1

-n, fornuu thn 11&01. flllh 1bn 11)f'(;lfkaOon amt J111"1H (. I),

_..,
Omoano 1 . _ IXil (1h......,

~-- ~

tyml>ol

:-

~~

tff :,:_
? ,: '.~.' ' !.. t,:~;~'i; \~; ri (' ".: ~~ .'/~:' "1\~( ;~'.!lfiV~r::;r~"~.::ig:~/~~~i~~):t'. ~~r4t;?J;tV ~~~~ f

;-= -3

1>\irypo.ThlliiRtie_one_ilil ... m.,, ......~

"'- lligtlo comodod....,, - -

' 1"!'" ~' 11< 'f'r..~ '1''~


.~-.t'n!'!'#i~~~&)(
. .-::.. ...ilm,&
:: """'n'"' :O:,~!lf,;;;
.:... "'~" ."~' "'u
-' ~-.\.......
1

1'

1 r1

I' 111 - .

a. ..... ,,

>rid lina, boch UCI linear. P\o( arta Is 10 linel by 30


lwnns, lhe fUll ~ I X's cooncctcd by linea. and lho
cond nce is +'s IXll\llCCtcd by li.MI.

una

'

''',

1
1.1

-e
. .,. ,..

l.O subclivs-9,l lb.calt,JO typcooe


he y-axis I lo:uilhm~ dividcd DIO nine loarilhmlcally

!11

13 sbowl IDIDC cumpicl o/ dio- plo& wi1b diffcrclll

~icadons.

l
1

f9n ti: ElloCll ol dlferon1 plol opeda-...

Chian&in& the lobal plot rormat


Wba you CZC&le a ploc, it auLOmacally cu the global ploc
far-. You QUI chango lhe iDdividual format Cor any ploc. or
you cm chano tbo lobal plot Cormat.

U you awc a lot ol similar~ you should changc lho global


plo& (~ID mar.cb lbolo ploll. Thcn each llCW plot Y.OIJ.a'Clle
will lllJl wilh lho lobal plot fannat you ICL

To cilane lhc lobal plot format, typc:


[SacJ plottoEa&t. (..J]

MalbCAD lhowi lhe plOl Connat specifacation on lhc messao


lino, jusa u whon fonnauln an individual ploc. Clwio lllo
spccificllioo and preu (..JJ, MalhCAD rcrncmben lho new plot
(onNll and UIOO 11 eoch Ume )'00 Crc.iAI 1 llClW >loe, (Tho k>boil
plol fomlA& hu oo caoc:1 oa ulatins plou.)

One you have crcucd & llCW Job&I plol Comul. you can:
Creaie ncw plots wilh llutl formal.

1:

:S

Plou

'l<J)

.
'
.
in your conligWlllJOn file

Savc thc ncw global formal


by
using thc cool>. .c rom~ Thc global formal lhcn
bccome.1 tlic default cach ume you SUal MalhCAD.

1 1

-c:a-...

w:cd ICmentl. Thc IJ'ljlh shows w:niaJ emir ben


tanln lho llnl lnlCC ...s ClldiAJ at Iba IOCOlld.

JI

r-- "";
-~
.
-OI

ll1'UD rLlf lnCIJK'M 1811

1,0 111bcllna5.S s1u>o U7,117 typtp


i>dl axea linear. Eacb axil dividcd DIO livo paru. Thc plot
117 lioea looJ and 121 WUllW widc, lho rnaximwn plot
U. 01 'foWld lwc-' Oll ICVrzal slo:cl il yoll p:inltld L)
be ploa.ed poillll ll'O sbowll by +...

0,10 111bdlvs-4,l sbe-JO.SO lJpeaY


lbo 1-uis iJ loarilhnc, sbowin lllD cydes (wlcb lppCa'
11 ovcnly spac:cd rid liDCs). Eacll cycle I dividod in lwo
wilb a (lop.rilhmic) halfway mad:. Thc y.WS la linear,
llvidcd inlo four pllU. PoiDQ ll'O lbowll u small ~

"I_111-,s

-Q -[ffi".. -m :=j
.......

'C IOOIO umplo plol spocillcllloDc

.o tubd1 ... 1,1 abclO,JO lypeXr

~~Z:f;".:Ji !.'!" ,;:f~;;; :. ':/ ;.,.;;;;;;, ';' ,~)~)L,; :; .?:..: '. ''' '~: ,;( {

. . , . . ,......-----...i.........----- k.
,

Oianc ao Clllllll plot ro llutl forma& by movin lho cunor


llO lbo plo& and typllJ d (fQr dlf,,,.U).

:[: !'.i =!t

:9i:!I
'~~~
~'-Q
~1~
[

t:S

!I
:s:s
iE ! l!I

,.

1;;~
l.~:s

~[~ :3

-~~l!.~
1
' e:;:

::;i

~:!!

:1.-J! ~
_;;_

11 : :;:-

14 f2Jf4P'Afft;P4+f.i ..5h'! fi?;_~ 5:'~i~12.Mtt'<'f.t.{t~.rt:Wf!J:."t'"1fi'Nt!*5{HJ9'tfl.'i'F.;.-~.;,1 .:l!. ""llllp11111. .1111--..--~-----.~-~-::-----------------------_j


11'
.

.;.
;,.;: .. -..

<: ...

._~... . .

; .

: '-:.. ;

'
~'

Q)

(1)

-c.
eca

et
(..)

ca

.e

"

".,

...
...,.
...
...&
..
"'
J.

......
,..----,

)(

...
N

..

...... 1 51S

x .

...

.....
..o

.....
N

...........
...

lC

""
"

)(

"

)(

"'

lC

ri"

)(

CD

......

X
11

1
ki.:J!!
E: ~

[ :;_J -~
,,.

'!

MathCAD Examples

[~ ! =3

c!j!

1
E:-!]
1
E-~

";,
~:;

..

.- j
: J

Fluid l\ow
An cumple llla! uses !he Moody mcthod io oompute thc
requircd diamerer for a pipo

Automobile brakln1
Analysis of automobile bnlking by eumining mery ova
time

E'l!!

Complex cootour latefl"&I


A documcnt showin bow io pecfarm complCll cooiour

~~
~~

This chapier ooniains lhe eo11o.,, scctioru:

ET!~

1
1
E~ ii

..

This chapier COllSSIS ol primouts from Ma!hCAD docwnenis.


Tbcse documents detnonstraie useful l<Cluques in MalhCAD.

I[~!! ii
~J!.a

;I
'

inierals
Home mortae
E.xaminatioo ol paymcnts in a home mort.agie

Bode plol
Bode plot o/ a u-ansfcr unctioo o.-er several orden ol
maniwde; shows bow IO =ai.e and use d&U in a lo plot

f'

Polyaomial curve-nttin
Usin mauix IOChniques and multiple rcn:uioo IO f a
quadnu.ic cwve IO data

~li
_JI

l~rL1

__________________.~,:~z.-.i;;:~z~xw~;~u~ua:
. aaezM;::~ze~L~-..._----------------------~~~~~~~

'-' .

~. ~J ., . ;.

1~,w~: ,._,.,.-,-."!':'r.~~~~ f""'t<"'il~,..,u:;i\':f~ft~t\i: ~-c~~~.,~"~:J!:r~:Ti'i~~4'~~\:

l'~"' .: , :;. r ~ :: :~ . ,:'1i"<'.~n<.:i: /}'.):;~--~~:-l.:~t;~J~:u.:-:-::!.';;; 1 ::f1i;:"'s-' !:

Chlplet 17

FluldOuw

.,,

OCl99tl

trae

~tela

lL

99()

tt

ain. I 10. MO

t lT

!Jal , . 2Jl

(u. lb tor
lbf tor toree}

tt

,
1n

~-3

lb 1 UI

in r IJ

- J2.114 -

lbt - lb 9

,., ,. -

lbt

In

'

Probl- tlnd requlr-d pJpt lae tor th9 followlnq pn-trti


foir: tlow or vUu

. .1
Q , . 175 -

oa

aln
Dp

l.J pd

t.

t 100

, . 12.4 _;_

xl- tlow rete

. .x1-~n drop

tt

pipo

l"""

lb

_. 6-'8 l ty ot wter

tt
4

o. 0001' rt

t 1.12 10

...

'

...

_, tt

!3

uh'ttti+'

H .

pipo~

tl,,..tlC VlecxMllty

..1

~T..-~

r :! 3
.c.. .

a+

Mit ?1btL

f .

t ,t

'i#

.l;. ;;tpl i;tc;ga;at.ys i#))' ift ttd.;"iJ. }'+t.t.ln.:J


215

M1thCAD Eumpt..

Jllo'll 190h

protl by ~lnt wlth U . - nl\llell.t

CJh

~-= :B

rtuld "9chanJ.ca,J

O.fine untu1

hese unl1' allow MalhCAO to


er1orm dlmeMlonal checklng
nd convtrslons on ttie nisul1'
computes.

~:":"--

ot

4 ....

riuid ~nlce by Phlllp M. CerNlrt and


ftlchard J . Croe. Addl90n
l.y, 119,.
. . . p. 01. (tMthod baa4'd on r.K. White,

tt

.:

~-3

PJPS SJl[HG IW>8lDI P'Oll T\llUIJLEMT 11.0W

'ft)h n:a.pl

S:-=J =~

1 ....; .\,,....

""

1 -

H . 0'1 -

.,.C'9Y loee

J
Q
L
I - - - -

lH.,.

t'

'

tt

_.
L

t'

, '

..

U
l.Of.110

....,._.

d"-"91onl... rloit

L-V

_,

t -

41-wl.onl... fioW'

4.&tJlO

,.~ter

Mow tr:y t.hir.- dUfnnt ~i.M,tlone ror llll9yn0ld9 ,..._r 11

rl rt . .u ..

t l ... ,. (f')

'"'

1 1 . JU 10

.. Q

:L-. 3

.1
'. ~>- ~

:d!:;J

:;d! -~
: ~ l! 3
:g.! ~: J!~
JJ .
~--:::~

- m

D S.U'11A

D 1 - -

Jt.

l.x:ind MtlUt

r.
.,,. .11
.... , fr.

r loq ( -2 ~t'

+ -

'

1 1.JH lO
Q
Di--

D J ... l ln

T T a

O>hbrook' 1111tUolt torwla, 901"4 ltAnt.ively1

01 ..

r loq [- + -2.si
l ~t'
u.a

, ('f.'

R 1 rlnd(RI

'

a 1.n1.10
l Q

Dr-t'T I

o.

J.t1t Ut

1.11'

------+--- Solv1 block solvH lmplkll


tquauori.

Chaxer 17

~
E=r!!f

tomubile br.iking

217

MalhCAD Eumpl

Cumpleic cuntuu.r integral '

.-

i - ,;,

,,,,, .. '''-t'.'".-\"'"~'1--:<;f,?"-V'.~ ;~~ '":

E;:::!!
AIL\USII OI Mn'Qlll;ILI

la1IDQ

M I UOO l.b
ltw 1 U ln
. . I 10 ln
~ 1 100 lbf
I . 1

1
1

o
...u t1-

~=-:rOIU
Jdod llorallon compulH
h onorgy walu1 lrom ltle
wlous value. (Type Et0+1) 10
1E.1.)

~----------

J+l

1 1

r.ctlu ot d l ..c.
bnlllnq foro

lntu-v.l 1

lnithl nrhlol .-..rvr


dt 1

o.

~~ niodt
Ja;-.,

u ...

O,I j i

ou l

Alpend.1.x1 anJ.U and

c:om.aione

1L

9ec

aa .Ol a

joule IQf

u..'!!..

...

J.J

-=

....~

lT

br l&OOMO

in J . M m
f t U IJo

!l: gtort
J

J
MG

joule

te-JQf

lOOO wt.t

J
J.ltt t.ta MO lb

e~

.-, l ue\. I

g::. q~

plaM.

Start. wlth

oc-plH'
tunul Ion to

cs

r()

O\oo

. . ter hed

~ ( t)

~ ra

pi! t.h

in

.,.

the 1

t
t&rt

n o n u ..
~th

l nt~ rl

ot t UVr

e.in t>- 4-tin.4 aa ,

~
1

doal..DM.nt

U\'t CJWM!Ul

t.ann l ,,... tor -luatlnQ' OClllPl . .


uant..ui.&r lnt~,.& .

C.;.

TUle ot _,,:1-1

'ltl h

~. l.g
!g

:~lSJ..

Plot .,...rqy of
.. a
tw'ICt.lOft ot

CAi' motl~

9eQ,

OOKVLU CDN1'0JR urn:c.alJA

tr1utlon oo.tUollMlt

1n .p.

E~

rad.lu ot -m..1

, ,. o . u

CDlip.U _..JW

.... ot otir

~1 --- Thl1 l1 lhl complu numbtr 11.

009(tl .. 1 . lA{t )

-o

da

I 3 't'

- - - - - . - - - - These are literal subscrlpti.


Typt tstart to Set t......

Uw

r-.....

r<<tll [~(ti]

S(t)

"".

1. an1

c1t

.._--+-- - Typt & to set Integral, ? to lff


lltrlvatlv1.

ro.

11'11 l h'i, not


v lthl.n tM ohouJ.u

E.iJ

......

...

10

lnd l cat l nq pol


4-orlbed bt

~t.b

------------+--- Chlng1 toleranc1 lot 1 mort


1ecur111 answer. (Thl1 l11
gtobal dellnltlon.)

E:T8
g;:.s.

~i!-

~+

EA:Z:l4SSU.il44%,8.4(;t@b Af@f,IPl#f. &!Aff'Nfl@Sf:ild'ifif."f.~!!i+'.4'9;:

Al\?

~H

64#P

~A

. 14$

1 Q 41 M

!$)$

-j

1 4
--

. \~~~

~....._

,: :i

..

:.~:.:.:, '. ' ':'.''<: .::>.

,:; :'> .~:,:~Y:'):.-: ).~}Y'<"Y:\ .'.:r,

:"'"

.....:- !: .:

11

l[.::r.-~

Chapr 17

IS

Hume murtga~e .,.

::.;..

JIJIU

_, l 1

let. _.,, pan.Un


la.n

~_pri~

I 120000

Oovn~

':lf!i
IE:!!S

I 20'!00

Loan_--.unt - tkiuM_prl09 .. Oawn...,s-t.

lut

l .. t yr

lS

flUl!lb9r ot pen)

(t..arw ot lCM.n)

'

11- 10 -

.,..,...,t ...
month)y

p9pllnt 1

table

ot

,,....,..,..~

...

Loen_~ l ~

' , . 1 .. -

. ,...,.. .........
(1 11

c::::.. .. ..:::::a

tel"a ot 10&n.

l . _r~

To ~ta llOnthly b9lano., tu't wlth


LoAn uount u'ld .ach ll!Dnth .o:ti
inte~t. -..bt.ract p1r-nt .
balano9'

---- -t----------

~+!j

pay..,t. - 107. 61
lilc)lw OOllp.l.te.

IE::.. ;-~~

(lm..1'99t. nt)

yr

o.puto""'

~lance

A.bo

por-nt.
1nt

11:!1

a toan_a.owtt
t t>.l.no.

,_,

1
rr=B

,_,

(1 + 1, - p11)'9m!t

principal and int.r.t in

t balance

_Jl

O.... el9'1t. .-ple --.t:M 1n tbe louu

1.~- 1r!f

tr a U.,

Plrat:. deflN __.


C011V9nlant
abbrftlt.lc::ne

219

r;-. l!:~

cu.cutATICICS

or

lse seeded lteratlon 1"


omputt batanee. (Type
1afance(U 1) to su balince.1.)
'hen compute In~ p. and
>qui/y lor uch J.

~-~

"

MadtCAD Eumples

..en

1pll~

'

-ltyj 1 _ _pdao blllancoj

int

'

~
~

.!f

~ ~

~
~

'4-----1~-

lnpv1 tablt.

Tabl ot nlu- ror t:M l9ht ....,1. llOntf\91

'""""
,.,

U.UJtC'I AT DIO

t-lanoe

,.,

9:JUl'n

,.,

equlty

lwrDa't PJ.ID

.......,

PRDIC'IML n.ID

,.,

111111

.--:=--

-~

Plot. equlty and


tcwin tNilnoe
ovr t.1-

~t.10!'19

ian-rr

rint. fMr

). - 1 lyr
A.11 p11,,_,U t

L:-UHS.H
k

Principal only1

-4---t---

-~~t><J

o.puto

pk. 1011 . 12

tnterMt onlr1

L
k

,., ,.

.... 1

int._. Hll . S4

L ,.,..... 1uue.u

'

: ., -L lntl uua.u

Outpv1 tibies.

1~31
!E:!) ~

eplut

_t

m-~

.,.. ........
111l ~t ..... 1r... U.. dyna11io r.pon.e ot ood-onMr
Yt-, .nit pree.,,t l~ in t.1\9 Cor. ot lkxl plot. The
reaulU ca.-on.tnt hC* to ~ tJ"'9 U.place cto..in a.nd
--.1-109 .... 109-loqi plot.9 1" MathO.D.

rlnt, dett.n. neoNnt


ooeU1.o1..t. ,

. ,. -

(i

e~ ,

v, and

~lnq

w 1 lO hen1

--- -- ---1 -- - - -- -

111

, .... w "

,. '

o n

:....,..t
~~.::.":"!.:: :t!~.:.~~~7~r=~
IOC' plotUnq an l 9nd 100 nd/MO.
,. 1

- ,. 100

"" .....

r 1 109 ntlo ot _ . , _ &rld inl- fr.qu-.iicl .. . 'rhe

lu.M of a ODllllPUt.d below VUl M ecitMllY ~ an a

ln~l

.......... .

bKU

1
~l

a lt

JE.:! j j

i~! ii

!lt: ~ :iJ
'le:
1 e!""

ill

ji

'[~:::~
Jll .!i

ll~-,ii

11~ "' !!i

dotWtlono
NO

:1

11~:8

r
1 -

polnll wlU bt tqually


1on log plot. llnct NCh
ns11n1 mulUpl ot !he
1fort.

1 :~

ill

ti.rta. -

flf) 01'9UO(lo(t),l(i)) )60""9

""9110

ilE-_[! ~
l li)l!

~~

11e-w -~

' oc:

.::: ::;..:~ Jt.

iL<~:{. ~-~ >: ./>:.f:;[_f:~.-~:~1;..!: :;.

,J\~ltt',~E;. ,

/' .

, ..

. .

, ,.!,

~ .-. i ,.:r}~:r .~~4 ,;_;fr:.,-~~-":r,,:t~ .'r:~~~;-:-~~~!'~t:~;1!r~-::.:

31

ml! :!I

1"'9 __.._. ....._, eyet l didh...a _.,

Oa111lor luntUOlt -

I[

1
~

221

MalhCAO E.umpiol

Plot. ot

or<Mr rt-

'

....................................

-- -

l'["i ' JI
10

'

__

l berta

......,

..._.. "'I ..,

,._ r-- -

Thl1l11 IOQ log pl ol wlth lwo


cyclu on e~ch axl1 (logs

2,2). The upresslon on ttlt


y-axis usu lht lmaglnary

~
---

numbtr 1J, lhown slmpl y as.

10 . hertl

--''"' ""..... yt-

__, _ _ SernlllJll

"r--i--

plo~

aubdlv1=2,9~

['["i , Jl

~ r--- t-- ....... _

... 110 ikq

...

lO . Mrt.

, ,. '['["i 'll

10 . hert.

lryqUit. Piot ot .ywt C'UnutiUlt

..., -1.-' JI

... r

1J ""91

-r

1J "'91

(k>Qs.1,2,

...

'

+s

. .

:'. .

/\i ..'.'. : 1.~:.; , ~~J

,,

..

Chopttt 17

Pulynumlalcune-fillinit >. -

. -'

,,..

s--= =
~- ~
~.:! "9
L 3

~-~-

POt.Y1QlflAL t1lllVI rrrrtlJ

Ttth doc:ua.nt ~ how to tlt a qulldrat1o f\mctlon


t.o a Mt of data. n,. ..,... technique al90 vorka tor

~!.!!:- ,~1~;~~"9.=!r!~'"1~

variable).

(Thb doa-..nt tollowa tM ~tlon 1n AppU.t LinMr st.atiatical


Jtodle, by .John Meter and Williu WHM~n, Richard O. lrdn, 1914,
0\.9phra l and 1. J

u~ ;~f~: .::; '.: ~ : . ,:.:':: .:; ;;.J.ri:1i;j~T.?T~I~~f:!~~~~\~~~.~~~;::T


MathCAD Eumpleo

Quadretio flt udft9 Mtrlx opentlan.

cr..u

. ,.

~:!)

one value on each nne.

, . Rl.A.DF'lat(ct.tal)

- 1...,...,.,

'

- 100

t UADPlal{dataJ)

:I!--

..,.n(x)

4t5

. . r(x) 1 . 1u.10

ar(y) 2.241 10

~(X}

st:.diw(y)

l~l

linMr

211.Hl
~

flt1

alopi(x,y)

ltne.ar(x}
ComputA

AHJS).

---+---

181

....

...

"81

1 . 114. lO

:111

l\~'T-

Jl1
ll~"-

ad~

:1t~

Use superscrtpl operator


(!Ali)') 10 denne columns.

(1''1')

OW"NI

lf*SI> t b b

O::iltp.IU

Flll columns ol matrtx X wll

, . si

U.15'

~ !)

Jll
l\~.1!-.~

<2>

'

+ b
2

erroT"I

- t[(f - -(Jl 2)

IBI

Q
t - - 2

...

..an ..,uar..t

8ft

1--~

t[(f llnMt(X)) 2]

[,..,.1.4)

rttt.S

'

<1>

ones, r values, and r2 valu1

\~~
:;:!)
:

b 1 int.el'Olllpt(X,y)

x + b

-..n -iu-red arrorr

I
L

l.4H 10

b 1 (l' XJ

_.ill

oorr(:r,y) o.157

Arrow Is vte operator UAHJJ.


Small sigma Is vector sum

'

2. 125 lO
10

X trix
t 1

'

. . .n(y)

-1

1, 0

11
:~ 3

eo.put -..ple at.tbUa.1

110

[.']

ere.te

]!_~ --~

rtret, re.ad t.be data fra. a:xt.ernal f1l1

Read dal1 from da11 files w1th - - - . . . - - - -

MOOnd YViabl 9q'Mr..4

. .,

ca

<nph tM -

.. l.2otl0

.....,,.. 09"lnot tite dabu

1 10

ri' u-["i] . . .:- .......


0

) ,.

, ;I

1000

'[3

1 10

11-[1] ' ' .


o

'"

ll ;

'

1000

:: ;;

r. ~~a11-~~~~~ t~1::1
r

; '.,
~~~

;-. __

.....

Reference

0-.17

, ; .,. .

..

;> . ~-- _.,. _,'

~i:i
~:=!
:.'

il 1i:,m 1: )'f:U.,m:~ 1 :j11;: 1 J '1 :u [0:jJ'.11'/:tl,,Al{O:j1 l:W'l:!,'f3PS1' !!'.! iI ! l i ! [!

E:~
~-=~3
!fi:111 ::8

!EJ:!

IFll

help

1F?. I
11':11
11'1 I
lf51
IH1I

cnpu

(f'IJ

sol l t
switch
calculate

IFOI

~:-!!
~
~. 11-Q

[F9J

lrt01

!Ctrl lfFZI 1ncou


ICtr( 111':11 lncut
ICtrl 111'11 l111uto
!Ctr1111'51 sc,1rch
IClrlllF61 roplace

cut

ruto
lo~d

c.wo

umus

IClrlllf'/J '

ICtrlllF91
lCtrl 11 rt01

un~olll

lnsertllne
deletcll ne

- - - - SPECIAL l<EYS - - - - I! plot


!Ese] COllM4ndS
" text rgn
h1I 04118
lllltl11 Malrlx
!Ctrl JI Drcakl abort

9~

[n ::

!CtrlHl
1Ctrl JO
IClrl ID
ICtrl IF
lCtrllL
1Ctrl JH
!Clrl 10
!Ctrl IP
!CtrlJQ
!CtrllR
!Ctrl IS
!Ctrl JI
!CtrlJU
!CtrlJj
!Ctrl Jl(

!Al tlD
CAi tJD

~-. !;

IAltJE
[fll tlF

~ ~

llll t!G

alpha (a)
heta (p)
delta m
cpsilon (()
phi (-)
GA1111A cr>

IAILIH

PHI

[flltll
[flltlL
CAi tlH
CAi ti O
!Al tJP

lnfinlt~

Cl
laMbda OJ
eta en
01'\EGA Clll
pi C1l

~~:: '. :~ :~;i::;..

ahort
hackuard Mdc (textl

. . . 1. ~ 1 .

1: "

d.111:1n dh l'lnu
fur.,rd "'kla (loxl>
ski p 11110

~ '"

1(, ' ', . t ~: 1-'.


',

'

, '

:tf;, ::.~ .

justif~ ("IM!d~o"l

r.;'. '.:

rrlnt <''<l111l"I
~kl p pora~raph
quit

f-:.

redispla~

,,,

ski p senlcnce
creatc lext b4nd
draw hoxes
ski p word
el Mark

>-

f
'.'

.. :t:i: U~i~:~
[Al t!A

'

!Al t]Q
CAi t!B
CAltlS
CAi t!T
!Al tJU
!Al tJM

'

theta l0l

rho (p)
si9Ma ,
tau (T)

~-

;1_

'

llU (1)

OMega Cwl

E.T .: j

J.a
J
~
~ ;L

"

-J~

wzx.m4ti&M&A&M~w!P"l"~\J.i!l';\f'l:r.;

2:

+ V

;" ...-:".)',;.

t:'.~~,--

\~-~

TI :c-

\ c; --1-
e_ _.-~

MathCAD Reference

!~.-~

'

I~

ll
1-:3

1~t13

1~- -s

_JI
\~- =~
11
l~>-:3
I~
1

11 :3

T-

~I!
. 11 :!!1

\~- -:;

Thls ~ llu MalhCAD't fe.e= ror casy rdercnce,


lncluding commands, opcnums. functlona, and !pedal k:eys.

Thls l>P<tldiA contains thc followlng 90Ctlona:


Comman<b
How 10 UJe MathCAD command!; cornmarxb Usttd
functionally lnd alphabctically
Kty rdtnnct
Relerence 10 keys: spccW kcys. function kcys, con1rol k:e)'
111<1 cunar keya
Valld equtl09 fonM

Typcs or oquations acccptr>d by Mad>CAD

Optr11ton
Complete llst o( opmuon and how llJ type lhem, ordtted b
pm:cdcnce
Bulttln t1111ctloel
Bwlt-ln functlont, 11.suid alphabctlcally and by typc

1cl!~

Pnden-s nrlabkt

\.

s.mxts ,.,.. nambfn

11 :!)
r

\~~ _
1d! . ~

1rd!::;
ll

Variables thal havc valucs when MathCAD mm


Sptdal characttn
Orect le11Ct1 lnd how 10 typc lhcm
How MalhCAD iitaJl'CU numbcn

Command-llnt op~
Slmh options ID OJC when swting MathCAD

1
_J

A",..,., A

Thcro lrC dvce cquinbi 1'111 ID "CCUIO COO!mands iJi MlihCAD;


Uso lhc cotm!Qlld kcy,

~10), IO 11CC lDCllUI ol comrnaoda. and lhcn select comlllalldl from lhc mcn~

command~).
Preu flic), lhcn eaia- tbo MIDO ol lho

eoounw (or lho f1111 fow lcuerJ; tnougb IO di!Cerentiaic lhc comllland name from Olhcr

Preu lho lppropriaie W1ctioo or coo1ro1 key. (Only sorne ol lhc canmands are vailablc on function or conrro1 keys.)
hia IOCtQi cnnw.. lill o1 c:oounanda orpniud by W1ctioo and an
lu1 o1 commAnlh.

al~

~ :3

-- ~

ar:~

;::,:,}'.":'

r;r:~7:~:.~:.r:2h:::~~~~~
.
:;,~:.......
/,~' :~i.: , ,..w61i~W.~~~~~~
.\:) :;
Ma&.hCAU 1<.ara1..._.

Syalem romm""
----

[rl OJ 1 D
lOI a W

(Ctcl)ll
(et el JO

rl O)

(FlOJ a P
l!.!_OJ 1
~C
11'10)

k;:=.!i
1

~e_

!;:! 3~t~

ExOClll OOSCOO!mand.
Show available memory.

Redraw saMO.
X'9draw ______ - - - - - PrinlCtJtT
nld()(lJl11tOI.
p

Hl<>tpr l nter n
oonflqTe fJ l enlfNI
ea.cut f l l nm

._

~IVV CUff9fllCunfigu111hOrt.
EMCUe cnmmandlile.

l o ad ( 11 e n m
HVe { j Jen me
epe-nd fl l n mtt

Vr t 1Jenm

tilname

01 ::~
v

Toad documool hlo.


Sva documont filo.
AfpWldlileloOJtTeoldocom9'1.

Assoc1a!1 vanabkl wilhhle,


- - - and r.ioad conl!]ur~
.
, , -'"-
. - - - - - - -- - - C~M
fO..cdocu~nt
MliiiCAO
~ lnd u1uys......
-
""laulli.

Compute cummaand.1

JJ'I

~-

l.
r.:. '..:il
~r.:i.

~
(rl OJ F 1
(Fl OI FA

lOI r r
(rl OJ
(n
OJ F
r ell
{FlO)

.!i

c.~h.

--~""'ry

ShowHop.

Ouil Ma1hCAO.

l'l~romman.U

(r5J
(rfJ

~1.3

-- l~_
r!..

11

hlp
quJ.t
daa cotM1 nd

tr~OJ_ C ~

Proatu tnduk:o~lewU~~-----------

oelo u l ate
prou
aut.omaUo

l!.!EI C V
ri oJ e A
tr lOJ . c .,

-'"'i.

~J e R

randoN.ls

1r101 e o

d.J.. .n.1on

f't1ut..tt .,.J 1.-k.ulllewf11~ ~i-_


n..
__ _ _ _ _ _ _ _ _ _ __

Enttt autom llC calrulallOn modo.


En111f m1W1111ca'"1la!K>:n rrn'-

Lri o e r----o~ tl O! e lt

(rlO J

~ation

d
(on/off)

e a

S.t ~~.,.; iu1m.r iu,__


;._,_,;_,_-_-::::::_-_.___________
AH.t random numbeR.

;;
IOO, dimen
_ wo
_n.vn--"--- - - - - - - Vl..lang
'000.
o;..i,i. ot ,....,.,, equai~
0.--11ct OI ~su ol IMlril.

--~-------

l!dll and move commandJ


(r2J
IFl)
[rl

~ I lt

(Ctrl}[l'f}

[F10J

e
t< X
JrlO J ll 11
[FlO J lt 1

~J

oopr
out
pute
Hparate
J.n 1 t Une

Copy roqion.

Dot..le 1.,J""'~-,----,.--:------------1osa11 rog.,,., 1holwucq>tiacu.


Stpatalt OW<lapeilgr!\llOOS.
[CtrlJ[l'tl ~ lt I
lnsert a blank ino.
Del blallk lino in documlnl.
(ctrl([l'1DJ ![r~1..,.o,_
J ""11:_0'-----="'-'"=='-------~~~--'"
lrl OJ 11: G
Go lo r.dicaled posrtion
[rlO J 11: W
Saollindicalednumbofof posions
[etr1J[l'5J (rioJ 1 r
S...dl lorw11d ot bad<ww lcl 1ex1.

li a

nplao

text cut

Ropiaceindicaledl.xlwthnowlaxl.

- -

...

- --

,.

.~-.........
r.. .

!..' . ...

.:~\ . ....,.. 1t..~. 1:i:..~;'.11 .~:~.1;tr 1 . "'4'.t.1. l \v-.:~.:.;11.~ ....,,.)1


.
; !;, ',. :"-': .'

.
1
......-

~,,>

2JO

AppendixA

"'r~1~0-:1~c----:-1"-oo-!PX--------,,.~--m-.,-:-ked-:-:-l-,rt-0<-par1-,-,of:-1q-u"""a1ioo,--.- - - - - - - - - -

Jr!OJ IX
[rlOJ I 11

O.tolom.rkoolortorpn~olequnlioo.

l.l\out
input

Pas111oxl0<patlolequatioonviouslyoopitdorCIA.

Tutcommanch
(ct.dJX
(ct.rlJT
(ctrl)ll
(ctrlJr
[ct..rlJll

[r10 T w
width chu
trio 'f:_ll _____-rk
[r10J T B
hxtb&nd
[rlOJ_T_ C _ _ _ cntr
[rl Ol_!_ B _____ b.<Jltwa_rd
I!~! r
torward
[r101 T .J
juoUty

Sj<citywidlhlorlortregloo;rowr!lfl,
Stlb<lg11nlig_oreudofm11hdl1rt.
SW11ulband.
Ceole<IIMlollort.
lnl"'!"_ol lort mohon oommands as bac:kward.
lnl"!j>!~IOOlioooommN'dsaslo..;.;rw'"-MJ=--------AOW.'P tort and rNlign ro91onn11h lort bMds.

Wlndtnt and pr:r rnnimanda

!MI
[ct.1Rl'71
frI

[rtoJ
[r!OI
[rto
[rt Oj
{rtOJ

wa

opllt

SptilsaHiinto"'<>willdows.

unrlit

Un;ir.ih1_
1_-"'-"- , - - . . , . . . . , - - - - - - - - - - - - - - -

wJ
~.!

WL

[~a

S"'chC11!10!10ottwWidOW.

owlt.ch

~'l..!~n<U

11 nu

..

S~Fl to.."'J'---,.~_,_(,_~---'"'1!_'"'~-~-J'-':"J!
_-_,..;;_-.J:.,.-~,-- - - - - - - - - -

l1nlmth_cQl _________ Sgloballifleloi'!ll~lor_l.. ~_"I'

br-~09u

~

-<i!:" ...,,
~!._t_?l __ _,_______~~~~k

SM1t99onsoll~'7-'br"':::aks=.- - - - - - - - - - - - - -

to11on'.'!.'!Q~~~:..- - - - - - - - - - - - - - -

IOIOl1 h.wd ~~brM.______________ _

plotto,_t
- - - - - - - - " ' ! t VA r VA l llft

(ct.d!L
[ct.rll
(Ct.rl ,.

::J

, !.

--------'~1~-:1___

kip~Jn

akipnten09

k lrr- .-urh

,.-~~~ l0<m'"'11;;;___,~------------$.e val.11 ot. ysl.m V.::i.b:::lo:;'---------------

~-!.!!!!.~!.1 -~Jfdin_!!d_.._ _ _ _ _ _ _ _ _ _ _ _ _ _ _ __

kip lo next tine in ltd.


Skipto next senlenct::::,:in:;cle::crt,,,.'--------------f1~\101df**J'"tlhifltut,

~ ~~

. ..

'::." " : ..: :: J:;;~:::;;, 'L.:;::~:..:~.:.::~L.::;.,:: ~ ,; ,.


1

MaihCAD Refen:MO

23

Alphabellcal llst or commands


'l'Pond~

1r101

'~=n 9

!~-:.~

Appet1d 1 lllo1oamn1documtol. Pmmp11 you orilllo "'""O' lnt lorNm1

ro ""*"1
Ene MAornllir: aoloAlllon modo; pt"'"5 lnd cabMle odl oquaiiori u

ol

;;;;

1r101

tnlarod or Yiowod. When you"" "'" oommlnd, MllhCAD 111-. IVID .. IM

~ ol tho rMDagl

;cWfd

'JT=!l

..

. ~~
. . . .. n-----; . . .,.-r.1 :: \~ rL'.i.~ ' :- ; .:~ .1'. ~'1~ y; ..r~':~ j~{'~f!t f."''~.\,;,\~~! s1. ,, "J :.

if ~
[FlO) T 1

(ctzl)a

lno.

inlo<pr9l 1ort motion oom.....,. bad<wwd. Alter you

ot\M

thil axnm11-.o
your:an!)pl(ctrlJll,[ctrlJL. (ctrlJI, or [ctrl)ll wlh ht anorin
lllll, ond MllhCAO wi1
tho cu-sor backwwd by ooo ""'1l, h, ltnlonco
or pangr!lflh. T)llt [ctrlJJ' lo ,....,. m"""1g lo<wwtt.

'""'

broakp1g11

tr101

w1

oaleulall

[no)

ee

--

Shift oqul1ion lnd plci reolont so thty do rd """ r:>eQO txx.r.dno. Abo

"'"" othor roglont downwwd lo maintail .-rlln<}tmtnl of tqUlllons In

Proc.ss ...i eaw.i. al tqUllm lrom 11&11 ol docunerc hrugh lllllM


CLm<Cty Yislilo. U. thlo axnmlnd lo arla.tu~ w!lon cole F1
'R"'J1 ..... ~ ol lho "'"'"00 lnt.

I~ !!:3

........

ji'iOj

-:~: !.3

....,

Cenl llt. 1.1 ......


tert oonl
t9Qlon"' lert bond.
f(Ancered lort _. rd romaln -ed 11 J"U odd or clole< lorn lllO ld '"9"
or tart lwd.)

1no1

re

O- cu,..,. clotunOnl:Warno J"U Myoo haYO modo ci.ono- 1hlt ~ ,


loo! .....i. Roloodo lle conllgura1m llo. (To dMt "'"'"' """'"tn.i rho

conng .... ...._

no

ae

ccpy

[r101 & a
(1'2)

tul

[no &
[rll

deioiOint

(FlO( ID
fctrllJFlOJ

dlmen11Cln1

[no

!I

1~~ :. ~

Otbu commaads

fC..rlllf

f--, ,;;;i

Ja-rrilon rommuds
[ct.rlfl1'71
Jct.rlJlrJI
[ct.rlJ[rJ

LTf3
1
~-r r
rr::l
11

!J

1~3

11r!!l--~
I~

,.JI

;:.

~~
!~-[ 3

IJ'I

' ....

ainllgurotlon.--1

~ <Ultnl oonftipwtron n -

m ..._. WCMl wcc.

<>PY ifO;k>n--:1hO llQion '*1 be pMled "'" wilh (rf 1Olllio areoiin kom 1hecloanwc.

ThO..,., con b.-pas1edl110i"'11h (" i

6'iluh.Wllnnorori1blrihlnfl4-.dolotoo,.,.liloi*
lntlnd_ ....... bolmrl14J"'W11.

Chang~-sr.o...lheamnrdimo<lsiort""""""'"'
-goh;edl,,_n!proot(.JJ.

ilOo oommand

[rlO(

1_g:i.=3

equ1don

[no1

&

l .J
i;;: 1...::1!!

tlec\ltl liNtn

""'" .,. ' '

[FlOJ a &

lnlorrupl MllhCAO IO hoa.<o 1 DS axnmond. 11 you OfVO no ~


"""""'' you on l h o - lnt klf 1 DOS conwnond lo OCIA. Uyoo u.e
prwaj.JJ 111llio ~ 11M111 DOS shol. lJM Ull lo IM-.. llo DOS 11..c.

OIMblo amnr "'*iln, or l'Hfllb1o ~- OisolJled oquafJOn io morMd

..,. ..... , . , . ni. rd coieWlod.

ExoaJlo 1 oomrnand 111. By dotllJl, loot.l lor 1ioo Wllh !he ex!ention

wcc.

ll

..

o
u

ll

.. .!t

ll

S..!t

ll

ll

!!.

i
1

Jt

..

:!

Jii

<>-

.Q.

Ji l

ll

.s~

f 11.

!!.!!.

ii i

ff

11
ii

zl

..!t

.. !L

.
ol

;~

.9

.,'

.s

fi ~

1f~ j

al

of

.sJ

c;f

ll

il

a.11

......
.. ..
~s
..

""
.. ;s
~
S.!t S.!t s_

!!.

.2

ol

t)

.91
J~ &J
l11

g~

li

.s

11

1 JI

1J

.....

_ .. _..;

...a)

!l.
-~
o .. o ..
;,!t S..!t

,:.;

...

;:_ :_ ,...
~

.- . :'

,..-~

;I

;~

.."'
.,_

.;

-:

.-

-. ..f

. -~~

.!:~

::;-:

-~_:e

JI-

.z-i

ti

i.a

-,JI if_ 1

.. Jl

..

;11 &

"'

z 1

llJ

11 ti Ji
fii i
J.w .nz
Ja
Jf
1
11
J1
H ...

-~
of
of
;,!t

SJ

il
lz-s f
IJ fl
ll
! t
f-1 j ~j

fJ

ll

.. .. .... .. o.. o
.. o.. ao.. ao.. .... o.:
; ;,!t ;,
S..!t

o
!!.

.!" ~ d

jsj

!l~ l

.so ..

..1
11 J lf i i'J 1
Ji
.s1 " la_.
1
lfis J
i
J

~!

i1t
JJ l

f1t
. 1 Ji;

ol

1
e:

'"&

~,.

s ~1
1
! i 1 lai
tlf z ! I zj!,.~
.ii
t ;

l!!J

=~1

i!!

... .!"

- !~I

~ l
Jiij l.sz 11f?,,'
: R

- --]

~!

J.H
j!it
1-ai 1 lf

Ja

jJ1 u
I'.!~
.Jf

lz:i ~.!l..

.. Ji 11:1
li!1 ir
t
.
UI
lji
1
'f' f . l ~t Jli .
!li l 1t1 J~~h !.I

..
o

....
o

&

1
l

.' :,>ff<> )5?Y::?.j:?;f:.~F ,: . :

;; ' '.'
.

..

r :t?~~~.?~-lr~ ?Z'?TJ,''?'.~'~x~'.;;~~'.i'.:'?'.;::r,:'. '.}'.:~,

14

Appnf A

(FlO( r ll

.... 11.,.....

1r101 r
(rCJ

-chtxl

(rtoJ a r
(ctrl)[F5J

~"' 1h0 documtnl "1d resot. lnstMd Ol rlbldiQ lht cooAQi111on ill,.,...
lho buil-ln l)'!ltm tt.llUb.

Si.O QJrTfnl doaJmonl ,disk lle. Pio111'1tYOl'-IOr-.: liotlarM. u- CUT1nl


"""'"'' by tt.faul.
~ kit tlxi ili oquallont ot toxt. lJM -toxl to ,....,, blld<wordl.

Mleetprlnt

(FlOJ 8 8

stlOd prinllf typt. lf nis ,... spdiod, pr.w.il scrofling fisl ol piintn.

Mpartt9

1rio1 a

Soplniio ...,..loppilg roglool.

.......

Sot val.JI of syStom YWbfe. Wo<f<I onfy for system vlNlllos: TO(
PRNPRECISION. PRNXJI. wmrn Oll/Gtl.

tl<JpUne

(ctrl]L

$q,toooxtlinlinttxt.

tl<lppar...,pll

(ctrllP

~f<.ip iO 00'1poragraphIn1111.

eklpMn-

(ctrll

$1<.ip lo 00'1 ..,,,...,. iri loxt.

1ldpword

(ctrlJW

Sf<.ip lo 00'1 Wotd In loxt.

opMI

1r10) 11
(r11

9j sci00n ~~olwo~ 11 Cllflnl ClnOf polilOli. Nhefe .. lllMJY


1wo windowt, movo wfndow dMd fo Clll1'lnl ClnOf pooition.

1r10 J
1re1

Swildi Cut.a ~,.,~ 1011io othll.

1111bend

(rlOJ T ll
Jctr1JT

C..11eitiil*idiiiliiollilii anor.

frldili dl.n

u~::r-1~

2L :

:.>'. - ~,.- ~.. .. ... :.,Ti2;~};2~:r:x@:11~1~r~1:~~:;:r~~~ffr{:


2J

MOlhCAD Rclemic:e

JriOfifi
(ctrl)[r7]

llntpli1cteen;dltCMcrdOciimto1lnbOiiom,-.aow~'M!WT~

documont In bottom wfndow lfnce -1111 savod.

----no-;11----~---!ltfwtelilltid '"""" '"' rOQ!Oi.

[E~~

11 =3
g:_l_
ll
([ -=3
' 11
[~~

m~-~

JI
[[-l ~

ewllch

umpilt

li_
,

,_

...

~l"::

ShOWI runent WQh,""'"""' IOf "" Widh.

!!:3
11
lf:.li ~

1(

{f::- 3

11 .
l~-.3

l~~~ :!J
11 3
lf. ,_
lf; !! . ~
~J! -~
lt--:!!~
l!I

Key reference

This section lists MathCAD's keystrokc shortcuts rorcommands.

Control keya

Spedal keys
(ctrll!Br-ll:J

Abollcunwtlac:tOI\.

(Ctrl~

(ll>M-b compolllilq ..1h Mall!CAO

(aaoJ

COimntby .......

(Ctrl]a

(CtrlJ(.JJ

f tld r9gion: 1111wr1pm11 curTtnl calurM.


Equlllon rtglon: BrNk oqualion ni hl1 U
lligfl

[rlOJ

lklplne (sf<ip lo nold lino in lidl

e;.... plol rtglon.

juad!y ("ru!Ql1

c;;... 1ox1 rtglon.

(CtrlJO

pc1n1r01A1"A1

(ctrllP
(Ctrl]Q

(Alt(lill

Ci111em1ut..

local IOO (il nunt>or ot poij.

(et.rl)ll

R;llO<o IO olObll dotd IOitn11 (roli* "'plol).

~.

{r1J

Functlon keyft

lrH

lio1p

(r21

COPJ

....

jn

out

(r41

(1'5)

lood

(rJ

{r71

opllt

(rl]

nrltcll

lrtl

colculltt

1r101

Commondmon..

pHll

(ctrlll1'21

lncopJ

lnout

)Ctrl l(r)

- f'41HI

JCtrlJlF5J

tllfth

(ctrlllrJ

'"llilcl

(Ctrlllr7l

un1p11i

(ctr1!1rI

(etr1Jlrt

1..... nune

(ctrll(r101

iCt.r111r1
(ctr1J(rll

(chongo~ cobHCA only)

lonrwd (dnctlon ol mocion in ltld)

(Ctrl)ll

C..lloltdtwd.

(et.rlJT

(Cl:rlJD
{ctrl]r
(Ctrl]L

Cotnmnlm...._

dtlollllnt

vncn 11

(dirwction el mocion in ltidJ

...

tld~1ph ("I> lo noll pw19'1ph l tell)

;;;;

(ctr1J

lidp-(11<4>10nut_,,,.fllH1)

1ctrirr

1nllnd (<nll llxl bll1dl

(Ctrl!V

(<hwbax......-.d~)

ictrlJW

tid~(t~IOnmwonllnltdj

(CtrllX

iNiflMi iNirk In 1111)

1
AppondiA A

11r keyt
1 l+-1 l...1

U.. cn line CI '*"'"1 l ipo<ilod dndicrl.


'"- -

iOOid ... -J.

.. IQl'lllil>"' s*>l;-lo- plocohold.


S - . rogianl: -ni;t lo noll IG<Mocw

.......,.
11 'fal>J

~60Wiilailii~TIRI
iW- (ra.bJ.J
.. _ _ bodl_wud.

.. ......., or pai: ..... 1o P'"""' placoholdet.

a-. rtgianl: -1.a 1o nal llkhn:W lllb

w... up UrOUI alint.

(P90.J

...

MMllilililUI 1~1.i:i~
(:_.-----.....-~lo nal ICkllndtf 111> llcp.
11uoo 1o ~,arr.r. rogicn u111..ay
~-lol""""'Ngin

..ar 111 tnd,

-lo-~

i-1
[Zadj

Saollll~ol~;-cUliiiioini

'"IJIM.

El_i ~
E 3

.1

~ji

..

lcili1ollldili~--IOlii

lllQiaa.
.. _IUll.OW~.
.. ~ CI pal: ..... cuubolowhgion.-

widl lit OllQt .. Ngin


a-.Ngi<rll:-anarloccbMOannm

....

_.J

t;

MalhCAD Re!_,.,.

Vulld equallon form.

MalltCAD acccpU equations o( lhc followin fonn:

1n lhese romu:

o.xpntion .-.uJt
Calculalion equatioo.

rniJ1 il a 1Uult dispilycd by MalhCAD.

a.rJ.n&bl : axplon
Defmition. Typc colon ( :) IO llCC
ftr.tabl :

,ji

E::il

E2! il
1

~-il

tJ~

~ expreion
e.1<preion S e.1<preion
axprion
Conalltint in IOlvc block. (Presa (Ut) IO [.Ut}) IO ICC ~ l'reu [Alt)( IO - ..)

Beimng o( solvc block.


a..,,reion

e eiprelon

Plot.

JI

;-: .. .

A variable namc: L
A subsaipied variable: .r or .r;,r Use lclt lncket ( [) to
indcaic subscript.
A supcrscriptcd variable: x<i>. To typc a supencripl, n.ss
[J.lt)A,

axprlon

~~!~
,d!~

exprlon .. exprion
axpr ion > exprion
axprelon < e.xpreion

....

defiNJblt il any or the Collowing:

ran~

!~ = - ~

.\,

ran1tiu ran elilulO, . 01 . lO (to lCC> lhc . .,typc ; ).

Global d.cflllition or rane variable.

G1T9D

t ...,,,, :..

uprtuion il any valid MalhCAD expreuion.


: .

cter.tn&bl axp~..lon
Global d.cfmition. Prcss tilde ( ) IO 5CC .
ftri&bl

. > "

WJTiab/1 '' 1 vaiiahlo nante.

ran~

l~f.:11
~.';J.:
;: ;r''-"'
;:~-.' z;:;~:!
::r~~:.;.~ii~rf:/;%(.~t-:-;'.~{~;i~~p; .i$.1i'.iJ!t!1~
" ,... ......:,"
.,., ~:,,.. ~.~ ..,.::SL..J! .o!!.t 1?,...~j;;J,t~?:-"~ , .. ,. ~~f.111,~~..m;.K

~ ~

..

Defmir.ioo oC ranc variable.

~!~

.....
"" '".. poge.
U...doWn ''4 OiPe91.

W-loend .. __.,....

f::i ~

~-il

.....-cbiil s Wllll!Wnt.

(P90p)

L~

, l'l'CA

A vector or matrix ol variable namC$: [~

A vector or mlllrix ol subsaip<cd variable namu.

A fonction namc.:jfx.yJ

rr~

. .,

7 :-: '('

t.'~~?\r~1.::~;::}~~.:::.,~t, ~rr??~rrr ~:1~f:f. ~:;

: ,

_ \

''-

" 1.

-~--

- -

~: .'

2:)8

AppendixA

Operaturs. : ..

: <; o:

U'1Cd in onler of prcccdcncc. For t

:' ..,.,.

: '~-!!

12. "Opcn111n.

.ti

t"' .,

lllj)rC compleltl dcsc:ription, :icc Chapter

TOSEETltll

lll'lllt!S

Of'ERATOR

TOSEETlllS

Tll'ETHIS

Ol'ERATOR

(ll

au(a)

Pnnti-

ti

1$&

Sunmatlon .... rano-

..

"
r'
rl

&[1
.. (lltl 1

~(lflaUnnoll!lllrtxJ)

[lltJ-

Vedarlz1 1rt111 oplflllonl

_,

FoclOOal

...

lT

(lltll

Complo corjuolll

'

TIWllpOOI

ar

Poww , m1Ubci-, rn.t1111t

...

Nogllllon

Il

[lltJt

.;,
111

lnYw (y. 1)

\a

,.
aJr

..,

""1

lxJ

" (AltJ 'I

Sunolwctar...,.1
8q<in locC

Abd.c vallo, dolominllt. ""'""


OMllon
~lan.dcipo<UJ.mrtx

. pradud

n.

f.~)dx

..,

0.lvllllwl

Mdltlon
S<Wadlon

!ctrll(.JI

..,

..,

l,J..I

tf

....,

-.,

..,

lni1gtal

a+y

1-f

... ,

ldf (&)

l!ri !1

Addlllon wllh lne l:ntk

.:>y

0.MIO!lhn

a<r

IMathon

(lltJI

!lltll
(lltlt
,. (AJ.ti-

a,r:

r
r
r

<lrMl lhln ar 1q11al 10

MalhCAD Rferen<:<i

This section llsts MalhCAD's builtin functions by type ll1CI


alphabetically. For a more detailcd dC3Cription, see Chapla ll,
"Built-in Fwictions."
lf/U lllfllllCtiolt 1Vfll1M11U IJlld l'UIt.r Oll sptti/ftd 111
radituu. Complex jlutctionJ ntum principal valuu.

:1

lb~

.I
e:._. -3

"""''

~- .

:!11 !)
1E-=- 3J

11

!l

1
,~. :3
~

.,_...
y
l.

Complft..p.tolOn

..... ..,
-

l'lleQ

~I

~ ..L.~

ftiWiiie-

e11prtnlon rw1..nlnQ ., intev

Vedar oxnuliiil

Militlt"!)llOllon

---

trlgorlomtW1o

V~i~-oriillcidlllwilllalllMiM

v..w.i. .....

lin(r)

OOO(ZI

lln(zl
*'(zJ

tngle(x,y)

;;;,.. lrigonomeii!ii

llWl(r)

kOO(lJ

HyperboUo

lim(z)

oooh(z)

llnh(zJ

;;;,., hyperbolo

alinh(r)

acosli(Z)

ri(l)

cog; trd expo'*111a11

e>q>(r)

log(z)

kl(zJ

LaNi

YU(1)

J:i(J

Y1()
J1(1)

Yn(n.1)
io(n.1J

l\O(r)

lm(z)

ll'g(Z)

C;111

AMI ex"'"'""'

..

' ~fi ~
E~

--

Y" must fYfH r/w


of builti1t fllllctlo11.1 uact/7 os
show1t Mre: "f'fNTCOle, /~-. or miud, os lndlcated.

Functlons by type

Uuilt-in func!ions

'

f'.:'JY~r~.;~~~~~r~:>~;rii;:i:;~~rsr~i?J~Z:!ztt:'.:tr:.~1~~!ttr11:r:~;ff411.~:x:

'E.LI
- .!

-~)

d1

lSJ

Produd .... rano-

11&

UJ

.:~~L=3
;

A-
('mllnlc1llred)
File_.
(1INOl\nd)

UiiMi lnltrpolUon
~blO 1ptlill

'""'"'FOUiftiliiftllOiiil

-AEAD(-J
WRITE(llltnlme)
AP!'ENO(.....,,.I

--AtAOPRll(filtnlrMI
WRITEPRN(lilt<wM)
Al'l'ENOl'RN(llltnome}
lnle<p(w,vy.x)
oaph(n.vy)~Vl.Vyj -

. llM

dllv)
YlciOr ______w;ih(v)

Mllril

P11>i0e<n,vy)

hooJ>(C ....'r'(.}

llllM
lcnM
ltotM

11xtv)

mn(v)

~MI
lr(MJ

o:ib(M)

idOitlyln)

-.igrntnl (M t .M2)

l.111 lhtn ar eqilll lo

Ncl lqUalto

IC";I:::.

PopuililoiiltllliiliC.-mMi(Y)--

1t<W.1Vl

LlillS ttgretllon

olope{n.vyl

~(n.v

erl{)

cnonn(I)

Rtlllllonal lqUllls

~f ~

I!-- 3

:1

Rq9
1

c.-~
1

g::. ~
_J
~_.

=51

. 1

8(11.12)

""1Vl.V"f)

lliiliic:ll ihiifblidonl l'lz)

Tiiin..tlOn
Soimg
-

'-1xf

i(nl,n2.n3)

.,.M

eil(J

-(llpf,vw)

~(lrurvaio,dlllj
41<1)
t111i1;11.x2)

rrd(I
mod(rl.12)
~Cllrd.11 .12)

f
..r

PI

1
-;:r

;r

::

,:.
~

Ii
gl:!~ f 1"" i f-

r
~

!
~

. i5

Si

L --~ .'_ ....'. /:_r:'.,~ ~:.~..-.>~ .~- '. '. :::. ~: . ~ .::~z.~
6(11,...,

Ktoood< dela hrdiOn. Aeiuins 1i xi .r2',


clhtrwis., relums O. (To ljpt 6. pr.u (U t )D.)

1m:rnurnmwg es< -- ,. ,.. , '" .

...

C<xnplololy onli!ymmoiric lensot ol rank ltv'H. nt,


,,;., ond n3mu>C bo inleger.-..n Oond 2 (or
be!-. ORIG/lland ORIGIN+2. WORIGW.0).

Thesc pmleftned variables have valucs when you start


MathCAD.

Resul Is O
n lhesamo, 1 Hlhe lh'"
lr11Jmnts on """' penn!Aalion ol (O 1 2). ond
1 Wlho llvff llVJmlfllS . . IJl odd ponn!Aalion al
(O 1 2). (To typu, pms (llt]lt.)

V.n.btt 1\M nW

Deflnltlon ond ...

llal.14159 ...

Pl MalhCAO uses lhe valutol 111015d~is. To


ljpt 11, hold down the (llt] by ond prou P.

111)

rull71QW!lm& kJnction. (To l}1>I r. inss 1ut JO.I

ta2.71821-

CI()

HMvisidt Mtp llricl'On. A.4..m. f i 12! O;


olhotwito, rwttrnS o. (To IJ'PO 4'. P1M1 (U t)ILI

The baso of natural logarilhms. MillhCAO LIHl lhe


Yllluo of
15 dlgitl.

ur117

lnWy: !he t.gest fnleoec' in MalhCAO. Thll oymbol


"provided far COll\'tnitnc:e, btA do not.,..,;,
plac. o( ldual hlnilt;, fNJrlltrical lormulaa. - "
., actual nurrbor of lnitt magn~udt. To ljpt ,
hold do"" (llt) ond prea l .

f(nl,112,113)

w..,., ,,..,

" 0.01

''

Ptrtonl. UM in t"Pr.,.i<>nl lit.. 10' ( _ . 11


Wl!.I or 11 ucallng unhl lhe ..-.! ol ., oquation

wflh .. oquaJs liQn.


~-10.J

l""""""-: lhefolerlllOt MllhCAO uses In


1U11oriaol epproximllion llQorllrnt (lnloQ<lfs.
dtYaliY9s, oquatfon tolvho.11c.1. Far more
lnlonnallon, -!he Mdfon on lho tpocillc
aptrllion In qutStion.

auaxs.o

Array origil. $pecif lhilndo1 ol lhe fdllliiiOii

"'"'P.

llRllCOLllIDTB a 1

Cobnri Wldifi UMd In~ IJts wilh WRITEPRN


ln::lfon.

PRlll>RZCIIIC* a 4

ol dodmll"""'" uMd wllh WRITEPRN Uldlon.

writino lifM

You COll chantt tite .Jtorrint WJ/ue o{TOl, ORIG/N,


PRNPRECISION, Olld PRNCOLWTDTH 11] iuU.1 tite Id
lncludint lt U. your conf11""1llon fil t.

'"""""

[::'~3

E::r~
L-::s
~

:!

E.=r~

--Jl~
1C.....:.

l,J

.~; !3

,c~!3

:=11:

1~Jl~
l !!;3
=[[~

l!:.:.--11~

:~

:~.u!J

11

g ,;,~ '::s: . ;: :.: ..,;} ';;2i:}i:t:0:~!;umt.~;;tr;;~rr:rn~'i


.,
[lltlA

[llt)ll

'l

[lltJll

(llt)O

[lltiD

'

(lltJll

"

"o

Spet:iol charocters

To UJe spec:ial charactm, hold down thc (Alt) lcey and ~


the appropriaze letter.

[lltiS

[llt)O

(llt)ll

4>

(llt)r

(llt)I
[A.lt!L

'

(bact.quolJ

(prJmel

(llt)Q
(llt]P.

Suffixes for numhen

(llt]r

[llt)O

Jl

[llt)lf

..

31~1~

fmoQNry
Haudocimaj

1570

dlil

100o

-2.541

li

1M

11

2..2111

1
3SX'lf

.1000q

-..

Oati
l9Cll

(lltl

..

-Slnlerd lor'IP> unl


~-,,,_ri

s..m.d lfmt unl


SlRbflj ~-

ct.v" ,.

.:<----"----"=---"'-=-"'-:"'= -- __..~

App<sv.liA A

:omm1111dllt1~ opllon'I
1 lllft MalhCAO wldi aimmand-llno opllona, 11 lho
amp1. cypc:

DOS

NCAI> opcl.on

>lioru can be iq>llccd widl any combinllion ol lhe Collowin;

....,,.

........

:l:n~

Error Messages

:E:~

~~AT&T'-lai>(640bY400~-

..

~,\'l;l,lil;;-Ailicira;-

C""'I*!-*"-l)oplf iiiOil'.liIT-ad~ Map


i-Wor ..--c:llodl.
flilJiOY iOdt: llW ""EhiMOd..---.-.Ol-l/lb-rr--rxa,...-"

__

Mii lhRllrd oolar _..,, (640 by 200 reoollAion).


~ mdii:l!M~Giophial Adopt11
w.-Nncod-W t640br 350 .......,,,_

......,_

~iiiiiiO:l.i~'Oi;Q~

l~~u

~-

HOlilll iOlOCfulll Ollf*"

u.o-~~-.ory.

l[!\3
1E _ll3

I~:~
1

Efiii

~11'!1

I~

s... ....... ClbUlion-f\.li-lien\ll, QQnfi11ian ill on wtvp (dtWlll l


IC-IO.IOCC). lt )'OU lptdly /a wilh no U..-.

Mol1CAO """ ~ loldilg ainliipllion .

_,_

11

11 :i

lb~

UM~ooiar 111(roqurEGAiMlll2561Q.

Cri

e-.. 11 ~

Aaod~~

,..,

------ ----.-.-----

1 e::

UM~OOlOrml'"'i ltt~>rilll 2WQ.

- - - ----

C" . 11:::_-,
/e_ .. ~

~ ..st:TOOhbeT3100 (640 by 400

1 ;.

!1a
ll

r
-11'r-r'

: .

~-1

1 1!

;.]!

,ji

Thl1 l(lllCl\di1 roniai111111 alpluhc-lical lill o/ MalhC A0'1


ciquation cmx rncuaes. The3c cnor mcssagc apilCJll wheo yoo
11)' IO cnttt, procua, crt c.lculate on "'l""1inn and Mili.CAD
dMu;U an oruw.

11111 lll'llGl"lla eootalna ~' t1~low i1111 toclh:

UI or CrTO<' mtUl..
Crwu1lctc

uwa1iocL1

1llfurJiiccK:al li1 ,., "'''w

OM'HJln9

tl1..a1 1'\iilY lkt

. ~Y:'; f!':it;','.f'.0;;-:ft3!T:1"~""'.'f:, .;.:.'.''''.''':; :'' :


2"6

IL irl. 3 . ~..'" - ,_",....,. . . .. . ,1.ho.iq~,'4.~.:~~.,..

App<ndixB

Llslorerrormessaita .... ,...; ,

lf Ma1!rCAD fiNb CJll UTO' wliik tryillt to halll>IJU a


ostr-defiMd flvtcdon, U marls tM UTO' on IM functlon

""'"' ""' on tltt/N11cdon tkftnltlon. CMck IM dt:flnltlon lll


tkrermlM wlial cau.r..d IM UTO'.
arny sli.t misll>llda
Ynu lried IO per{onn a vectoror maaix opc111tioo on amys
sl1u don'1 rnaich. Mmy opcrallons rtqulrc vcclOrS
lhal Alll lh<t '8mC 1izc. ror cumple, lhc doc pmducl and lhc
lu11<1'1J and COt"r functions. Vccior eddltlon and subllllC!Jon
requirt'S voclOrl or rnaaices lh41 are thc samc sizc. Matrix

"'""itc

rnuldptlcA!lon IT'<ulr-c. tl1111 lhc numhcr uf colurnn~ In tl10


llSI mlri mMch lhc numhcr or mWI In lhc second rnatrh.
c:uaoe bt dan....i
You pul somcthing Ol/lCr !han a lcgally dcfinable expn:ulon
oo lhc rcn sldc of tlic cl<fanhlon symbol (: ). MatltCAO
acccpu any of lhc folloMng on lhc
sidc oh dcf111illon:

1cn

A variable name: .t.

A van.ble namc witlt a subs:rlpt: .a.


A vwiablc name with a SllfJCl"9Crlpe ll<t.
An Cplick vec-1<>r or rnuu gcnet111od by 1yplng
[Alt)K. Thc vccu.or rnaaill can hold variablc nartle3
or sub9cripcod variable namcs only.

A rWICtlon name 'Nith arumcnis:Jrx,7J.

Any ocher eiRS1ion is illegal. U you want to compute a


ICSllll inslead of delbting a variable, use 111 equals sign ()
instead o( cdorl.
aannot t.tke subtcrlpt
You uscd 1 subocripc en JOmClhlng ochcr lhan a vectoror

maaix.
caaaot talle supttSO'lpt
You uscd a ""1>111Cripl on 90lllcthln1Olhcr!han1 rnattk
dtliDltloa si.et nttflow
y ou ~ 100 _ , ncsllld in:tlon dcflnitlonl.

dld aot nnd solutlon


In a solvc block, MathCAD "' unable IO ftnd a solution 10
the constraints. To see the results or the 10lve block
anyway, use MIM" instea<I of Flnd. For more information
sce Chapttt 14, "Solving Equations."

IC::::-1

L-F~
E-:a~

:L !!!

dom1ln error
You cvalUllCd a runcdon 11 an lllcpl aritanent V1l11e. For
cumplo. you 9Ce lhis mor ir )'Oll uy IO oomputc YO(./).

E:r~

vector.
equatlon loo larse

You cnlMid an equation too ccmpllcated ror MathCAO 1o


cvaluat.e. Break the equatlon clown lnto two or more
subequations.
,,
error la const.tol

MathCAD has lnterprcled the indic:aled exression as 111


invalid constanL MathCAD tries to inlerpl'Ct 111ything
beginning with a digil as a c:ollSWIL U you entera digi1
immediat.ely ollowed by a few leucrs, MalhCAD fiill
inlerprcl it u 111 invalid c:onslanL For a oomplete list of
alid rorms Cor constants, sce "Suffues for nurnbcrs" in
AppcndixA.
error la lbl
The indicaled rWIClion de111ition conllins an invalid list oC
&rgurncnlS. A valid function dcfinition begins like thb:
tunotioftn,...(a~nt

liat) : .

The argurncnt list must be a ftMllO or a list of narnet


1epma1ed by commu. Any olhcs exprusion

Is lllepl.

. .
24

Error Mcssagcs

dlrn<rulon lo nonrtal powtt


You raiscd an expression with units ID a oomplex or
imaginary power. lf an exprcssion is deOned wilh unlts, you
can ralsc il only IO a real 1Calar powcr; Olheswlte,
MathCAD cannot dctamino units for lhc result. .

dupllrole
You lriod lo define the same variable twlce In thc samc
dcnnilion. You sce thls error if you crcate a vector oo tho
len sidc ola dcf111lllon and usc the S&nlll name twlce In that

L ~-r~

E~

L:l 3
[_:1!3
,;a

:i.;
i;:-7 . ,

I~

l~.r~

I~>~

1d~

I!::~

You abo sce thls error message ir yoo awe 111 lnvalld list
In anothtt conleltl, for examplo, In lhc lisa el y-axis
expressions for a plOI.

me error

MathCAD encounlmd 111 error arylng to mid values rrom a


dala lile using READ or READl'RN. Seo 0..pier U, "O.ta
Files," far a dc$Cripdon of valid formal! for data ruea.

Rlt not tound


MalhCAO "'u unable lo nnd lhe data filo or READ or
REMJl'RN. Seo Chapter U, "Dala Fllca."
IDttI 1rr1y oper1don
Yoti apilled 1 functlon oran opcntlon tbal niquln11 a icatar
IO a vecior or matrix. Por cumple, you - this mesase ir
you try 10 ll.c lho 1lne or oquaro mol ol a malrlx. lf you
wanl to apply the opcration to each clcmcnt in wm, use chc
vec opemtor as dcscribed In Chapter 10, "Vccton and
Matrices."
mecal conltxl
You mcd an operalllr ora unctlon In a c:onb:l<t th
MathCAD does notallow. Poreumplo, you-lhl error
rncssage lf:

You entcred a semlcolon aomowhero other tllllt in a


legal rango dcllnition. (The semlc:olon appears as IWO
dots callcd an tlllpsls.) You can usc a 9e111icolon only
In lhe dcfinition of a nnge rora 11111ge variable.

You uscd a WRITEor APPEND unction anywhere


other titan on the 1cn slde of a dcf"utilion. Theso
unctions cannoc eppcar in exprcssions or on the right
1ide or. deftnition.
You used an existing functlon namo 11 a variable name

or an existing variable namo 11 a runcdon narne..


You ullcd a c:onstn.int with "'a solvc block.

lll<aI f1c1or
You cn1cmd an lllepl cxpmulon for the placeholdtt 11 the
cnd of 1 calculalion equation. The placeholdcr 11 the end oC
calculation cqualion requiles real, non-zerv, ltalar vahJC:S.

llltplfncllo9y ou .-s an cxp<tSSlon thll MalhCAD lntcrprcts as 1


function. but thc function namc is lnvalld. You IOC lhis
error, ror exarnple, l yoa - a nurnbct u a unctlon name:
e (a). Yoa rnay IOC this error l you omlt an opcrator likc
+, causing MllhCAD to inlerpret thc ~nthctel In your
equalion u dcflnln1 a function llUICl'd oC as a way to group
operationa.

llhsI ORIGIM
You dcfincd 011.IGTN wldi a non-lnlCRCS' valuc ora valuc of
1111gnhudc grelltt !hin 16000. Thls error miwb lile first uoe
of a sub9crlpt &her die lllcpl dcf111idon of ORIGIN.
ID<plranp
You dcl1ncd 1 ~-U.ble wlth a rane MMhCAD co111d
not lnteq>rCt. Whcn you define rngc, )'JU ml15t wc onc ol
lho ollowing forms:
llnr : n.1 , .Dl

(f111* ltnr:nl;n2)

bar : n1,n2 nl (typll.ar:nl,nl1n3)


You can me 11 most onc comrna and onc ternicolon in thc
dcfln!tion of 1 tml&O OI' 1 rango variable. lf you Ule thc
ICCOl1d fonn. the valuc o( 112 ml15t lle bctwcal che val 1>e1 ol
"' and nJ. but not equal "/.

1Degal tolenu1.Thls error marb 111 exRSS!on lhll usea TOl - an


Integral. dttivativc, or instancc o< root, Fllld. or Mwrr ror whlch TOl> 1 or TOL<O. To f lhe error, define TOl
with a Yaluc bcsween Oand 1 above the indicmd

exnssion.
lacompalll>le nlll

You cnleml 111 cxpn:ssion lhat adds. subtnlcts. or pecnns


SlOlhcr opcntlon that iJ lllegal far two expressions wilh
dferent dimcnllons. For exarnple. you - this error if yo-.i
try to acld 1L (one lenth ani1) and 1M (one rnass unit).

1
,
Appcridi.< B
.,
wltlen11lna1e dlme..io.

aulnc optraDd

You raiJcd u expreaioa witb units IO a powcr iavolvin a


rane vari&blc or \'CCIClr. MalbCAD cannot dclamine tho
dimcnsioN m tho -ic: lbcy wou1d vvy dq>endln Oll lbo
Olponclll. 111 e>.prmioo. defiNd widl uaiu, you Clll
lailc il oaly ID 1 liacd n:a1 powcr.

An opcrand 11 missin from an e>:xcssion. Far cumple,


you seo lhis mouage il you en1ct a plus aign wilhout
cnlain lwo cxpreaions IO add. M.tthCAD shows a
plactholder (a smal1 RCWlle) n place oC lhe mWin

da 11411 ol bouada
lbia mcsup maib a lllbel:ripl or 111penaip1 lbat rcen IO
a non-cillClll amy valuo. You - lhia meuap: il you uso
a subtcripc or tupa11Cript lea lhaa O(ar lea 111111 ORIGJN,
il ORIGIN.,(J), ar if you 1111 a lllbzipt ar supcncript 10
rcct to 111 amy ...i. bcyoad dlcleO doflDCd carlia' ia lbo
lk>cumcnl.
c1u toolarse
You llicd to
a lllbecript ar IUpCllCrip& 1111& uceodl
MalhCAD' limil ol 800>.

'*

lcrrvpltd
You inwrupted MalhCAD by prcuin (Ctrl)A or
(CtdJ(8reak) wblo 11 wu calculalln1. To nocalcuJatc tbc
lll&lttd cqualioa, pul lbo CUllOr ia lho oquation IDd prGll
{r9J.

opcrand.

mluln1 operator
Ali operator is miuin Croen an cqllllioo or exprcssion.
ami be 3-vector
You UHd a croa produa oa exprcssions lhat arc not
lhrco-element VCICIDIS. Tbo croa produc& 'WOl'b only Oll

lbne1emenl VCCUQ.
autbearna:r
You pcrfonnod u operatioa lhat rcquirel 111 amy 001
acals. Por cumple, you - Ibis CITOI' il you define a
IUpCQCripled variable u a IC&lm'. Since a aupcncriptcd
nriabl rcpracnu a column o( a malrix, you m111t define il

""-

be dlmtuloaleu

Thc indicatcd cxnaia 111e1 uni11 but ~ ia a placo


whcre m1i11 are llOl pcnniued. Uni11 aro llOl pcrmiued in lhc
wwnen11 Car cal&in Cuocliona (ar cmpic, "" and In) ar
ia CXDQOeall. For-pla, thc cxpreaiona COl(IL) and
101M' 11'11 illvalid.

1too1oa1

You cniercd too maay demcnu ia a llat acpwued by


wmmaa. This can occur il you 11J to ploc m<n aprcaiou
!bu MalllCAD'. C8pSily.
lfllaced comma
y ou utcd c;oauna il1epl p1acG.

y ou Clll 11111

comma ill uy ol lbo fallowin waya;


to ICparatc Cunctioa lrcumcntl
a

10 sepllU lho fnl IWO cJci-. ol l lllll&O

iD lf'G

dctiDitioa ola raqc vwiablc


a

ID tqllralll y-UI areuioat ia 1 p1o&

ID teplnlll

to scpara111 aublaipu Cor a maiN variable

11111 lit laeasln1


You 1111 a ~ clcmcn11 are not ia incrcuin
onlcr u lho uwneDl IO a flw:tion lhat rtquiru a atric~y
lncicasin arIUllenL Thc firsl arwncnt ol lspliM, pspM,
csplw, illlerp, /llerp, and lli.rt mllSl be a W>Cta whoao
elemcnu are atriclly incrcasin. (Note lhat MalhCAD
lncludcl v0 u a wcta elemelu. U you do not explici~y
dcfUIO I, MalhCAD llCla vf'(>.)

ea- iD an inix- tablo

! [::!ii

! ::n-~
1

1 ~t1~

/E-r.r::!i

1~,i

''~]-!)
11~:!1

![~ill j i
_.lfl

llE~

:il

1 -~11 :1

' ~

ltP.3
:1! ~!:1

l~~:ll
1

l ~-=
11

Any odlts uso o{ com.. is illepl iD MalbCAD


expreaiooa.

EnorMenaco

mllll be lolter
You uscd a oon-inie11ct exprc:uioa wherc .. iniecr il
rcquircd, Cor cumple, u an arwncnt to lhc idellliry

Curu:tion or u a subscript ar supcncrip<. (Ahllough you can


define range variables with fractional valUCI - or
cJu&mple,x : l,1.l -lO-youCIMOIUICIUChnngcu1
aubscripu.)
mll5l be DODUrD
You evalual.Cd a built-in WICtion ll uro. and the unction is
undefincd al z.oro. Por cxamplo.JO and lA aro undefined al

zcro.

must be posltlve
This error mcssage mark:s a plot iD whicb the limiU or
valucs Cor a logarithmic axis are zcro ar ncalivc.
MalhCAD can plOl only positivc valucs oo 1 loarillunic
lliJ.
mual be rane
You usod 10111othing 01hcr than a rango nrioblo in a place
thal rc(uircs a rangc variable, Cor cxample, u lho lndex Cor
a swnmation. Thc index or a 1wnmation appears below lhG
summatioo symbol. Thc lndex mwt be a variable lhal is
dcfincd earUcr u a ranc variable.
muat be real
You uscd an irnaginary or complex-valucd c:xpression
whcre MathCAD rcquircs a rcal-valutd uprcssioo. For
cumple, MalhCAD riquircs rcal-valucd subscrixs and
rcal-valued awnenll Cor somc buillin functiona, lncludin
JO, mod, and ~.
mllll be scalar
You used a vector ar mauix upression whcre a IClbr il
rcquircd, far cumple. u die umenl to tbc idelllity

Cunctioo.
ml&St be square
This mor marb a non-square mauix ia an operatioo lhat
rcquircJ a sqwire mauix, sucb u delaminanls, invcnc, ar
raisin coa powu.

1111 be vector
Thil error nwb a malrix or icalar in an opcntion th.11
riquiru a vector. Cor example. wilh lhc :t opcnw<.

1ICIUd aohe block


You uscd two Giwns in a row with no inicrvening Find or
Mln<rr. MathCAD dou llOC allow natcd 1olvc blodu.
ahhough you can defme CWlCtions with sol ve bloclu and U1C
thosc Cunction in OlCI 50lvc block.s. Sec
14,

Chai>tu

Solvill1 Equalicns.
llO

malchln GivtD
This error mark:s a Find or Mwrr Cunctioo wilh no
malChing Givu1. Each solve block lhal cnds with Find or
Mwrr must bcgin with a rcgioo coruaining only the name

Giwn.
--scalar nluc
You uscd a vccta or ranga! ex~ssioo wherc a 9C.\lar il
rcquircd. For cumple. you sec this message iC i il a range
variahlc and you tJ)' tu entct an e'-lu.alio n likc a

.f

.;> .'.1

1- .

~~:~r:...
~.

, .. ... ;.:' .'

....,_.

' 1

441.MIQP.f .

~;44
~u:a@

1 . You

&<Otanamc

You uscd a nwnbcr or ochcr combination oC symbols whcre


MalhCAD rcquitea a name, Cor example. u thc socond
Wumcol O lhc TO<>l Cunction.
.... CODVtr&in1

MathCAD wu unablc IO compute an answer Cor an inieral,


dcrivative, root, Fitld. or Mwrr function wilhin lhc
rcquircd tolerancc. Soc lhc desaiptions of lhese opctaton
and Cunctions Cor mon: inConnatioo.
overflow

You evalual.Cd an exression tha& excccds thc Laf1.est


ownbcr that MathCAD can rcprcsent (about lcr").

1 r

u:.:m

cannot define onc range varillblc in lerms oC anothct. To


defme x in tcmll of the rangc variable I, cnr.cr an oquation
lik.cz1 ; 1.

.
- .

a=;::

-... - - -~

- -

- ~

- - - , . . . . , - r-

e-- - -

' ---='! ~--- .,.,. - .,...._... ,,,,- .

2.SO

AppcndiB

too revr sub9c:rlpts

d1nlncanct loet
sl1nlncan ndut'1'd

TI>ese error mcssages xlicale that you tricd to evaluaie a


function for a value beyond !he accW"llC fllllgc for thc
function. For cumple, you scc lhis rnessagc it;Jou try ro
evaluaie sin(l o1"). Since 1he valuc of sin( I0 1' j depcnds
on 1he oncs digi1 of 10 1 any valuc llull MalhCAD could
ltlllt1I would llave no signiricant digits. 1nstead of rctuming
a value of dubiOUI ICCW8CJ, MalhCAD shows onc or Ll1C3C
error messac.

".

nplulty
You evalualed a function or pcrformcd an operation atan
illcgal valuc. For eumple, you scc lhis error if you divide
by z.cro or if yoa try ro invcn a singulu (de1Cm1in1111 O)
maaix.

clcment

too largt lo dbptay


You lricd ro display a w:ctor or matrix bigg,cr !han
MalhCAD can display.

too m1n7 .rpmtnts


Thc indicalCd cxpression contalns a Cunction wilh more !han
!he ~uitcd number of argumcnts. For buill-in Cunclions,
!he numbcr of argumcnts is fixcd; sec Chap1et 13, "Buil1-ln
Funcons. For =r Cunctions, lhc number or argumcnis
depcnds on lhc dcfinilion in your documcnL

too UllD7 to1151nln1S

lbck ovtrllow
You cvalualed ., capnssion lhat OV'Crf1ows MalhCAD't
imcma1 suick. Simplify !he cxprcasion or divide it into two

subexpressions.

You uscd one :rub9cripton a matrix. You must u.e two


subscripis scparalCd by a comma IO spccify a matrix

loo'"" ar111mtnls

The indicaltld caprcuion ronlalna a funcdon wllh fcwcr


lhnn lhc m111ircd numh<:r of ArJtUmenta. For buill-in
funclions, 1hc numbcr of argumcnlS ls fod; ICC Chapttt 13.
"!luiltin Functions. For user functioos, !he numbcr of
gumenll depcnds on lhc dcfinition In your document

loo ftw con.1 .. lntt


This error marb a Flftd or Glvtn wlth fcwer constralnlS
than variablca IO be aolved. Add dummy ronstrainlS or
dccrcuc lhc numbcr of vlriablcs to be IOlvcd. Scc Chaptt
14. "Solvin1 H1na1ion1," for 1 more complcle dcscripllon.

too r... tltmtnll


This error mcuage marb a Fouritt tnWform, cubic spline,
or linear inierp>latioo unctlon applicd to a vecior wilh roo
fcw clcmenis. Splines and linear intcrpolltlm rauln1
vtclOrS with a lcut 1wo clcmcnll. Pourla lrlmfonm
functionl and lheir invcnca muire least four clcmen!I.

Yciu included more !han r.ny constra.ints in a solvc block.


too m1ny tubscrlpb
Y ou used two or more :rubscripu on a vector.

too many polnts


You tricd IO plot more poln11 lhan MalhCAD can handle In
one plot.
aadonntd

Thc indical.t:d ...-iable or function iJ undcnncd. To dcfinc it,


en1er thc variable name, followcd by a colon (:) and 111
capre.'1ion or numhcr for ill dcflnilion. This error ollcn
mcans you havo 1ypcd 111 equals sign () huiead of a colon
ro define a variable. To defino a variable, you musl u.e a
colon. IC you use an cqua1s sign, MalhCAD assumcs you
want IO calculatt lhc valuc of tho vuiablc.
Y'"' alto ...., 1hl1 m<>Hll" lf you ''"" a vorlahkl lncom:clly

In a global dcflnillon. IC you usd"a va.rlablc on lho rlght sido


oC a global dclinition, !he variable must be globally delinee!
abovt lhc dclinion in which il is uscd. lf you use a locally
dcfined variable ora variable whoso globel dcnnilion Is
Mlow thc place whcre 11 Is ...o<!, MalhCAD mks lhc
variable as undefined.

An UlllkflMd crror ls.ol\cn 111 lndlcatlon thal anothli'1


equalion furthcr up In the document lt In error. IC a

...,--- ----..

e: l.
~ :.:l

.;: : ,

::::':!

~ ~

s
~-!!'I ~

~ - :

:::::J

C;

i~8!'.'': :::;\;:
t!rror Mesu1es

~I
J

dcflnition Is In error, thcn any Olhtt equatlons furthcr down


in thc documcnl lhat depcnd on that definilion wlU bo
markcd andennrd.
anderflow

You evaluatcd an cxprcssion smaller In magnitude dlln tho


smallcst posilivc number that MalhCAD can l'CJn3Clll
(aboul 10 3 ~.

~r~

anmalchtd partalbesls
Y ou cnleted or calculated 111 equatlon that con tal ns a left
psrcnthcsis wilhout lhe nwchlng rlght parenthcsis. Edil tho
equation by rcmoving thc lcll parcnthcsis or adding a
maiching right parenthcsls.

~- : ~

wron1 di.e vector


This error markJ a Poaricr transform runctlon who9e
argumcnt has !he wrong number oC clcmcnt:s..Dt, cf/'I, and
lcf!l rauire as argwncntt vecron wilh 'l" clcments. whcn! 11
Is a wholc number greatt:r !han l. IJI nquircJ an .:umcnt
wcror with 2"+1 clemcnts. whcn! 11 Is a wholc number
grcaicr !han O. MathCAD lncludel v0 az an tltmenl cf /M
artumenl V<!ctor (wtltu you challtt ORIGIJV).

~3

c:...13
e:: ,.
1
~~

., 3

~~ :.

g:.3

~!-~

E: :! 3

g .J'.3

_]

lf-.1 -3

~~t~
1

---=-=o--- -----

,......
r-------..Mffill~
! .. ~.
~ ~:
. m';':~r'0~;
~;~
:.~;;~
;zj~':;~
:,4r
,., <t~

-------:---------~""'-~1.11

..J

.,--.,::"I
,

-rrlr~
-:r

Startup Options

'-~

E! ~

!:13

EJ!i

[;:.Lft

c!:!I
Ei.il
1

E>:il

d:il

cr

E .:JI

!;!:JI'

!;:!:JI

1 $

114

r,

Pi

IOlit7.4''.

":t:at:t:i-1;~tff4f$AP lh'fr*M..

This appcndix describes lhc contents of your MalhCAO


diskcucs. lt a1so conlains a descriptioo ol MalhCAD's slash
opons (oplions ro spociy whcn you SWt MalhCAD) and sorne
hints on using MalhCAD on han! disk sySleml.
.

l1s appcndix conlail\l lhc followin scctioos:


Coaleats or your MatbCAD diskettes
Files included on lhc MalhCAD disketles
Optloaa ou 5tartln MatbCAD
Slash options lat you IYJlC wii MCAO: graphicJ canls,
on:ground and bacl:growuJ colon, man111l mode, c.<iandal

memory, command files


Hard disk $hortcul.I

DOS lhor1cu11 for MathCAD and a t...d disk

....

1.

: . ,,. .. ..-:..

,,.,

:., ~;

~ ........ ...,. .....

i.

- ; r.1.... ;. ... ~, ., ... ........'{. !".':'"'t'

'. ~.,. .:.' -' \.~~~. ~<


. ... '

254

Contentsofyour.MathCADdiskeUes- .

System Disk
ll:MJ.EXE

Tht MalhCAO progrom.

ll:MJ.llCI'

Pnw dffltr lilo. Conlaiil inlonnllion ~


prWOB tO MllhCAO con prW doc:\rnonts.

IC/TMllCf

M.il!CAD lonl flot. Contain inlonnation lhat


MathCAD ,_ to dioplay and prW opodal
dwxt111.

Auxiliary Disk
IUOll(.llll

ll<SMCO
COSllCO
UllCUllOIOICO

IMlll

~tolo

lar MllhCAD.

A Mall1CAO c1ocumen1 lhol 00'11Alna lhe onlino


- ooln. lDod lhla lle lrolo MalhCAD and rHd
l lo lird ru abolA loahnt added der lhll mantlll
-pllt"4d.
ln11 filn . lhooo MathCAD doeumllllt oonlain ul'll
oonwttbna ln lhrM oomnu)I'~ UMd unl ty11.ma:

, . cg11)'11ern (-.! on conlimtl111, grama, lt1CI

..:onds, wilh tlU Iris tor oladrtcily), lhl MKS


llyllern (based on maten. l<ioQr11m1, uconda, lt1CI
coobnba), lnCI lho US Cuatomary systtm (besed
... ..... poundl , ....,,.,., and """""""' Ead1
.,.iern COOIOlno baM unb lt1CI lrlil oonYOJ>ionl
dorived 1-om lhooe !>Me unb. Yru can aRJtf1d
, _ lilot lo lhl and of our documtr111 or o.c and
i-si. indMduol lrlil~ lrornthlM filtt
lnb """' doc:\rnonts.

S1rr!>1t MalhC.&.D docunents. To '"one of lhltt


doclmorU. 11.i MathCAO 1t1C1 lood 1111
~ lltnarno. Slnoa IOf!HI dcxuntrtt

cmtoin ~ing~bnl. youmoynnt


ID lood thtm il (!CM /W.

tJJen11H1).
RE.IDE.TXT

AppendiC

Yoor MalhCAD disk.enes contain lhe rouowing files:

ll:Ml.IV

~'~

modo

S... inlormation 11 REMME .:O. blA In 1 lnl lila.


y.., con IHd lhil lila il 1 IHI edllor, 111 l wlh lhl
DOS TYPE oomrnand, prW l trorn DOS. Yov
....,, leal llit .. ltO ""1hCAD.

MathSoft a//C!Ws and encolfl'atu "'" ta ma a bachp


cop7 D{tM orltlna/ MathCAD disunu.

IL=
r'-

~..

e ~

t.~~

~-! ~
1

LS

~-3
_I

L= 3
E ..

13

1
L3
1
[;-:1 3

E;- -3

~!~

El3

1~

b-!~
d~
;1

, ,.,:,;.t :: ~'$Nt:><1~-l.~~:,&~1 ~:jW~'J. ~t'. ~' ..


.\' 1 ~. ,\ /:: i:~ ,/}_{.f'; ~n, ; :~~ \~ :.;: :e ~)?e, ::t::~ .,~ . J:;;:~: :;:;e:;; r~. U<>~ .;.:z:

.;.\':!~' >' n'"\~ tt,f'"'-'l"'~h~ .:{t ~-.r;1 ':~ ,........ >".-.:":: ;).:~ :.\'b.'~~+r~

: : .! :.: !{~:.t~; ~.~

Startup()ptlont

Slash optlons ror &J'llphlcs cards


MalhCAD m:ognt. the followlng slash optlons 11 .eltct a

Optiuns un starting Matht:i\D


Normally, you start MalllCAD by typlng lhls at lhe DOS prompt:
ICAD (.l]

MathCAD attempts to ldenlify whll kind o( grlphlcl Clrd you


have in your system and runs In a mode appropriale ID that
graphics can!.

cllsplaymodc:

_.,,...

.....

;e

eo1or1Qnpti1ca~pllr.Thla

~ lncblno lhl &M>oad Orapl1b Adlilo

lf MalhCAD docs rWJt properly ~ your graphlcl Clrd or


l you want to force MalhCAD ID nin In a dlfferent paphlca
modc or whh dlfferenl colon, you can use 1/o.ilt opllolll on tito
command line. You can abo me sllsh optlons to sllrt MathCAD
In aulOfhatlc or manual mode. To run MathCAD with sllsh
options, type thls at lhe DOS prompt
.

lt1CI 1111 l'!oleaionll Grlllliles Adlp. Thl chp!l


.. bl1ICll and wt1ilt wth 6-1() by 200 -*Alon.

M
l

ICAD /s

'

ln.'1ead lhe t shown henl, 11111 any


described In thls 9C1Ctlon.

modo- ,

~ canll NI ernWll lho l!M Color/Gr1P'll

HliCiilM iiOiiOChi01111 GrlphlCiCllii or Ciiid


~ HeraNe MollOCllromt Grlplb.

Eiill!C9d i1pnlta Adlp~l.laihCAO 1

reoogrize u. Erhlrad GrlpNca Adaper In yru


.,....,., MalhCAD ""'"""'" wlloll10f rou ..

uainO-oroolor"'"""nl'mucfl mornort .. Ofl your ffiA and """


~. uainO lho ~ _ . . molAlorl.

or tite aluh optlona

(Set w.c, ID.. /U bolow.)

l'oM c<211 iut sewral dl/fe~nl 1/o.ilt optlo111111 onct. '""

fH

unmple, to iue MathCAD in lllOllM<JI calculall011 /lttH wltlt


a CGA d/.Jp/ay, typc:

rcu. wm>ld coi0r ''P'" 11ur.1n

No,7><-.CIOJI moclt Ofl ""'""'*' oolor et.play,


uainO "111 oolorl. leq<n. 1n EOA will 25till

lhla """"

~ tn!'IOJ'f. l )<lll at10Jrlll lo on &4K EOA. rou ,.;a noc bo lbla to - ""
..,_ on grophL Ol1 a MK EOA wth a oolor

1CAD /C /M

MM"

Warnlnr. MoA:1 nrrt '/fJM


ordlnary 1/tUh (// tUtd nal
a bod.rlash (\) for IMtt 1kuh oprlo111. TM skuh on tlttt
Samt uy tlJ IM qwsrlon llllJli.

clll!lll)', -

.tM

itC

rr. or v:.,

(Q.I., nioiioctuoma morltor.

ICU: atwldard colof rmrO>t. l\n UliCAOo


., EGA
-.rloft d 640by200,lhl11ridl<'

~ d Cok>-~ Adlil. T1 la

...... to /C. .... wlh flt/'I. oolorl.

/t
/A

Tolhlbo T310C4a'locll'OJTI trilh ~ d ,


bf 400.

AT lT S30o MrlH. Monoctrome trilh ~ o


840by400.

AppcndlxC

ish optlons for foreround and backround


Ion
lhCAD abo includca opliona (ar aelcclin (oreround llld
karound colon on aa IWwiced Grapha Adlptet willl 2.S6K
boanl dlsplly momory. By dctaull, on a 2l6K EOA
ihCAD wcs wbi10 dllillclCIJ Clll a dllt blue bckround.
1 can 1110 lbeu duli opiom la addilion IO lho onea llllCd
ve, all oa die ume CClllllliand ~
do ..- 11o.. a ~ WA, )QI C1111101 cho.nco lhe
smund or t.ckpwlld llQ!cva,

1111

1ynw lar Mllinc CUIClfOUlld lnd bckround colon 11 u

lWI:

llCAD /rnn /ann

1"" 11 codo lor ona OI dio 64 colon lhll 2.56K EOA can
oaenL /r spocillOl dit loreround Clllnt; /a 'l)OCifla lhe

WUlllf. l/10M clloou tapproprl4u colors, tlurt lrlO)l llOI


'""111l IOMI llw cwsor, 1c.u. or plots. on 1/w

'"""'li

ICl'elll.

To c"'1A11 bod1roMN1 colo" wlli/1 usU.1 Mt.UltCAD. press


[Ctrl)D. Eocll trw JOll preu (Ctrl)D, MatilCAD
cltoA1111lw scrH11 bocqrollllll co/or, lllllil 1011111 bod: IO

1/w orl1iMI bock1roliltd color (blU1).

When you swt MalhCAD, lt nonnally 11a111 wilh en cmpty


acreen. You can al10 ltMl MaahCAD ""' immllllialely hain
Mllldn1 un 1 oallun ducumcn1. J1111 pu1 lho IUcnamo un lha
commud lino whcn )'Oll llln t.WllCAD, u lollowr.
NCAD tllen.ae [.JI

Lpuunilwkw,

MaUtCAI> wlll 111111 by k...U111 Ui. Ma1hC All 1k><:i1111e111 mo

Jl/1nawu. lf lt oabta. (lf.you Jon'I 1pecify.,, c.a:iwsion.


MalhCAD UIW1ICI lho filonlmo ndl In lho CXlension .MCO.)

~--

Far files wilh limc~in calculalions, you may wan1 IO


lold lho filo in manual calculalion modc. To load lhc lile
wilhout processin any oquatiOlll, lablcs, or ploll apecify IM on

11

1ho comlNlld line &Ion wilh 1hc lilcnlmo:

.~~~~~~~~~~

Mllad

....

NO.-

::wnple, IO run MalhCAD wi .. att llllClllO red backpouod


1 yeUow (red+ n:ea) ~ lype:
1CJ.D

MCAD /K ti.len ... [.J)

1bla ~ MalbCAD, pw MalbCAD inlO manual compulltioa


lllOdc, lllld lolds die indicalOd falo.

Expanded memory

o colon 11111 ldclili~ )11111 Clll mU: Iban in 111y combinaoa


Id.in !be approprialc IUllbcrs. For e.umple, 48 ia yellow
rccn) lllCI 36 11 va- brilll red (red + lllalJO red).

/ru

tao

,_11-

5!1
li:'.:-: 3

_J.1/3
l!_

1-

Whea you swt MalhCAI>, il oonnally lakcs ali availablc


memory for iuclf. Thia includes bollt coo-.:nlional mcmory and
expanded mcmory. (F.Jpanded mcmory is add-oo memory ll\lt

conforms &o lho ~ Expandcd Mcmory


Spec:ilication.)

Uyou c1on1 want IO UIO ali availablc Cllpendcd mcmory, use lho
/L switch. Typc:
MCAD

/Lnnnn

.f '

~ "':t

l.

!...~.~

Starlin MathCAD wllh 1 dllCumenl me

lacnaino die codo for die cdor )'Oll deeiie, UIO lhI Chlrt:

3Z

.J
l...r~u;

15~
l!:u.:il

l!:.Jbt
'

Swrup OplioN

RcJlace 111111.1 wilh lho numbcr ol Kbyl<ll of expandcd mcmocy


yuu wam Mall.CAD IO lllO. (Noto lhal lhcro 11 no 1paco bo1wcen
lho L and lhc numbcr.)

U yoo havo "l""ied mcmury bu1 you wanl Ma1hCAO IO inorco


11, 1ypo:
MCAD /LO
Sulfl#

an.1111111# '""" n111n1ry fa1r 01/ur 11>1/ic111/mu. Ulf 1lu /L


swilCll willl MaihCAD wltt11 yow rU11 ll w/111 Jou:h programs.

~~

J!:1

MailliCAU nmnally run1 thc conllurallon lllo MCAU.M<.:C whai


h 1iaru up. You can svccify a differena comllWld file.orno

l~

wik:h,

MCAD /RJ:J.lename
MalhCAD UIWUCS. tuo ... ICnllon o( .MCC if you don't spocy
one. (Don' t use a spaco betwecn ta and lhe narno of lho

command lile.)
To llMt Ma1hCAD without loading any command file, ly>C:

/a.

MathCAD starlJ up wilh lhc builtin syslCm de!aults.

!~:1
~!.:1

tr:

-]

LJ:I

I+

wid1 lho , .

To surt MalliCAD wilh 1 command lile _calledjl/1nawu, lypc:

llCAD

.,ft }Cf::~%2iMVJ'h1 L?~ , :....... - .~

Addln: MCAD to your DOS palh


havina

' chantt tlirt'CntiNI cvcy 1i11lf' you ui;.e M"1hC AD. Acld

lhl1 .:ocnowld IO )'OOI AlTIUUXUC.llA'I lllo:

JATll C1\~
(ll yoo aln>ady have. PATII command in yoor Alfl'OllXOC.BAT,
jull .. kt 1 MCAD to 11 .. ""' 111

Runnin: 11 commund file

- 11

1.n.:i

'""''"'uJin1"''*''"'"'1r111lr1mtn4n1J "''/llilll thlll

"' ...u.

:, '" ''

lf you ha-e 1 hanl disk, yoo can use lhc PA m conunand IO avoid

a1pllcu1iunJ pro1r<J11U 14!4 CHtly parlo{ txpand#d mtmory

UMUO\AUtl

llnrd dl~k shortcuts .. "

This soclion deocribel some Wl)'I IO makA: Mall1CA1> talCr IO


use.

Yow con save alurnau colf/gwadons in commaNifiles y


cllonging lile prinler rype. 1111 value ofTOL, or ollttr
compon111Js of 1111 coll/fgwario11. and 1/ttn llSing lhe
connpan commond. Sa"" 1he vorious configwaiions
Ullder differelll[lNJllll:S, ond 11te11 use lhe /P.. swiiclt IO
/ood 1/te appropriole conflwado11 wMll )""' SIOrt
MaJhCM> .

)'Ollf j>Alh .)

lf you hooc your compuiu whh 111<.10 nlific1tion1 IO


AUTOW<llC.BAT, yoo can &lafl MalhCAU fmm 111)' disk Of
dircciory by ly>in:
1CAD (.JI

Wlicn yoo lypo lhll, DOS scan:/lol ltl :'>1111," fuwls MCAD.HXH In
lhc MCAD dircciory, and Nn1 iL

Settin: up your own MathCAD system directory


U you wanl IO put yout MAlhCAD files in 1 dit>CIOr)' olhcr !han
lhc MCAD dircclOry, lell MalhCAD whttc 10 find lhem wilh the
DOS SBT comRWld. Uso lile SBT command 10 sel lhc valuc ol
""' DOS eovironmen1 variable MCADDtR IO lhc dircctory

containing lhe MathCAD 1yS1tm fes .


For exJ1111plc, if )'OU pul all lhe MalhCAD S)'SICm files in l.he \BlN
diRclory on drive C, include lhis command in your
AUl'Ol!XECJIAT file::
IH >CADD~:\BDl

Whcn you uso lhis c:omnwld. Mal.hCAD looks fa< lhc Help file.
lllc priAla-<lri- file. llld fonl files in lhe C.'JllN <lir=ory.

--......-.,._.._
:~ ' .. ~ . .. :. ~: ~:~~.;: ~\:~~r.

\ ..

:~.~... ~~ ~. ~ ', ! ~'.~..;:.;.

; '} ;:

. 251

::<:.:{:.~_:..c/'.~c~~.:,~

:.,:::;::;,~
AppcndiAC

L;3

Es
1
E :!

Printer Drivers

~!~

..

e ~

ET!3
E3

E'! 3
L l!!!
1

E-, -~

;;i3

~
E~

l
l
g=uJ!

E: -!!!

~f

ThlJ llppmdlx cbcnl>cs MathCAD' printtt dri_.. ll1d


explains how to ldd JOllt own primer drivcn to those provi&l

on !he MathCAD S711em Disk.


Thl1 llppmdlx contalnt lhe followtn 9eetlon1:
Prlattr drlYfn aad prlndns
How MathCAD U3CS lhc lile MCAD.MCP toe prlnting
Spttll'kadont foto 1 prlnltr drlYtr
Dclcriptlon ol c.:11 ol lhc len Unca lhat mab! up prinld
driver

Plolltr drfnn
How plouer drlven di!Tcr frorn printcr drivers
Addlns a prlnter driver

How 10 ldd )'Olll' OW11 prinlt.r drlYCt IO t.hoec provldo:l

1
Appcndix O
dtllcriptionl whcn you Wllll IO read, auu, or modify a

rlnler dri\'en und prinlin11

MalhCAD prinw driver.

you 11a1t MalhCAD, il searchcs ror a me lho


nitt.Jtivu file MC>.D.MCI. Thii file ia malo up ol prltt1r
...... - lhorl dcacripciorw ol lho prinlen lhal MuhCAD
oporu. MalhCAD U1C1 lbil lile ia 1WO w1ya:

ien

A note about prlnter drivers

Whcn you 1elect 1prinu:rwilllthe1<1tdprla1ercommand,

M.alhCAD ahow11 a:rollin1 mn>u oC winw 1~.


M.all.CAD dclaminca lho 1111 ol poaiblc primen by rudln&
lhc prinla-driwr fl&
Whcn you print. MllhCAD lllC.I d1tl approprial.e prinlcr
dcocriKioA in lhe prinla-<lri- filo 10 dclamino bow 10
ecnd 1eJ11 llld npbicl 10 lbe prinw.

Prinltl driven aro inhcm11Jy ICChnical and hardwwc-OcpcndcnL


MalhSofl hu mado lheit spccif1caliom availablc IO wcn in lho
hopes lha& ltlChnically oricnlCd usen will be ablc IO cxi.cnd
MaihCAD'1 uubillly.
U you do llOI fcd comfoneblc wilh C3Capc scqucnc~. binary
raphica rq>reaelllalion ot lhe olhel aspocll of communicatin
wilb prin1tn, do not lry ID do any more lhan makc mina
modiicationa io 11111 or.lallna prin1et driven.

U )Oll do fccl oomfortablc wilh lhcso ICChnical 10pic1, read your

Vlte11 "'" 1/Qrl UasltCAD, 11 loobfot llw priltltr-dtiwrft


1) "' 1Jw ,..,.."' dW: Mil dirwor, ll U. tlil .rclDrf
-~d 111 IM DOS~"""-"'~- MCAODlll. IMd J)
1t llv MCAD diuc111ry"" tlw cwrN d.t..

:neral comments on MatbCAD printin


dlCAD prillll lllinl bolh Che lelll llld aphica QPabililiea ol
prinu:r. Wbca MliJlCAD prinu. documcnl, l ICllda linea
1W inlt:npCl'ltld wilh IllCll ol paphiu. Bclwecft lho linea ol
1end paphics are inolioD commandt thll move !be prinlbcld
llDd dowa lho paae. Wbca lhe 1U1 llld paphics aro
chroniz.cd c:orrealy, dlcy liipl IO fomi a complclc piclln ol
MalhCAO documc:at.

prinia documcn11tioo carcfully befare uying IO CrcalC a driver -


fot 1 ncw prinw, Ofltln aoven! lriala are ncccaaary befare you
can p1 a wivcw worn pcrfcclly.

Whilc M.lhSofl Tcchnical Suppon will do 111 bes! IO hclp you in


your cffons IO erute prinltl driven, our abilitia IO hclp are
titniled wilhou1 lhc aclUal primer and primer manual in fronl of
111. Wo will connuc IO c:ttalt driver1 and c0Ucc1 drivcn crealCd
by usen lhal wo can ltll lhem, ccrlify lhem, and makc lhcm
~ly availablo.

'

jl'31
-in-

lf..... !I

Componentsofprfnterdrlvers.

11;~1 - ~

O..Crlrtlo- t . 1911 w.,...t .


hl\1 \li, 1lTI\llT\ll'tf\.Jn

,m
11~ ~ ~ ,-l
.......
11. '" ,,
"......... ..,.,,.., .

printct m.., abo spccifiea how IO priPI clwaclerl in lho


E.tlend<:d Chancitt Sa. U lbe printct hu lhcsc Clwaclerl
Jt in,MaihCAD ICnds lhcm u ICXL Unoc. MaihCAD ICadl
m u dot nphic, -.., :na lbo fOlll mu 011 lho disk io
cnnino lile dol paucm.

nra :!I

irlLil

Prldl ..

1l. t J 4 442$.? . 4.0


_;_

f1.

444p p ;: ,t ;.Ali.ASJ

,.u....

~1,tt

"""'
'
m.l\nl,IC.

clw

etrtng.11rlngl,

r. ,.,. r.r.,.&-. UI ..t

r.,.,

,,.,1lla wt,.t

\UTO'Q.)"a

.. u.,.1 A 'l.llTf/..e "

.._,. \lm

11~ :il

F1g1n

),

lfl'

_._,.. _

. ..

N.n.O QI; .,.;". - - -- -

Rox_, llll>gi ol dltr"'1on.

For charactcn Olhcr lhan ordilllll)' ASCl c~tcn. iue

(ASCII chanactcr numbcr 27). To acnd 1 lilUlll boichl&lh


WC IWO backslashcs \ \ .

1: Pmlof- llle

Thc prin1ct-<lrivcr file is an ASCU Ole like any othcr 1ex1 lile.
You can rcad and edil il widl 1 ICXI editof.

ll

-~;;;,; ,he

'4...t, tom 111111 MI

\nnn . wha m nnn i111h i111al numl)("t ftw d..r. ASCII Cotlc
(oc lhe chwllCIU. For uwnple, \027 relfe>all.s l!SCAJ'H

nhoaJ.,, . . . .

"ll"r'-ltZTb.9t1l'-'l'f'o"""'

ll\1

Raprfi"'1111 sroelo loclol,


olpoosi>lololls

convcn1iona:

Prlt1t.l"'t ,.Atff'tl 1NUWsJUl)if>W

o..adrll

Riiilf....-.wtio1tronb.nlndoamain<Ulm

For slrings of ctwacicn. MalhCAD uses lhc foUowing


\U

W.,alca f,....l 1 u phels _.,Ul.e( l ~\.M


U.rtl~I

_,...,,

""'1g2, ....

Cb,...hr Ntrht ll 6 Y
'6 UJ \lJ \1

11~ ~ :11

Qtt}.P /~f'

9NUW,U'tZ4'.

''"''l1Nl'f'\l1'W\lft

ll~lll~,.,.

'

lll1
. . . . ,. \lll'I

u~ff:i1

,.,_,. 1 u ,1 ..1. MU\., 1, l ~l..


U.rtlal ,..u .. A \UTJ:/c "

~:a

'""'~

~rrlll~

lL~l.:il

'acclioa oa "Componcnll ol prinia drivers. swline oa lho


'' paae. txplains Lile linel in lhc prinru-driver file llld how
y delcribo the chnclcrillica ol prinla1. Uec 1bceo

The codu in prinicr driven involvc numbcn, chArllc1a1 and


wins. In thc descrip1i<>RI 1h11 follow, lhese CO<~ are
rq>rC$C11LCd u lollowa:

CU.r.clH' "9lrl 11 a l Y

11 Lfri :11

Figure l dlow1 pan of a prinicr-driver file.

J!
ll .. 111 :JI

I{

261

Prinier Oriven

JII
[[p..=-

OlllCAD printct drivu conllinJ lho information MalhCAD


:da IO ICnd ltXI llld npbita IO a prin.a, includin lho Wo ol
tlwaclat, lhc fomw and codee Cor acndin pphica. lho
ltll1I o/ ICXl llld pihica IDCll IO ICD4, llld 10 011.

11

Each prinitt is dcscribcd by a scquencc of len Unes in thc lile.


Thc firsl Une coniaino ooly a pcriod. indicating thc bcginnin of
a prin1.c1 dc3cription. Thc nexl line spocifies thc prinitt's name
llld numbcr !oc 1he scrollin menu. Thc mnainin linea deicribo
lhe prin1et'11CXI and gnphics capabilitiu.
This stctio11 descri~s printers onJy. Fot' plolur dril'Cl"s, su
the ne.ti seciiOlt , "1'/D11erdrivers."

'

or 'd. which <e(TCSCnl


Sorne slrings can include
numbcn IO be sem lat.cr. (To scnd a literal pa-crol sign, UJC
n .) Scc lhc spocilic instrUCtions fOf CJICh strin; in thc

dcsaiptiono bclow.
U a strin is llOI appropriatc for 1 particular prinl.et, use lhc
null string (\O) iJl iLS place.

llic n:a1 ol lhs aoc1ion ducribcl CJICh linc in lhc printcr driver.

Llne O: Perod (divider)


lklwccn each prinlcr driver and thc nex1 is a lino cootainin
ooly puiod.

Each linc in a prinitt driver consista of:

A namc, likc Cb&ract..: matri.z. followed by a coloo


( :).

A scrica of rodcs lha& fall

mio 1 spccificd fomlal. Thc codea

are scparalcd by s>ICCS.

Une 1: Printer description


Thc aelectprinttr comnwld usea lllis linc w dc1ermine whal IO
show iJl thc scroUing menu.
Thc formal Cor 1 prinicr descriptioo is u Col lo...-.:

Decription: n. ~tr1ng

. ;

~' "~. rt\~. ;<~i:}i~i~~~~~~ii~~1:~ .\;~-~:~~2: : ~~ ~:~ . ~. ,~~-~-~~,:_'..

._:i

.~.. , .~

_ - '"

___

~- _

--

__.._.-

----- ':" ----."' ,........~ ~ i711n_:"'.~~ ~-

. . .,,....,..,..r.. .... -. ...

~ ~ _

,..'~.~-"'.:~~~::+:~:!:.:.-;;:,::-::~~::i;.-{;~~rFi,: ;.'...~ ~.. . '.,

.1. i ..

262

Appendi O

Forcumplc:
l>eoriptlon: 1. I Orapb1o trintr#

~: :;'.L~,s:~:, :1: ~;~-: d~rcj e,r:_ _'r;;


1.

Llne 3: Resct

ao

ool

n . (a tlccimnl number followtd by a pttiod) Is thc numbc:t


uscd to identify lile printct. Two printer drivers cannotshare
the samc numbcr. Gcncmlly, printtr drivers are numbcred in

se<1uencc from thc top ol thc file.

.t r Jnq b tbc name '"'"'" on tho printcr mcnu. This nan.o


can be any dc..criptivc Slring of up to 23 displayablc
charac~n. (lf you use more than 23 charac~n in any
prlntcr Mine, MathCAO canm read tho prlntcr-tlrlver me.)

Thls llne comains tho codcs sent to rcl!Ct the primer.

'Thc formal Cor l'O!Ct Is:

For cxamplc:

baat: \27&

,,tr1ng is a stringof chamcten and ASCII codcs scnt IO


the prhu.er after MnthCAD h.u lnlhcd prlntlng, Use tl1l1
atring IO rcsc1 thc printer so lt Is rcady Cor thc next print Job.
On mos1 prin~n. the rcsct string should also cause thc
prinitt to cject the last page of the printouL

T~ 11iurtber 01 t~ ston of o prillllr tscriplOll Lr lmportan1


ll IM selectprlnltr commlllld. To StUCI IM prinler
11iunbertd n t tM printtr-drlwr jllt, 11.tt 1/W comtrllJlld:

Llne 4: Character matrlx


('Eac) lctprlntr n
WMll )IO ILft '"' ainnruvt commolld, MotltCAD IOWI
11tt currtnl prlnter stlcc1io11 OJ o Hltdprlnltt commalld 111

tltt configurotiofilt.

Thls llnc describes the slzc ar text clwacten on the prinltt .,d
tells how to print charactcn in thc IBM extended charactcr ICL
MAthCAD u~ thls dc8criptlon when lt aligns M>xt and graphlca
on your prin~r.
The formal Cor a prinltt descriptlon Is as followi:

Llne 2: lnitialiution
This line cootain.s die codcs scnt IO lnltiallze lhe prinicr.

Charactr matriz: m z n char

Inlt: 1ttr1ng

Forcumple:

Charactar aatriz: 12 z 1 K MC12X8.ICI'

mIs the number of venical dou per chancitt.

z is the lowercasc lctter z, wlth speccs on elthcr slde. Thls


lct~r scparates m and n.

Inlt: \24\0277\27r\27R\27o

"tdngis astring ofcharactersand ASOI codcs scn1 to


the prin~r bcfon: MathCAD staJts to prinL This string
should prepare thc prinlCt to acccpt MathCAD output. Use
\nnn ro rcprcxnl ASCII clwacltt nnn in this string. Scc
yotr printer manual for a list of escape codcs and their

effocts.

rlan~me

Forcumple:

Thc formal Cor initialiution Is:

n Is thc numberof horizont.al dots per character.


char is eithcr Xor K, r means the prinitt Is capable ar
printlng ali charactcn in the high cnd of the IBM ~tended
Charac1et Set. N mcans thc prinltt cannot print thcsc
characters, so lhcy must be scnl as dot graphics. MAthCAD
uses this code to determine how to print sorne Greek leacrs,
the global equals symbol (), and the plaoeholder symbol

(1).

l!::f ~ .
~ ~

E . J.~

ll9aat: ,,trinq

it..;.,.

:r:
EL~
1.
L~-!.3

r,-

E-;;i

~~

Llne 5: Page descrlptlon


Thb line describes page size and form ccd saings for yoar
printtr.

'Thc fonnal for page de9cripton Is u followt:

Paq: m z n "trngl ,,tr1ng2


For cumple:

L:':J

.:11.::1

~
1

Thi.t line determines lhe fonnat for lellding do! graphics to the
printcr. To tell a graphic:s printcr to prin1 dot graphics. thc
computer muu 1end an C1C:ape code spocifying thc number or
bytes of graphics to follow, followcd by the graphics in binary.
This line in lhe printcr dcscriplion lells MalhCAD what type of
escape code seu up the prinitt ror graphics.

The formll for the graphiCJ ourput dcacripllon Is:

Page: CC z 10 \12 \O
m i.t the number of printable llnes o( tcxt per pege.
MathCAD uses this numbcr IO determine when it has

z is the lowertllC lettcr z, wllh spaces on eilher slde. Thls


lctter separa~ m and n.

n is thc nwnber of chanlctcr columns per page. MathCAD


uses thls number IO determino whete IO split a wlde
document lnto saips.

atr1nql is a strlng rcprcsentlng aform fccd. MathCAD


scnds this string for all Corm fecds visible in the MathCAD
document hard pagc breab sflo.,,n u a soUd line on screcn
.,d soft pagc bruks mo...n on screcn by the pa1tltncth
c:ommand. Thls string is usually the formfccd charxttr
\12.

t r 1ng2Isabo1 lttln1 ~ntin an "lmpllclt" fonn


fccd. MathCAD llCIKls thil 1tring once evcry ., Unes, "hcn
m is the number ol lines per page spocilled in the prin1er
driver. (Ir a han! or sCJI\ pegc break coincides "ith one o(
thc9e lmpliclt page brcab, MathCAD sench the han! or rol
pegc llf'Calc only.) Thia Slring should be a formfccd
charac1et (\12) on prinren thal ~irc a p!lge eject 11 thc
md o( every pege (likc a la..er printcr lhll u:oca c.. "1ttt<),
anda null (\O) on printcn !hat use continuoos papc:r.

Llne 6: Graphla output

Grphica output: char "tr1ngl trlng2


Forexarnplc:

Oraphia output: A \027Ktcta \1l

rcachcd thc cnd of a page (sce ltrlng2).

L Vl

"'""' "'""'

1 !..!)

r11ana.,. Is lhc rwne ofa font Ole on thedlst. MathCAD


thla font me 10 print chalW:ten not In the printtt'
charactcr set. lf e/sor Is N, MathCAD usca thi1 font Ole to
prinl ali etcndcd char.::tcn. IC chm 11 r, MathCAD uses
thi fonl Ole only to print Oreck leacrs not in the extended
charncter set(),, o>, and p).
u.~

Set tht Systtm Dld/or o /lst of/0111 ji/u. T1tt /olll jlk3
/IJ:t MDnX/l.MCP, rtprtSt11ll1110/0111 m """
high ond n doti wiM.

1.

i;;-f.!_

~~-p:...:,::sit:L{.:_; .. L}:1..2}!~J.tE:n:?r./trf~tfitt~~:t~::!1rrr:n:

Prlnter Drhen

char Is A. D, or 1', lndicatinf thal the escape code for


btgin 1rap!Uc1 lncludes ASO!, Docimal, or No infcnnatlof
abou1 the number o( bytes of graphics. (MalhCAD lgnacs
thc distlnction betwttn uppcn:ase and lowcrcasc fer clw.)

1ttr1ngl b the escape code Cor btgin grop!Ucs.


lf cltdr Is A, thcn strlng includes tete as a pl.oceholikl

Cor lWO ASCII bytes whosc value spocifoes thc num b<r
ofbyw of graphics. MalhCAD sends this informatioo
low bylCftrst.

U cltdr i.t D, thcn strl1 I lncludes d u a placeholder

lf clsorisK, thcn thcrc is no te or M In stri111J .

Cor a decimal nwnber indicatJng the number of byteo ol


cnphic:s or tnd (where nis a number) as a placeholdn
Cor 111 n-digi1 decimal nwnt-cr indicating the number o/
bytes of gr.iphics.

~i.'r

------------------Appw.d-bO
t r JmZ 11lho'*"'POCO<loClfuoJ1roplik1. (lf llluo la
DO code Clf uoJ 1'9P/Ucs, 11101 Dull (\0) for llll lllin1.)

11J, ( numbct followcd by a comma) indica1e1 lhc nwnbct

oc piAoll by which lhe printcr ahit11 raphic1 to lho righL

is. w11
odicalUtl Ohy,.

1lis """"'"'' INliuas lltol lllt /Jyll l.s ac/llaJ/y pan o/1/N
ropllk1 tllld - pon o/ rJw uoJ froplc1 llTllf. TIW Is
pproprial1,/1N ,_,,,.,/OT IM OWala llkrolta 92

"""'
1t 7:

Graphla lonnat

IO lho prinlct.
raphlc1 fonna11pC1CillGI lho orioawloa 1114 m.Nna ol lho
o1
llllll 111., piluar.
''

arphlc

forma& lar U. ani>laicl form11 la: "

Oraph1oe to ...t: ohr piaele ehltt..S


111, 112 byt
1prinuir dri_., lllil 111111 oo OllD line.) For eumple:

.,.,.,. . ls-es t T pt. .l Mil'&M J, t ...,..

112 indlca1e1 die numbc:r olbyte1 requircd ID completo a


column of plxeb (for vcrUcal oricntatiool) or linc oC pixels
(fCJt horimntal orient11ions).

o.e..

.. ""' 111..w..&, llhr plul l1nl

fQt liori-.1. le(\ pUd llnc

vertical, boaora pWil tira


V fCJt borolua1. iop plJd fin&

"' Clf

("'Fin&" in lheac dcatipona "11ih-orda bil.i Far


PAmplc, a pphica
llanin widl ' V ndialCI a
priDl.er lhll prinu pUcla venically
1op 111 boaom
rClf t8cll
bi11 o1 ~dala.

.u

am.
m

rn.

?1-le ahitted ~die firat pat ol the npbica


fa11111 llld die aoc:md.11 aua& bo iacludcd lilenlly u

rllown.

;m.;j;~ .L!. ~ ?} :l1~~ht".lv~

tdn<J otrJ1192

'l'rUoal U. . 1 D \OZl&a+- \017'-dll

ohar la OllD ol lbe fallowlna:

Ohr

Oh r 11 A OI D lndlc.on llill ll111 CllCljlO c;oda , . . ""'"'


vmlcally lncludo ASCII cir Dciclmal lnform11i<w1 .lx1Ul 1111

; dlaw~ 111 n10Ye. (Mlil.CAI> lntn1 die dis111:1Joo


: botwecn uwen:uo and knw!n:ue fClf thls cllllr.)

t,.Anvl illho...-cxxlelar""'"'""""'~J.
U c.\ar la&, lhcn 1trln1I op<ionaUy includca \o u
pl.lceholder COf ono ASCII byio whOIO valuo apcclllc
lho numbc:r ol wli11 to moll'O ~ward.
U citar 11 D, lhcn ltrl111/ optlonally includca \d u a
placehold far a decimal nwnbcr indicaiin lho
lllllllbc:t uaill IO downward.
t: r fog2 I lhe c:a:apo c:odc fCJt ...,.., llpWard, nrcrnlcd
. limilarly IO Slrilltl depcadin Oll whethcr citar la A ar D.

1'111 wriu o{mioll wvyfr""' priliur "'pri11Ur, YoM ""'


O&COUlll/or Ui;,, IM tksaiptio11 o{ "l'rilllilt1 paur11," GI
ducriMd below.

.:::.f:[. . '.~~\' _:.~ ama

f[

,
1~
1
/ 1 ;J

11::J

,J!~
1[1!-~

The fCJtmll for lho cr1Jc&J lllOIJon coclca la:

, Vert1oal -t1oa1
l'orGUmplo:

J[;r!j

byte Cl>dl lho rJ>IUcJ formal. lt m111t bo lncludcd

llunJly u lhown,

Thla Uno doa:ribca lho cacapo ""lllCllCCI fot movln lho


printhoad cnlWly,

1(

1L :(

Une 8: Vertical motlon

1 Uno dc&GiminGI lbe formal ol nphicl -

".,.. """''* ol pj.ul -

:::: ~

(To lndicaic a shfl to lhc left. cnu:r a ncative nwnbct.)


MalhCADcompenaara cor lhis 1hir1 br hutin lCXI
dww:ICl'I by an oqual amount whcn it prinu lhein.

rcitar

lll/IJCAD llUl# ltaw- _, of


o{VoPJcl IJool /tap~lll IO t.. l6 IOlfW GI
"/frSI '1yf1111 IJlt #l'iltt/OT uoJ tT11pltie1. Wlv11 M411tC.W
uut 1111d 1w:ll o byu ti( fl"tlpltlu, 11 UNU IM by,. twiet. .

:L:~

![. !. ~

Prinoar Drl-

Por some primen, VCl\ical and horiwnUll motlon 11 unncccssary.


lf lhen111 no~ IO movo lho prinlhcad In a ivon dircction (or
f such moon is no1 possblc), use a null (\O) in place oC
1rrin1I ar strin12.

Llne 9: Prlnling pallern

Printinq pattern: otrln9

Por cumplo:
rd11t11\9 pattmt t9t9
a t r Jng 11 ma<lc up oC any combiruition o !he CoUowin

ftMU Ct.Mkil, 4,;oncat.onatcd tuoa.:h uthtt in any uulol!

1fr

l ii - ~

aornc cumples ol prinn peuans:

1nt11111 paUrn l <,UJ\jU<I

t lndicat.c1 a lino ol ICXI, folk1wod by a carrl.oe Rlturn

lltwlrltl' ckard ThlukJI (ftl Unt t<ldt )


This prinu:r hu a 12 x 8 characlct mauix. Graphica Formal
lal 11 pll ehlttd O, l byt e,1ouchli11c
ol nphlct la 1xdy , .., 1uel high. Sawhng &>hlc1 aho
OMIVCl lllCI 110111hr.-l tk1wn <MI() ... <J. n:11d y U> ""'MI 1hc ll<ll
linc ol graphica. So die printing pallan shuul ~nd 1 lirie ol
ICXl. followcd by 12 lincs of raphics. No VCllical motion is
nccca... y. l l ia1 il:

(but no line ccd).


nq indicaiea 1 li<111 cir line1 o raphica, Collowocl by a
canuao rctum (bul no Une leed). 11la111 optkM1al
del:imal nnmlltt lndicalln huw many linea of raphlc1
IU seoJ, (A lhlCI U lllHJ.lhil!I it IHIO JJiAel IJh if tlie
GraphiCI Formal is horizorual, Clf aevenl pixels hih f
d.a 0111hic1 Ptmat i1 veriical.)

I~

111:

~are

Toohiba P351 prinltt


ThiJ prinu:r hu a 2A >< 13 chanlc1er mauix. Ora1hic1
l'<I01Ull 11' V phh ahltt..S 3, 4 bytae, 10
NCh lir111ol raphict 11e1IJ all :IA piulJ vc11ically. NcWICI
ICXI nor raphiCI movca lhc prinllw:ad vcrtically. 11ic
Vo.uic.:al MtHion auinac movc1 1ho n 1no1 down ono whoLo
Une. So lhc printin paucrn should sc111l iinc of ,,;plucs,
followro by a lino ol &Gal. folkiwl by 11M1vi11 1twi ""'"'
down ono line. Thal is:

'l11t lu11111l IU1 11huln11'1"'-" it:

'.:Ji-i

'Jr

""'

The prinng pau.cm dclamincs how MalhCAD mixu lincs oC


toxl. linea ol rnphic1, ami vcnical motion IO crcat.c a complete,
lllned pao o( OUl>UI.

l!_t~

-rl _

llflpoTU111t Tht cotnplttt prinJing pulltrn slu>"1d <Uscril>c


lrow 10 stnd
llM1 of tl.11 anJ u// tht gruphics tluJJ 10
IJ>nf wilh tlrost r...o liMs of tul. Ma1hCAI> rtptaJS tht
prinlint palltrn as 1Nllf1 limts as M ctuary, onc' /or taclt
paU of /ines ro be prilrud.

nd movea lhc prinlhead <lown by /1 unlts, whcrc 11 la 111


oxional llccl1111I numbct. ThclO UIUIS MI dcWmined
by !he Vescal Motion descriplioo.
nu muvea lhc prinlliead up by 11 uniu, whcro /1 is an
optional decimal nwnbct. Thcsc unill are dclCmlincd
by the Venical Molion doa:ription.

rrinting pattern : tl29tl29

Tls is lrow MathCAfJ inurprtts n /11 fronl o/ou o/ tht


CO<ks In tht Pf'inllng pa11tr11: /f 1/re graplcs or motio11
/onrt/SIJ wlll<k o' d. M411rCAD sMbsrilusts 1/w
apPf'Dprialt ASCII or decimal 11wn/Hrfor lhou
plactlrolders. l/ 1/ie.st codes Ql't 111Wln1. MailrC.W jUSl
rtptau IM indicOltd code n rimn,

i~I

ZOil 41.

~T

J.4

L GS.40,41 A!U 4 _:

+:u

:.

', ' __:.;

.. 111

.....q

ac

ut

HH

i .,

lM

Appmdla D

HtwltlM'c..rd ~rJtl (75 dpO


This printcr hu a 12 >< 1 chanctcr matrilt. Or.iphics Formal
lsl 11 phh 1hlttd O, 1 bytH,Jt>c111.:hllno
or grnphiCJ is only one pucl high. Howcvcr, gniphiCJ are
prinlro jusi hclow !he curren! positlon or thc printhcad,
while tcxl is printtd juot above iL Sending gniphics abo
movcs the rin1heed doMI ono piAcl, rcady IO send the ncxt
linc of gniphics. The printlng paltcm must send thc tcxt.
thcn movo the prinl~ up almoot linc 1nd scnd 12 li11<11
of gtaphica. This !<>aves !he prinlhcad 9 unlu hlgMr lhan lt
ahould be lO Iinl !he ncxl linc of graphics, so thc Iinlin

pollun mu.u mova the prlndiend tlown 9 unhs baforc


printing !he next lino oflc1L That is:

~lotterdrlvel'9

..

Ploucr drlvcn aro similar lO prlntcr drivers. They lncludc IJMI


following Unes:

Llne O: Asterisk (dlvlder)

1
~~- f ~

E 3

~J3

pcrlod.

Une 1: Plottcr d~crlptlon


Thls Une Is the :iamc as a prlntcr cle~ptlon for a prlntcr driver.

frintlnq pttarn: ttu12q9dt9u12q9d

Llne 2: lnillalizatlon
Thl1 Unc b thc samc u thc lnltlaUudon for a prlntcr driver.

Llne 3: Reset
Thla Une Is tilo samc u thc 1'C8Cl for a prlntcr driver.

Llne 4: l'loller type


MathCAO uses this line to cletcrminc how IO cranslalC
diamctcrs, Unes, and dou Cor lh pkitter.

TIIC formal fnr 1 ploncr typo la U folloWI:

Plotter type: atring

Porcxamplc:

~::: r~

~ !3
~ !3

[.

1
~

:;:: : 1ii!i

=-1~
~-'~

~
1__1ii!

Plottr type: llPGL

at r J.ng is a codc thal MathCAD n:cognius as a plottcr


typc.

,3

In v....nnn 2.0. tltt on/7 l"l'f>Orttd p/outr rypt Is llPGl.for


lltwlttt-rac.kard Grapltlcs Lan11UJ1t. I/ you crtatt a ncw
plorttr drivtr, JO can WI'] tl>t /nitlalltatlo~ and rtJtl
11rln11, /nu llOl tl>t

plotttr typc.

'~

i:.':
-1

Ciii

1-

,':

Driven
161

Addlng a prlnter driver

rr you Wftnt lo ~<Id a prlnier IO tho9e alltlldy In tho .!nicr-drlY


file, follow thc~ .ieps:

Makc a bockup copy or MCAD.MCP under lllOlhcr namc.

Load MCAD.MCP into a plaln ASCII texl editor, like the ffiM
~rsonal Editor.

Cmlle ncw prnier driver and appcnd lt IO the end o( lhc

~r~

PrirHttr

e[~

Thc divider Une for a ploucr drivcr contalns 111 astcr!sk lnstcad

'.

,.

cAlsling file.

Re.uve MCAD.MCl'.

Start MathCAO and U1C tho Hlectprlnttr cornmand. rr


11..;m ro no omn In thc prln!Clr drlww, M11hCAO wllt
ahow it in lhe 1emlllng menu of prlnters. Ir thcno are erron,
M.l1hCAO will show tho measaao Cannot opta drhtr me
MCAD.MCP.

n.., taslMl way lo crcolo a ncw prlnlet drivcr la to modlfy an


ciisting onc. Makc a copy o( tho prlntcr most similar IO lhe ono
to be dc.1Cribed In the ncw driver and appcnd that copy IO tho
cnd o( MCAD.MCJ'. Use a prlntet number onc hlhcr lhan the
nunihcr ror thc IMt prlnlcr In tho me. Chanrc thc printicr name 10
a new namc. Tiien makc whaievcr modlllcatlon.11D the drl- ani
nu:cssuy befan: saving MCAD.MCl',

Appendi.o

i6I

... z:J.-

~. ~
~
tflW%1jri;1'~4ill4i~~
. i ,7J,\.:W.ci

~Jil

~+

' ' . ' :

. ,. :

. ) 1 '

Numerical Methods

E '3
[_ .1.3
1

E=f!I

ThiJ appcnd.ix de=ibca the delails ol MalhCAD's numcrical


algorilhnu. Wc includc these dcscriptioos ~to u=s can
beu.es undcnWld the behavior of lhc opcnr.crs, functions, and
Olhct rcaiwu or MalhCAD that use the3C mw.ods.

E_:r 3

ThiJ chlp!a" contains lhe (ollowin11 tcetions:

E-~

A note aboul aumerkal m<thods


How uocn should uJC 1he inonnation in Ibis lf'PCnrlix

E! -3

Zero u a factor or a numerator


Elficicncy WUCI wilh z.ero u a faclO< ora numcraior

laucrall

::111
L..[.!11
t"'""

Cumpuiation ol definiic inicrals wilh Simpoon's rulo

Deriva ti ves
How MaihCAD IXJ<llpulCS nwncrical derivative1

E -: !I

d~

Tbe NJ4I Cunctloa


Finding roou wilh lhe sccant melhod

Solvt blocu
Using !he Levenbttg-MNquanll algorilhm to JK>lve
simultanclOUS cquatiolu and incqualilie&

~6.

Matrix opratlollS
Mclhod.s used for maui lnvcnioo and dclcrmirunts

r::.A
~-r,:I

d~

#Q

zw

~-

~
l

e a

."r~;\:l\!ff!i~ttblh1tm;:1rnt.\tf.t:1 ~ 1 : ~:t~:\T''.t, :<:+

~.

r~

e .. a a

SI.

"

.:

--- ------------ -

' ~ ..

----

-------

. .,.~ ~ ... ~ ~ri' :1 ,.

.. ..

p1

noleabout numerlcal melllodSt

. .... ,

numericai mcthocll MathCAD uses


;orne type1i of calculatims, including derivativcs. iniegrals,
root function, solve block.!, and malrix operations.

1 appcndix describes rhe

1 computer.

theoe c.Jcubtions am inhc..,nOy limilCd in


omcy. Socc M.o1hCAD 111 generaJ-purpo.., calculallon
mm. i1 uJ1cs mcthod. th11 worlc in a widc variety or dilfercnt
: c.I~. llowevu. n. wi1h 1y numrriCAl algo<ilhm~. h 11
1ys possblc lo fllld spccilic cxamplcs Cor which MalhCAD'1
lods rcturn inaccuraic or mislcading results.
thc user, can vcrify lhe accut11Cy oyour "'sul11 and avoid

problcms by following thcse principies:

Whcn you use a MathCAD runction or operation that


lnvolvcs a numerical approximation (iniegrals, derivativcs,
thc root unction. sohc bloclcs, malrix invenion, or
dclC!lllinants). be sure your resulll are rta500ablc. For
simple calcubtions. jusi use common scnsc. For more
complicaled calculations. includc ~undancy ch<X:lcs in
your documenlS 10 cstimate whctha- resul11 an:
approimaiely com.
,;

Rcad the section in Ibis lllllllual on the operation or unctlon


in qucstion. The scctions lha1 descnl>c how lo use lhesc
fearures abo mention thc typcs oC problems that an: lilccly ID
yicld wrong answen orno answer al ali. In cases wherc you
suspoct MalhCAD'1 mcthocls may rail. res1a1e lhe problem
in 1 more slablc Corm or use MathCAD"s otha- ealures
(summation, itcnltion. and so on) to approimatc thc answer.
Sel thc buill-in variable TOl to achieve the desircd
occ11111Cy and spccd Cor numerically compuled answm.
TOl can tal<e on only Yllues berwecn O1nd l. Set TOl 101
nurnbcr ckiscr IO uro IO auain 1 highcr degrce o accuracy.
Set TOl lo 1 number closcr IO l IOcalculate more quickly,
but lcss accurately. See the descriptions in lhis appendix ror
information on how MahCAD uses TOL in its estimates.

Becomc ramitiar with thc numerical mcthods dcscribcd In


lhis appendix and thcir limilations. You can use thesc
dcscriptions to get a belltt undemanding or under what
conditions the numerical methods will ail or retllm
inaccUJ'llC answers and why.

.....

"4 =~

Appcndix B

~rical

'-~ --- - ---------~--

J?I;-

~~~~!: ;.:~:-~ : ~ .: :..~~: .; .::;;:'. ~:,'.;~::,,;i:1:~i?;.:Y1sr.11?~;~.~Sff.!'"1:::. :.

E:~

E::! 3

c:-!3
1

E ~ ~
E::- - ~

f:I
;,
e:=1

;3

Li :3

( :i.
(; ~~-::i

E!:3

E:-- .:i.

I_

I ; - :l_

::!:i

271

Numerical MelhOO.

Zeroru10 factorora nurnerato.For eficiency reasons, MathCAD always assumes lha! ror 111y
expression .r:
Ox O
and

'" .

Prucnted wllh a calculallon or lhls type. MathCAD wlll not


even evaluaie .r. This has the following consequcncea:

MathCAD will ins1anlly compuie a result oC zen> ror these


expressions, even if .r requircs 1 time-<011Suming calculation
like an iniegral or 1 summation.

lf computing .r would result In an error, Mad!CAD will


retum za-o without detecting the error. (In sorne~ litis
is dcsirable; in olhers, not.)

MalhCAD evalualCS O~ as zen>, notas an error.

Integra Is

MalhCAD's namcrlc lnicgration mes Simpson's rule.


This teetion describes how MathCAD compulCS thc iniegnl or
ft.r) from a tob. In this description, udmatta- tstimatL 1 and so
on reprcscnt MllhCAD"s lniemal approximalion lO the anSWCI.
Only lhc las! esllmate (the onc tha1pMSCSMa1hCADs10lerance
test) is availablc lo the u.ocr.
To compuic !he iniepal orJr.r) l'rom a to b. MathCAD ollow1
thcsc stepS:

1. Compuie utima1t0 by dividing the lnierval rrom a lo b inlO 4


subintenals. Compute utnalt 1 using 8 subiniervals. Set n l.
l. Compme the rwo most ft!Cellt estimatc:s acconling lo the
following teSt (where rtltol is lite smaller oC TOL and
TOL~sdmalt,Q:

lutilPlllU .- tsdmalt. 11<rtltol1

3. lf the twO most reocn1 utimattt pass lite iest In siep 2. "'lllm
tstimalt0 as the valuc of lite integnl. lf not. increase n by 1,
compute 1 ncw eslimatt,, wilh SimP300 0s rule by dividlng thc
subintcnals in half, and go bact lO step 2.
~is 1 limil on the number of calculations lhat MalhCAD

will perform in tcareh of an answer for an integnl. Ir il ecocds


l1tls limit without retuming an answcr, lite integnl Is mart.ed
wilh the error not coDYtt&ini.

1
,~Jil
,-

A..,,....iu B

rivalin'!I

The root funclion

ICAD'a dilftlall.iadon melhod rnakes ~ based


IC vaJuo ol lbo fua:don ll Olll' poiAI dolo ID dio polll o(
ra11wi011.

acction dcltribea lllow MMhCAO compuw dio clorM&.i"O


<) 11.r. In lhia deacripcloo, cslrtale' u a -1, lnd IO Oll

MalhCAD'a illl<mal eppnu.llllallona IO lbo -


&he lul Ollimaui (die'* lbll PllMI MaiJiCAD' IOlcnnco
' il availabla 10 lhl -
""'11

lmpulC lbo dcri..U-.o ollfi) IC .C. MlibCAO follan lbelo

MalhCA0'1 root funclioa IOlvea Cor zcrot usin lho SCClllt

""""4uo : .r

u/Unau0 acconlin ID Ibis fonnula ( rour-poinl eatima&o):


" ' - : (N-lt) -

~.v.?) .. "'+.v.?) -J\tt.\)J,Q

npmn: lbo IV.O IOOll CILll'lalGI ICCIOrdia ID dio


rin ICll (whero rd1ol il die lmlll ol TOL llld
utilnall.r):

'.uli"'4k1 : i + /t
J. lncrc.ue by ooo. Thcn compu1e lho 11ral/>1 Uno C<>MC<:lln
lho poima (ml""'k8 2,JC.uli"'4k,.~) llld (utima1e0 1,
Jf.utimale0 1)). Se1 X,. ID lho point whcro lhia 11raih1 lino crouea
lhoJICl'Ouia.

.-r

4. lt ml1n111-.JkTOL, ro&um

-d-, u lho valuo ol lho rooi

'"- - ua.i.u..111u<rwllol1

fwlctioa. Olhawilo, o back ID 11qJ J,

1111 wbetbcr lho eaimaaed aror la laA dlao lho ldlcl.,.


ioe.

Thcre 11 a limi1 on lho nwnbcr ol calcullllona lhal MalhCAO

O IWO moet RlOClll uj_, !*1diolealllq>4, l'OIUrll


~. lho Vlluc ol llle dcriv11he. U llOI, increMe by l,

E 11
1
E=il

followa lllCIO 11epoi:

1. Set 11 1. U ZllO, aec ,,_TOL.r, Olhcni1e, 1C1 ,,_TOL. Mab


lho ollowin inillal dollnltiona:

urtau0 : (ltr+.\) - l(l-lt)-

:JI

To compulO a root oC/(i) usin lho inilial ucq i. MalhCAD

".l. SolU"-"olCQll"dina ID lhla fonnula (1i-.poi111

llD).

~-.-:- 1! a

lbll ICC&lon dcacriboa how MalhCAO tompulel root(j(.r).x). In


lhla delcription, Uti"'4kr. u tmateI and IO on n:re...:111
MalhCAD'1 ln1Grnal oppmalmallon1 k> Uie an1wa. Only Uoo lu&
cima1e (lho ono lhll pwca MllhCAD'11Dlctance 1e11) 11
availablc ID lho UW,

wia,h .fiO..

initial /t. foltowa: u Id> lo'," .ffOi,r,

::"' ~

inechod.

L lf Vti)I < TOL, lllCll :i la alrcldy a IOOl, ao re111m .r u lho valuo


ol lho root funcon.

lllC die

~!il

will perfonn in aean:h ol 111 answcr ror lho root unc1ion. l il


~ lhia Umi1 wilhou1recumin1111 1111wer, Lho roo1 (WlCtioq

la lllllte4 willa lho error llOC COllercfnc.

lt ill hall, lnd &O ba IO Aep 3.

~~!.
1
1:=11

.!Ja

r - .

!~-::!-.

11

"11

l
1

il 1 limil 011 die numbcr o( ta1cu1ations &lw MalhCAO


rfonn in scarch ol 11 1111wcr Cor a derivalive. U it =eedl
1il wilboui te1..-nin lll llllMr, lho dcriVllive , m.ubd

t=t
[J! :11
TI

......
1.
L-r

-r 1
~...
.~ 1

O CITlll' DO( COllYCrial-

1 --.~

.r -

i.'. ..,

~ :_'(,i ., ; ;<

. ",; .

;;! ; - ~ . J.,

..<~\f. ;~ ~

l 7J

N"'1l0rica1Molhodo

Sulve blucks

MalhCAD'a solvc ueu use lhe i&eralivc LevcnbcsMarquanlt


mclhod ID solvc for sovetal conaninu aimuhancously.
M11hCAD' s mclhod la Ulkcn rrom lho public.Jomain MINPACIC
algorilhms dcvclopcd and publishcd by lhc Argonne National
l.alMu11tor/ In Aronne, lllinc,i1. F<w mcn lnfonnat ion, acc Lho
"Uscr'a Ouidc IO Minpocl< 1; by Jo111c J. More, UurlOO S.
Oarbow, and Kcrvw:lh I!. Hillsu'om, Ar11onnc Nalional
Laboraiay publicaon ANL-80-74, 1980.

The error vector

'

TIIC MINl'ACK lllo<ilhm 111.omIU IO Ond lho urot or 11 WOf11


minimize &he surn o( sqUAIU o, lhc valuc oC a vCCUJr o(
runc1ions rdati ve IO &he valuea of certain variables. The vcccor
or l\mctions Mat.hCAD UIOI ia an lfror \lllClUr Wl\OIC dementa
n:prcsen1 &he crron in &he consuaims. The cnon are dcfuw:d u
foUowa:

For equalily cona&ra.ints (constrain11 u.sin-):

by computin lhc Oauss-Ncwt00 mp s fot each variable. In


malrU nowioa. MllhCAD solvcs die maail cqualion:

J s-C(x)

In lhia equation. J 11 lho larobian malrix. iJ &he slep IO laic,

lnJ 11 Lho voccor o( CWTCnl e11ima1es r' unknown vai inole&.


Por &he fITTI sicp, ia lhc vcccor of suases: 11 eoch subscquen1
atr.1>, tho now 1 ia tho old 1 plu11. the v.uw o ( lt:ltt, Noc it:i11

Computln Ibis mp Is llOI always possible. Computi ng llw: slt)


faila whcn &he Jacobian malriJt Cllnnot be invcrnd O< whcn ~
are more conscninlS lhan variables IO be solved. In lhcsc casca.
MalhCAD adds lhe addional condition !ha&&he foUowing
quan1i1 y bo ralUCGll IO a minimum:

Tlv lAwllberiMarquardl ""'""" d<>u ""' ""''t wlv


lhert art few.r ro11J1raints thall wuiabl<J. f IMU ca.su,
MathCAD retMnlJ IM
loor..,, COGllrainll.

Por inc<uality conalrain11 dcflllCd witb <,>,S. or 2:

'"r

error Oif inoquali&y ia llUC, othcrwiac

-"' lefl ..w. - r11hl ""-

Termlnatlon crltcrla

MalhCAD lr<als the vellberiMarquardl algorlliwl OJOll


alorilhm o real wuiables. Wllt )'OW solvt for a coinple.r
wuiablt, MathCAIJ lreals tllt real and l.ma1ifUJfy paru os
uparate variables i IM algorillrm. Wllt11 )'011 solw
-quallty COllJtrailll, MathCMJ crtatu /WO rtal COllJlrOIU
for 1/v algorillrm. oufor IM real parl an.d oM/or tlv
l.maginary part.

"

Steps In lhe Levenber:-Marquardl method


The LevcnbclgManuard1 melhod ia a quasi-NcwlOll mclhod (a
variation on lhc gradicnl melhod). Al each siep, MalhCAD
calimaics lhc first partia1 derivacivca o &he ctrors witb rcspcct IO
lhe variablt11D be sol ved IO Cn:alC aJocobi011 ma1ri.r.
Ordinaril:r, ~CAD can delenninc lhc nex1 calimalO IO makc

.,

-r.01-12
licio 0 U a VOC U>t O wci~hl facUn CompulCJ frum IJIO 0<.-m1 o/
lhe columns or lhe Jacobian maui1. In 1hcsc ca.ses. J i.s compuled
IO satisfy lhis minimiution aileri4 u -...di u solving lhc
Newton cqualioo wilh lhc Jacobian.

"'' lefl J-k - rlhl s"'6

11\Al

computin &hiJ lle> involvcs invulin11 &he Jacobian malrix J.

Thc 1..evenbuMartlllflll meUiod cndl wbcn il reachoa ooo o(

lhc Collowin &cnninalion crilaia.

Whcn il IJ no longa- possible IO mlucc dw: norm o/ l.hc "'""


vecior sinificanlly. In lhia conlCI&. "aign.ificalllly" mcans
by ~ lhln lho brga- ol TOL and TOLluro< vtaOri. This
ai&crion stops &he aolvcr whco thc crron cannot be rcducod

Whcn J bccomcs n:lacivcly clase ID uro. In lhis mcthod.


"rclavcly close" l1IC8llJ 1 norm smallcr !han &he larger ol
TOL 111<1 TOLlx voc1Dr1. This crilClion swps lhe solver
whcn lhcte i.s no prcferrcd dirocon &o movo &he gucsscs.

furthcr.

Whcn il rcachcs onc or lhcse 1etmination conditions. MalhCAD


cllcdJ lhc maniwdo or Lho aror vcccor and rctumS an aruwcr.

t
j:

,1

\.

~i

?:

'1e'!>"l(ff'WWF1'nl]:Aa'\ "'... ttt:::"' k~-

t ~:- ;~::~ ::.-:;::'.}>'.::?:::::> : ;:; :;:fi:,~:!: . <--: :~:, ... : :.z~~. ::~. :~ ~;.:~:.;::? ~ ~>. J e:: ' !~

_ ,,

t'

.-

274

Appendi.< 1!

lf thc magnltude of !he error vocllJr Is lcu than Of oqual IO


TOl. MathCAD rctums l.he variable values as a solution.

lf 1hc 30lve block ends In FINi allll l.he magnitudc of the


error vector is grcater than TOl. MathCAD marks l.he Find
wilh l.he aror dld noC llnd aolutlon. lf thc solvc block cnda
in Mi'"" ~AD rctums thc olution anyway. evcn
though lht tttor vector Is not cio.e IO ttro.

~is a limil oa lhc

number of cakulations lhal MJithCAD


wlll l>Cth~m In ac#th o( an ans~ 10< a M~o hlock. 11 h
u.cccds lhi limlt wilhoul rclllming M am....,., lhc Find or
Mintrr is nw!<cd with lhe error DOl tonvrrin1.
In nll CtJ,rtJ, wlwn IM M>lwr stopJ, MothCA.D 1t1111ot volue
o{ IM voriablt ERR to tite mtJRnitllM o{ IM '""' vrctor.

MathCAD's modificatlons to the


l~vtnbt'rMar11uardC mt"thod
To mue 1ho Lll...,hctg-Manuanll mc1hod more ctrectlve on
octual pmhlcms. MathAD l11tludes 1hc lollowlng
modifications ID die basic mClhod:

Thc fnl lime tha :1alver stops al a point that Is nota


aolution, MalhCAD addJ a small random amount to ali lho
vsslablcs and 1rie1 agaln. Thls hcl1> avoid gculng S11ick In
local minima lllCl other poincs rrom which thcm Is no
prcfcrrnd direclion. MatliCAD does lhia only once pcr
aolvc, lhe flnl time lhe aolver llOps on a poinl tlw is nota
aolutlon.
U you include lnequalily constra.ints in a salve block,
MalhCAD llOlvcs l.he subsySltm consisting of only lho
lncqualities nl befare .icting in thc equality constt3incs
lnd au.anpting a full tol111ion. This is cquivalcnt to moving
thc gucucs ialo M .rea whcn: thc incqualitlca are ali
salisficd bcfon: IWtin lho 90lvcr.

Motrbc operalluns

This scction describes MathCAD's algorilhms fm computing


de1.a111lnants an<I inverses for square matrices.
To compute the dctennlnant or inverse of a 911uarc mllrlx M,
MJithCAD docompooes il into a lower-lriangular matrix L andan
uppct-1riangular malrix U, such lhat:

MLU
This Is called tho W tcomposltlon of lhe matrlx.
Thc LU docornpositlon maltea tho 10lutlon of a system or
equation.s Mx y lnto a mauer oC simple substituons wilh lho
demcnts or l, U, and 1

Performlng Che decompo.!ltlon


MalhCAD performs lhe LU docornposltlon using Crou1s
me~IQd wllh pardal plvoting. 111ls mc1hod Is not <lc"riood hc.
Sce Numtrlcal Rteff><I by Wllliam H. l'reM, Drian P. Flannery,
Soul A. Tcukolo:dy and Wllllom T. Veuerllng (Camhrldgo
Univenity Prcss, 1986), pp. 31 IO 39. fo. a oomplctedescripdon.

Computing Che In verse and Che detennlnant


To compute l.he invcne, MJilhCAD 10lvcs lho cquatlonJ Mv
. 'J whete Is a vector wllh aonc In elemcnt/ anda 7.ero in au
olhcr clomenL. 111() solulion vecton v for cach f rorm lho
column.t or tho invcrie nwrlx.
The de1.a111inan1 of thc original matrlx la simply lhe product ot
lhe diagonal elemenlS of U, !he upper-triangular rnattix in lhe

LU dccomposion.

e:-.. r~

c:!l

~" "- '

f.Jl~:~-:;

lndex

~ ~~ \"~

~.:f., 1 ' '~;.

~f;t

ti3

i:t.:,i.;J::

;~l t~~
~~M/J;

E-3
=--,3

\i~
,~: ;
'tJ' j'
~t ,

~;nr

~:3
~ -- 3

1.::;.:

Li3
d3

r
1

!:1~

~1

,E13
-

,;

,-;-!

~r

~~~J.\

~,,;
l?;- L;r ,.

~~

~. f.:" : '.

~;j-J'.'C '
' \ ,(; ' -~

+ V

~:11

,...

!~:al

lnde-... ir<:

Jl=!i
11

lo~ Glli.lllWt 107


lll'lpOIUl1d l&I
usec11or 1n1ogra1 151
lundion 156
IPOllrop/lO lo..y
Ulldtooddparon1i-1
Al'PENO command 58

.'

; i

bocUIMll
- ~ lor bnol bdslllh 78
UMd lor ~ ..... il ta regiorw 78

c:M:Ullion modo
S.. auamatic mode. IMnJll modo

becbolvi>g
Soooolwtxdo

colculalion
caictJlllor

WTlyi

120

MWQIMllWID_...,.134
calcWling wlh 123. 140

aoalinQ 120, 121


dofooQ 123
lundio.. lot12!1
lllllticao 120
opo111or1lor127
ORIGIN uwd Mil 125
poorming cabJloliona ...... by ...,.,. 131
Ml1ing tla/1ing ndll 125
ll01od in expandod memort 06

J![
1
c.r..
_,,...
1
;

-La

M>tai>llor.tlomonll123
-120
ao.ocr1* 145

.;a

;-

anowkayo48

:_.,.... :ill
~11

w..l.jl

' 1111
1

llallll!l.llll~lllll !l l:\'l".!l!l !P~-.!W W~.-~--~-~-Jl!3,i4~01! ! '!, 1!.,'~.!'.4rwi'flt41JS!I!$.~

l!!!ll!,.1!!111
---vo __ __

1"'->NBlW__,,..,,....,.~~)~~'tp

,.-,-y . :" . ...

'&%1!!
'. '!... ;

...

ASCllCXld
In lxl OQiono 78
AT&TllJOOM<iot24"1,255
11-oiQn 1@1
loaoaloplol23,2DO

, '"

ord" -

g8

_ , ldrl b1wik fll*e 1--.l D

'*'llQe ........ In .... 42

Sootoxtbnll
bw chart 2IJ7
bote ol dilptayod "'"'1bn

coil lundion 159


CENT EA CX>IMl.-.l 60
oonlemQ t11d 69
dt k.roion 184. 165

......

S..radbc

CGA2S$

bue....am

11....i loodiorw 156, 1811


bNty q>tl1l<n 32
txdo
Soooolwtmdca
8odo plata 220
lnnching
SoolltMk u, UClrll&wD
UMd ID hll cokulalJono 115
BREAKPAGF.S command 71
....... loodionl 156, 2lll

'-';bbJ. "'' i .., 14- o"

; ' .. ,., ,-.~ f-'-" ' '4 \.( 0'f, ,

in118

bmolltng-110

~UarhCAOulf

~111240

lllod by lypl 238


lldelnlng (

........ &r.111

.i.. .. ".\

dim ........ ..i .....

lnl1ll 61
BACKWARO--.ld (ClrlJl f1

ougrntl lund1011129
lO Ulld ID wrlo -lllll 'llftablM ID 194

ll!n~

,\llP,OfU:Zl$A
. _.

cisabWlc cabUlion lor WdvWal tqUllian 101


inlo"'-91ing 95, 138
llotatrve140
on Yedort ond l!lllriool 131
~ lor oquation 101
IMlatMQ IW ..... l\4llIQll6, 1JI
calcWloo oqu.lllOlll 17, Q2

~-"' """' 36

1~
1

.........,,,

APPENOPAN lundion 188, 194

'

larpillll;m.205

~oolor2!58

1 C.::::

.l

s.. ......
aiml

e
c.ic F9 mHSaQ'I 100
CAl.C kay JF9J 95, 100
CALCU .A TE oommond JFVI too
CllbUltng 17, 116

bdquoleU,
, - i ID 1JPO prime 10f

-=::.:

e.JI...
i;:;.
1

:-

., -~:.,-~::-:'~\-.~:=r.7/P,!~:ri/~:~~~~~l,:;;~..~~hft>-t.'

APPENO lundion 188, m

UllhCA0'1runoricalmedlodl270

r1

"~ -.-:t.~

""""1d .1Jf10< UI' e, 35

woiumal!Ool

1 ~ T .m

'1
( ,.
,f

! _.... --

1 ~ . .

~!

,;. ;J.

""

..-l- -1

AUIOMA l IC oom.,.and 100


tomalicrnodoll6
tomallc-d 83
SoocainQ plol1 206
Auxiliaty Oiok 9, 254

-1

.:

'

AtNy1

- ,. 1
rrr :JI

1 ~.:a

11
- 11

lbot1ing calctJialioot In progr- 95, 136


oboninQ prir!ing 73

1 '- u;; 1 -a
-!mi

c:hatldlf ...,;.
In riilw drMr 2!l2
dlantd0'1I

lllU ulondod ""-1<1 oll 2SO


dwQo118
d\atll
So.piola

ctEAR c:oovnand 57
dootng doc:umonll S7
rolon (.)u dolnlllon 1yrrtiol 17, ll2
Cclor.<ilaphicl ~ 255
oolon

d\lnQ1nQ loroQ<O<nl ""'~ ~


a>lmnV9d<l<>

s..-.

oo1um.. lundion m
Clll1lbMg ~ IMo 51

'

... ::T }J}rt;;~~::~! ~,.~T=.~:T?;::t?:?~.\'.~:-J::::TY.;'.).'':!~'.~, :':'::,~,,.:"


.278

lnde

;
commond !les 85
cllai>ing87 ;
nmingll>tt14''l57
canmond ioo ~ 244
oommand mooos 25, 229
oommlltlds
hl ol 231
by l\n:tion My 2S

1""'1111169

canple11unbon 112
con;ioa11112
do1""1inilg onglt 112
disJlayal 110
lt.ndi>ns lo< 158
lmaginary r i symbol 110
In tofv blocb 179
maniludo al 112
OJ*llOIS ll1d Mdbns lor 112
INding 1nd wriling in data fles 105
,..., ond lmlQ!rllry pif11112
loltrwu lo sl'OW
110
compu1r. muh 17
c:ondlion
lot Whrldlon 168
llalng h<lfion on 1117
c:ondllon.'111168

10ciw"IOdim....1on-111

OO<llg filo

.,,_iall
by"""" 25

by .,.,,. 25, 28, 229


OOS oomtnMds B2
lt.ndional h1 al 229

bo1h"'""

""1ouso 25

pms fEscl lo lbor1 29


lmm -wlh ""11111129
lo cairulal equallons 98

locieatdoc1Jmen157
lo <x>mbino ,... 58
lo e>A ll1d pes! eqnoslont 43
lo aA.., PMl ld 68

o.e ni pasl

lo prin1 73
lo ........ calaAlllon modo 119
loNJ*lt111QklM5J
10 MI mal!Jill /'!)
lo MI Mlp mltgin In 1111 r9giona 83
loopllaidtr'9pliltc:rM159
lo nrilcll windows 59

UMfF10llo--25

........1co1on In !IJIM9>d 1115

inlonnallon in 86
rolooded
dNr COIMlond li1

ft

llVlnQ 11
oonl<urino MllhCAO

dldx

s.. dtrfvMJ-191

dll1

-1odowhen1oo179, 182
oonlourinogrln153
oonlnll Myl 235
cq>ytng . . . . 50
aipyil\91at 68

lot r09i<>nt 50
lorlH168
ClJT oommand (P.lJ21, 50
aA1ng lord 68

"'"111"'""

"""""
... a
OOPY commnl (F2] 50

~-e

-- ,.,-

,;

=[

-,

-i:
-,~

- t

iil13

. !3

formal In da! "" 188


INdilg dala ll1ff 188, 190
tHdilg lnCo 1 mm 192
wrtJno mllrtx lo 11111 1113
Mtk> dola lht 11111. 1llO

-'3

=---~

. . .l

1o1,...... 11

oonlJ'llt 112
oonstnh
S..numblf1
s.."" p!9definod nNblft
sulfonlof 243
oons1rainls
componon11 al....,, vedar tor
<bnmy contlllinll 183
ln-blocb175
al 111oni In 179
,,,..,. be scolot 175
pos1i>lo lorm1far175

'9--:ii

fot Hp!Mlionl 43

OO<llguiolloll ... 257

canple1t.I U\11.,.... 184

llndJno1191111der151

11Vtnc811

lo lormll , . , - . 110
lo"-laid-ht52
lo nlrn~ MllhCAO w "'DOS B2
lo ..., 11ld ... ..... 61
lo mooilot available "*''Y &4
lornnveanot 49
1o ,,.,.,. n 1, 01
1o P'W dorunonb
uk:Wlbn 100
lo 111um lo lomlli: modo 100 .

--..

...._

OO<l~ion

"''"

canpn c:crM 112

UtlngeJlcop-1112

nmnv al """"' 244


CONFIGSAVE comm.-.d 11,811

lo - and
l"JIOM 50
lo HICIA c:onwMnd liln 85

lo'""""' ..

cxmlallon londlon 180


croaJing plol 19gions 200
croaling 11111 reglons 62
cross p<oducl 128
csplint Mellan 163
et.ble sp.'lne illorpolallon 182
cunulallv normal r!lrbution 180
anor15
commonds 1 0 -49
In append modt Ul 35
In "-1 modo (LJ 35
In ltd reglons 62
keyo lo move 46, 2311
poslion lndiailot 18
awlching windowl 59 anor hys 411, 2311
...... ~Jno
.
polynomlal ""JI-Ion 222

~=E

. I~

~3

-~J~

- _
--' "1

- l

d!.
~

~ci

279

lnde

dal fi1ot 188


dolaul t xlonslon ie PRN orOAT 1811
formal lor dll in 188
INdilg 189. 190
INdilq and wri1"9 canple1dala105
INdng inlo 1 mllrlrc 192
spedty;ng lormll wtlll PRNPRECISIOH
ar>d PANCOLW101ll 194
ruclufod 192, 193
wrilino 189
wrtJno da! lo 190
wrillnr rows ond ocbn.-. ol dala 193
dtcinftl p!Ac..

SHprodslon
dofau lteoam 57
doft11ir19 lundlons 94
dolhling variabltl 92
dtllnl lon synbll (: ) 92
dtllnllonl 92
lot Vlliablos 17
global 97
locollo oolveblocll 171
dtftnlllonl al v.wilt D8
ol l\Jnctlonl 94
o1unh 114
llfl!JI Vrwbrbltl 138
ttvlfll va11ob111 11 onct 133
dtgr-

"'""lplt

<X>nW!1k> lo rldlone 117

Otlolo key
lnlt111M

OELETEUNEccmmond (Cttf 10!


bol- reglont 52
dtloen9 re.lont 50
dtleng1ox168
dtriv1llw1
numlric 150

,..,,.,1c:a1 m-b1V2
lolt"'"'" for

"'"""le 'l'J)loUn-150

des9" f"inciplto lot M11hCAO 14


doltrminwrl 128

numlrical mllhods bl 274


dld no111acll toMlon (tmll)
lnoolvblocll 179, 111
dft....,lflllon
s.. dtrivalfwl
dft....,lilllon-11 150

OIMENSION commnl 118


ctnonsionll oons!Mrq 115
ccmmon - o l error 115
ctnensfonltvlluos 109
cintnsioo1t 113
dllnging dinenlione 111
In Cllcullfod mufll 111
chdorite
usi"9 MalhCAO
11
.w..ing li1esin58
chl<ft1ot
saving ni laadlng 57

E
.. bel al M1nl loglrllwnl 108
odtng~ 31

~ ~m3',3S,38

edcq ponrclll... 40, 41

lddi"'l .-Y oplltn 37


oA1"9 ni posting txll'M5ions ol3

""'

...

dtlllirlg por1

'

equalion JI

odliiQ ,,.,,.. ar>d ....-, 3'


""*'1in9 f)ll1 ol 111 ~Ion 41
~ 111 cporllor 38

llepo ln 33

A......,OW.254
SyS11n Dllk254
lllplly ldlpln
U9ing MalhCAO wth 255
chld

-.1o pll<ll anor 33


EGA 2S6
~ Bodl~ 220

elodricltl
..........
-tndNrir 123

ln prlnldrlvel2S1

ellplll 1Je
tnlbllng colcuilllon

documM ""' 58
documM

1or rhltlltd equlllon 101

c1Mm91i1

~ lot IW>Qll 137

comtilnlng 58

""'*"

MllJlf. 2S5

dtftntlon ol 15

E"'*1ood

prlnllng 72

eptb1 kmlon 129


equoljlycionol...... 175
"""'..,. () 92
EWATIC:.foi"mw rd 101

dlln<lr1ca>lorl on ~

_.,.. docllnCI 213


la\'ing ni laadlng 57
domain 111111(lflor)103

00Sccmllllnd82
DOS ccmmondt
-WCOl!lllllnllllllancel3

UIWIQ lllllll ..~ MllhCAD 82


DOS lhtl 83

rotumlnQ 1o l.WllCAO
83
~ p!Oducl 128
clMte lnCegllll 153
~i...,n
lo cnol lnl reglan 11. 112
dolvlfl

s.. prt.. drlw9n

cbnmy constrtlnl1 183

'I
-

-- -~

-~

-..

-~-

__

...;
.~

__:.. ............

.....
:

.,; i-.. ':


~

...: :

..

-.,....
'.

'I

-,
~:: -:<=:,' TC;Ji:rm1n~~~, ~r:: -y ''s~ .:t~:\}!/c:Fi:i,:3~:~.:~:!rr:i.i ~;::y :':,''>:f i"f:'.;;~;!~r~\T:g:1;:,~1 :f(;f:~
lndex

in
lorodon 140

s.. .... ~ VlrWllaa

"

, wiflcd ~ 14&

hllliiQ 167
ona- 10
-ran<140
wlh....Sw..,. 142

wlh-"'Yllilllloal43

J
.JJ l\roion 169
J1 lundlon 169
.kl lundlon 169

JUSTlfY ccmrrwd (Q1JI 63

l.hujoul 19ur 200


..... ~107
LOAD cxxnm.iid (FSJ 57
loodlng dorumontt lrom . . 57
kalk>nnll111
toniiQ bO lo globol 111
log plob
thowtn9 cydol In 207
lhowlng log tlbtltalonl al qdol 207
log-log plolt <07
logM1thmic ....
..niiq In plol207
logatlM11 156
logt
In plol tpedflcollon 207
bipa
ringo VlrillblM

s..

~.Wiaotcft~momart

rr.y,

llpitlo lundion 163

~lon85,2S&

LU~274

lo"""'"""'"'

l(/Ol'llCMf dala 129

L
.... \lndlon 129

i111911 lundlon ISO


ltl brllCMI .
UMd lo lrdiallt Mbta\ll 21
ltl rnan'n 75
ltnoth 118
ltnoth l\n::lion 129
~MMQuanllMlhodV3

MmhCAD't modillc:liDN to 274


llopi in 273
lennlMllon olerla
hdltl10201

mmonu25
rnnial
howlOUM3
mdlll ealaJlollon modt 99 .
llart\ng r.blhCAO In 100, 258

MANUAL cxxnmand 99
MARGIN cxxnmand 75
m1111nt 75
MARK cxxnmand PlfJX es
mari<Jng IHI lo be ooplod 01 doloced es
MerM>w p<OOlllll 144

hlooglh
ttllki188

~melhod

ln1o<pOlallon bw::tlon 111


. . . rwot"olon 222
. _ ~...., lund.,.. 190
LINUENGTH command 61

-118

S..L~tMlhod

....

-oapr-

~lonoll

doslgn prildplaa 14
11an1--~b8
1n111111no on han! clsl< 9

hlollNl1n12
llartinQ9
MllhCAOltw
hl el2

.. trg11110f'lll lo-llnc:donl 134

chanOlno lil al 121


~ wllh qrnenl llrldlon 129

cn\ng 121
dellnln< 123
doftnlng by lormtM 141
dellnln< wlh rwo
vsWiltt 141
cloloclng""" ... coMnna 121
deeonnlnanl 128
l\rolont lor 129
ldnty mllrlx lllldlon 129

ranoe

~128

...... addlion 128


lftllriJI muftlpliclllon 128
...... llbtrw:tlon 128
Cll*llionl, numeoicll lllllhodl b274
opendort lar 127
ORIGIN used wllh 125
porlonnlng c:alQJlllllore Mfttlt by ...... 131
ralslncloapoM1 l28
-'lng from dol lln 102
11111 wilh IOW and a>bmn HIO tZl, 125
11111\ng wllh 10W and ccUnn one 125
l\boa"1 IOl
124
trwiopose 128

....,ern

utingtwo~124
wl*11oute~ 145

wrtllng lo data llM 193


mal\rolon 129
MCAl)dftdoly9

poAllnlJln 00Spllll2!57
MCAD.EXE 1119, 254
MCAIHt.P~

MCAO.MCC 11, 8S

-.

d~

I ~ ~

MllhCAD t.mlonl 239, 240


mllricet 120

~by'7
,ti

;;

~[ \! 3
IC:-

"'*lo ru:I tbM 28

ir-1lnQ ... cloloclnQ 52

horp M>dion 18~10}

l: !:~f

f. ~t~'

MllhCAD

lnMrtlno """ ... cob!llll 121

magnlludt
el axnpln runborl 112

:1 '

:~:
11

l~,I~
~

IC:.:;

JI
IE:-11;
!I
~ij ;J

~- Ji

~;i,
~-LA

~ t;J
~

~ !i

~~~
l

~~
11 .

~:;e:~: :: :-'. .~,:; ;;;:,::;::1:.:~~:'1;,1J.I;~~::~~.:~~~,;4;~0 1~~f:~~~~-:~~~~t11:;$i*~:;r{~~1~rr.~?i:~:.'.~~;~my~:: J:.(;


lndex

21!:l

MCADMCP lile 254, 290


MCAOOIA orwtronmenl vlrilblt 87, 257
MCC lles (command files) 85, 257
MCDlln58
MCFllot 254
m.., lundlon 129, 159
mechlnlcal ""9n..tno

IMlplt docunen1bluldlb#214

lftlllWllY
t.>Mded memory 85
monilorlng IYailablt .......,,., 114
19q1Jrod IO R111MalhCAO9
IJ>Kilying tllpllldtd mtmOIJ ...... 1111.p 2se
MEMORY ClOIMland 114
MEMORY llltMIQI
on
llnt 114

....... ,,.ut

lor cxxnm.ndl 25, 221


mtinmonu25

l\bmtool2S
~lint 18

mlnlundioll 129
Mint1Tlundlon

11trdoholveblodt174
cMOOIMt ol 180
YlllJtS ltllmtd by 174
MINPACK - - 273
mlulng optrlnd {tmll) 103
mod hlndlon 159
modo
n.t modo, ~ modl, UDmlllc
modt,
modt
lllCl10191c.lwllllons218
MOVE cxxnrnand 49
mo.tng "Qlont so,62
mo.1ng1n1sa
m<Mnt tht anor
"-ro lar 49
tnl"1pitloott
llndlng wlh ICMl*lcb 180
tnl"1plt tl.llH!ltllore 149

s..

m.....,

dilg34
vlrilblt
... b!dlon_
- _109
_ , .,.,tcola
-

OClll ru!lbtn 109


cltplaylng 11 o

123

apornla

dtflnllon ol 32

....,..,.,., .... (tmll) 138

~~38

normel-128

cpttalort

tddng lo oquatlont 34, 35, 38, :s7

not OOft'
lt!Vlno '""""
dt'1'/all'ltt
ISO
lnltgnlll 152, 153
llld lundlon t73
tclveblodtl 179, 182
noltllon

blnrt 32
dellnlion ol 32
cltllng 38. 39

lar ocmpltu u nbtn 112


""_,,,., .,., ""'""" 127
how lo '1Pt 148, Zl8
..ed In ordtt ol p<IC8dtnot 149. 2:l9
rwllllonll 188
rwpltcing 38
lq>ltwl32

uotd In lllllMl 14
nolft

s..""' llgbll 82

runborl 109
axnpln 100, 112

....... ~100
dllplaytd. Z9fO 110
tdillng34
toq)OntltW nallllon klr IOll, 110
~100

bmlftlngCllaled . . . . 110
lmtdtclmal 100

llW'f32
~ olcllcWlb!w 911
ordt< el c:abMllorl el ~ 911
ordt< of...,.,..,,,
llgorthm .. f7
, cbuMra 91

"""lote

iml9lnrf 109, 112

ORIGthlrill>lt 109, 125


Qa el -narit S... OI ~ ("'""'Ot) 114

octal 109
llldbt fer tliplly 110

M4<ntmory oondlions 114


how lo -"1114

1Ufftxb243

a.Ap1Allilltl l38

tunt11c din...clallon 1so


IUlltlic tom.1110
glcbaj 110
kal 111
l9lftO'l4ng loail bmlll 111
IUlltlic Jnl90rtllon 15i
runotlcll melhod1 270
tordtriYll~m

blnltg11111271
.. 11111rlx ltwnon ... dllermlrwtt 274
1ar llld lundion m
blol\'tblocbV3

p
peoo bol.ndlllte 75
ptqtbrtob 75
han! 78

'"'""""O,..
ll0ft 78
Peoo~

lnptW ..-~

pogt ltnQlh

toniiQ 19

PN:iaoorn ClllMland 75

~by'7'

Anda mungkin juga menyukai