matlab使用流程,matlab官方手册

首页 > 健康 > 作者:YD1662022-11-29 23:57:17

矩阵的四则运算

Four arithmetic of matrix

设置A=[1 2 3 4;5 6 7 8]

B=[1 1 2 2;2 2 1 1]

C=A B 表示对应相加

D=A-B 表示对应相减

E=A*B’ B’表示A乘以B的转置,且需要确保A行数同B列数相同

F=A.*B 表示对应项相乘

G=A/B 可以理解为G*B=A G*B*pinv(B)=A*pinv(B) G=A*pinv(B)即A*B的逆

Set A=[1 2 3 4;5 6 7 8]

B=[1 1 2 2;2 2 1 1]

C=A B means corresponding addition

D=A-B means corresponding subtraction

E=A*B’ B’ represents the transpose of A multiplied by B, and it is necessary to ensure that the number of rows in A is the same as the number of columns in B

F=A.*B means the corresponding items are multiplied

G=A/B can be understood as G*B=A G*B*pinv(B)=A*pinv(B) G=A*pinv(B) is the inverse of A*B

矩阵的下标 Matrix subscript

设置A=magic(5) Set A=magic(5)

matlab使用流程,matlab官方手册(17)

B=A(2,3)表示选取第二行,第三列

B=A(2,3) means to select the second row and the third column

matlab使用流程,matlab官方手册(18)

C=A(3,:)表示选取第三行的所有列

C=A(3,:) means to select all the columns in the third row

matlab使用流程,matlab官方手册(19)

D=A(:,4)表示选取所有行的第四列

D=A (:, 4) means to select the fourth column of all rows

matlab使用流程,matlab官方手册(20)

上一页12345下一页

栏目热文

文档排行

本站推荐

Copyright © 2018 - 2021 www.yd166.com., All Rights Reserved.