User guide

10-5
Ax = b
Linearequationsolutionisperformedinthefollowingcases:
l If Aisasquarematrixandhasthesamenumberofrowsasb,thisstatement
willsolvethesystemoflinearequationsusinganLUdecomposition.
l IfAisrectangularwiththesamenumberofrowsasb,thisstatementwill
producetheleastsquaressolutionsbyformingthenormalequationsandusingthe
Choleskydecompositiontogetthesolution:
x =
A b
A A
Iftrap2isset,missingvalueswillbehandledwithpairwisedeletion.
%Modulodivision
y = x % z;
Forintegers,thisreturnstheintegervaluethatistheremainderoftheintegerdivisionof
xbyz.Ifxorzisnoninteger,itwillfirstberoundedtothenearestinteger.Thisisan
element-by-elementoperator.
!Factorial
y = x!;
Computesthefactorialofeveryelementinthematrixx.Nonintegersareroundedtothe
nearestintegerbeforethefactorialoperatorisapplied.Thiswillnotworkwithcomplex
matrices.Ifxiscomplex,afatalerrorwillbegenerated.
.*Element-by-elementmultiplication
y = x .* z;
Operators
Operators