matalb矩阵计算MATLAB矩阵计算.docx
- 文档编号:1180102
- 上传时间:2022-10-18
- 格式:DOCX
- 页数:16
- 大小:21.54KB
matalb矩阵计算MATLAB矩阵计算.docx
《matalb矩阵计算MATLAB矩阵计算.docx》由会员分享,可在线阅读,更多相关《matalb矩阵计算MATLAB矩阵计算.docx(16页珍藏版)》请在冰豆网上搜索。
matalb矩阵计算MATLAB矩阵计算
matalb矩阵计算(MATLAB矩阵计算)
matalb矩阵计算(MATLAB矩阵计算)
4.1arrayoperationsandmatrixoperations
Fromtheappearanceoftheshapeandstructureofthedatamatrix,two-dimensionalarrayandnodifferenceinmathematics.However,astheembodimentofamatrixtransformationormappingoperatormatrixwithmathematicalrules,clearandstrict.AndarrayoperationisdefinedbythesoftwareofMATLABrules,itspurposeisfordatamanagement,simpleoperation.Theinstructionformnatureandperformcalculationseffectively.Therefore,whenusingMATLAB,inparticulartoacleardistinctionbetweencleararrayoperationsandmatrixoperations.Table4.1.1liststhesimilaritiesanddifferencesbetweentheessenceandconnotationoftwokindsofoperationinstruction.
4.1.1arrayoperationsandmatrixoperations,instructionformsandsubstantivemeaning
Arrayoperation
Matrixoperation
instructions
Meaning
instructions
Meaning
A.'
Nonconjugatetranspose
A'
Conjugatetranspose
A=s
AssignscalarstoeachelementofthearrayA
S+B
AddscalarstoeachelementofthearrayB,respectively
S-B,B-s
ThedifferencebetweenthescalarsandtheelementsofthearrayB
S.*A
ScalarsistheproductoftheelementsofthearrayA,respectively
S*A
TheproductofthescalarsandtheelementsofthematrixA,respectively
S./B,B.\s
ScalarsisseparatedbytheelementsofarrayB,respectively
S*inv(B)
InversemultiplicativescalarBofmatrixs
A.^n
TheNsuborderofeachelementofthearrayA
A^n
WhenAisasquarematrix,thenpowerofthematrixA
A+B
Theadditionofanarraycorrespondingelement
A+B
matrixaddition
A-B
Subtractingelementsofanarray
A-B
Matrixsubtraction
A.*B
Multiplicationofanarraycorrespondingelement
A*B
TheproductofthesamematrixNeville
A./B
TheelementsofAareexcludedbythecorrespondingelementsofB
A/B
Aright,exceptB
B.\A
Itmustbethesame
B\A
AleftexceptB(usuallydifferentfromrightdivision)
Exp(A)
FortheendtoerespectivelywithAelementsasindex,exponentiation
Expm(A)
MatrixexponentialfunctionofA
Log(A)
ThelogarithmoftheelementsofA
Logm(A)
ThematrixlogarithmicfunctionofA
Sqrt(A)
ThesquarerootoftheelementsoftheproductofA
Sqrtm(A)
A'ssquarefunctionofmatrices
Fromtheabovewecanseethatthearrayoperationssuchasmultiplication,addition,multiplication,transpose,add"points".Therefore,weshouldpayspecialattentionto"multiply,divide,involution,trigonometricandexponentialfunction",twooperationsarefundamentallydifferent.Inaddition,intheimplementationofthearrayandarrayoperationwhenthearraymustbeinvolvedincomputingTongwei,theresultisalwayswiththeoriginalarrayarraydimensions.
4.2basicoperationsofanarray
InMATLAB,anarrayoperationisa.MATLABthatusesthesamecalculationformultiplenumberstoprocessarraysinaveryintuitiveway
4.2.1pointtransposeandconjugatetranspose
`-dottranspose.Nonconjugatetranspose,equivalenttoconj(A')
A=1:
5;
'b=a.'
=b
One
Two
Three
Four
Five
'c=b.'
=C
12345
Thisshowsthatthetwotransposeoftherowvectoryieldsthe
originalrowvector
Conjugatetranspose.Transposethevectorsandconjugateeach
element:
D=a+i*a
=D
Columns1through3
1+1.0000i2+2.0000i3+3.0000i
Columns4through5
4+4.0000i5+5.0000i
E=d'
=e
1-1.0000i
2-2.0000i
3-3.0000i
4-4.0000i
5-5.0000i
4.2.2scalar(scalar)andfouroperationsofanarray
Simplemathematicaloperationscanbeperformedbetweenscalarandarray,suchasaddition,subtraction,multiplication,division,andmixingoperations
"G=[1234"
5678
9101112]
G=g-2
=g
-1012
3456
78910
2*g-1
=ans
-3-113
57911
13151719
Fouroperationsbetween4.2.3arrays
InMATLAB,thearraybetweenthefouroperations,anarrayofparticipatinginoperationmusthavethesamedimension,subtraction,multiplication,addition,operationiscarriedoutaccordingtotheelementsandelementsforms.Amongthem,thearraybetweentheaddition,subtractionandmatrixaddition,subtractiontothesameoperator,as:
"+""-".However,thearraymultiplication,divisionandmatrixmultiplication,divisionoperationsymboliscompletelydifferent,therearedifferences,betweenthearraymultiplicationanddivisionoperators:
"*","/"or".".
1.arraybyelementadd,minus
"G=[1234"
5678
9101112]
"H=[1111;2222;333;3]"
>g+h%addedbyelement
=ans
2345
78910
12131415
>ans-h%,subtractbyelement
=ans
1234
5678
9101112
>>>>>>>2g/h)混合运算
years.
1357
8101214
15171921
2.按元素乘
>>>>>>>g*h
years.
1234
10121416
27303336
3.按元素除
数组间的除法运算符有两个,即左除"/"和右除
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- matalb 矩阵 计算 MATLAB