Generate a matrix with 2 rows and 4 columns and the value is 1
矩陣的四則運算
Four arithmetic of matrix
設(shè)置A=[1 2 3 4;5 6 7 8]
B=[1 1 2 2;2 2 1 1]
C=A B 表示對應(yīng)相加
D=A-B 表示對應(yīng)相減
E=A*B’ B’表示A乘以B的轉(zhuǎn)置,且需要確保A行數(shù)同B列數(shù)相同
F=A.*B 表示對應(yīng)項相乘
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
設(shè)置A=magic(5) Set A=magic(5)
B=A(2,3)表示選取第二行,第三列
B=A(2,3) means to select the second百思特網(wǎng) row and the third column
C=A(3,:)表示選取第三行的所有列
C=A(3,:) means to select all the columns in the third row
D=A(:,4)表示選取所有行的第四列
D=A (:, 4) means to select the fourth column of all rows
以上關(guān)于本文的內(nèi)容,僅作參考!溫馨提示:如遇健康、疾病相關(guān)的問題,請您及時就醫(yī)或請專業(yè)人士給予相關(guān)指導!
「愛刨根生活網(wǎng)」www.malaban59.cn小編還為您精選了以下內(nèi)容,希望對您有所幫助:- 周一圍在哪個學校任教
- 朱亞文是哪個學校畢業(yè)的
- 老師的手
- 鄧倫哪個學校畢業(yè)的
- 羅云熙哪個學校畢業(yè)的
- 黃磊是哪個學校的老師
- 古力娜扎畢業(yè)于哪個學校
- 夢見學校
- 袁成杰哪個學校畢業(yè)的
- 黃軒哪個學校畢業(yè)的
