Mathcad13 - New Features
Mathcad13 - New Features
DMS =
Ten new bui lt-in mult ipli cative uni ts
tonf 2 10
3
lbf = GPa 1 10
9
Pa = mW 1 10
3
W = MW 1 10
6
W =
plf 1
lbf
ft
= psf 1
lbf
ft
2
= pci 1
lbf
in
3
= pcf 1
lbf
ft
3
=
F 1 K
5
9
= C 1 K =
Expl ici t Calculat ion
Returns expressions with the values of variables in place, but without
reducing numerical expressions
a 10 := b 3 := c 6 :=
Using all the variable names substitutes all
variables.
a b + ( ) c
c
2
explicit a , b , c ,
10 3 + ( ) 6
6
2
a b + ( ) c
c
2
explicit a , b ,
10 3 + ( ) c
c
2
Names not appearing in the calculation are
ignored.
a b + ( ) c
c
2
explicit
simplify
a b +
c
a b + ( ) c
c
2
13
6
Progr am Debugging
New Debug toolbar and Trace window
Right-click in the Trace Window for Copying and Clearing options
New trace, pause and format functions
x 0
x i
2
x +
trace "x ={0}, i={1}" x , i , ( )
i 1 5 .. for
x return
55 =
v
i
i
pause "The value ={0}" v , ( )
i 0 3 .. for
v return
3.742 =
Internally, trace and pause use the format function. format can also be used at the top level
format "string {0} {1}" 2 , "B" , ( ) "string 2 "B"" =
Updated Genfit f uncti on
New optimized L-M algorithm for genfit.
Optimized algorithm does not require derivatives
Parameters can now have separate variable names (both versions)
f x ( ) 0.345 e
1.26 x
:= i 0 15 .. :=
x
i
i 0.5 ( ) 0.5 + := y
i
f x
i
( )
rnd .01 ( ) + :=
fn x a , b , ( ) ae
b x
:= guess
1
1
:=
fitn genfit x y , guess , fn ,
( )
:=
fitn
0.345
1.26
=
Linear Algebra updates
Matr ix operati ons
The matrix determinant, multiplication, and inversion routines have been updated to
the Intel BLAS libraries. These algorithms provide a significant speed improvement,
particularly for large matrices.
Eigenval ues and Ei genvectors
Faster routines
Eigenvalues are now returned in sorted order from largest to smallest (The
results of eigenvecs are also returned in a different order in order to match
corresponding sorted eigenvalues.)
The symbolic results match the numeric ones.
An optional second argument, "L," can be used to find the left eigenvectors.
"R" can also be used, but it is the default and is not necessary.
The generalized solvers now accept complex inputs in addition to the
speed and functionality improvements.
l solve
Returns approximate solutions to under- or overdetermined systems
M
2.3
24
6
6.7
42
0
2.8i
7
8
9.8
.1i
12
:= vout
1
2
3
:=
x lsolve M vout , ( ) :=
M x
1
2
3
= x
0.101 8.117i 10
3
+
0.032 0.012i
0.131 0.041i +
0.112 0.031i
=
Singul ar Value Decomposi ti on
The svd2 function has been added to improve upon functionality in svd and
svds. The new function returns the results of the old functions in a nested
matrix, so it's clear how to break apart the U and V decompositions.
The svd2 function accepts complex arguments.
A
1
3
2
2
4
3
:=
s1
U1
V1
svd2 A ( ) :=
U1diag s1 ( ) V1
T
1
3
2
2
4
3
=
s1
U1
V1
6.547
0.374
0.338
0.763
0.551
0.848
0.501
0.174
0.57
0.822
0.822
0.57
=
svd/svdsfunctions
The di ag Functi on
The diag function has been extended to accept a square matrix argument
and return the diagonal elements in a vector. Previously, it would only
take a vector and create a square matrix with the vector entries on the
diagonal.
M
1
4
7
2
5
8
3
6
9
:= diag M ( )
1
5
9
=
The matri x Functi on
The matrix function has been extended to support string values.
f i j , ( ) num2str i j + ( ) :=
matrix 2 2 , f , ( )
"0"
"1"
"1"
"2"
=
Funct ions Signat ures (number , units, and type of argument s)
and Type-speci fi c error messages
To find a function's signature, evaluate the name of the calling function by
just typing the function followed by =
cos f(Unitless) =>Unitless = f f(Unitless, Unitless) =>any1 =
2 sec 3 m + = 3 m
"Unitless" - a dimensionless value
"any" - a value with any dimensions
[any] - an array with any dimensions
Dimensions (Length, time, etc) - a value with a specific dimensions
R)