フィルターのクリア

fill an matrix from another matrix

1 回表示 (過去 30 日間)
Noe alvarado
Noe alvarado 2012 年 4 月 23 日
Hi I have a matrix M
M11 M12 M13 M14
M21 M22 M23 M24
M31 M32 M33 M34
M41 M42 M43 M44
M51 M52 M53 M54
And i want to fill the matrix W with matrix M as:
M13 M14 (M11*M14 - M12*M13)
M23 M24 (M21*M24 - M22*M23)
M33 M34 (M31*M34 - M32*M33)
M43 M44 (M41*M44 - M42*M43)
M53 M54 (M51*M54 - M52*M53)

採用された回答

Walter Roberson
Walter Roberson 2012 年 4 月 23 日
W = [M(:,[34]), M(:,1)*M(:,4)-M(:,2)*M(:,3)];
  1 件のコメント
Noe alvarado
Noe alvarado 2012 年 4 月 23 日
i have the next problem
>> M = [ 1 2 3 4; 1 2 3 4; 1 2 3 4; 1 2 3 4;4 3 2 1];
>> W = [A(:,[34]), A(:,1)*A(:,4)-A(:,2)*A(:,3)];
??? Index exceeds matrix dimensions.
My matrix M is the 5X4
And matrix W i want to be 5X3

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMatrices and Arrays についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by