How to make a matrix mirror another?
古いコメントを表示
How do I do this?
X=[4 7 1 0;
3 0 6 8]
Y=[32 6 4 21;
77 89 0 2]
X(X==0)=a;
after the alteration:
X=[4 7 1 a;
3 a 6 8]
Y=[ 32 6 4 a;
77 a 0 2];
4 件のコメント
Adam Danz
2018 年 12 月 1 日
Please explain in words what you'd like to do.
Image Analyst
2018 年 12 月 1 日
編集済み: Image Analyst
2018 年 12 月 1 日
Why are the non-zero locations of X changing, and why are the elements of Y changing???
Anyway, you answered your own question. You simply ignore the original X and make the assignment:
a = 99; % Whatever....
X=[3 a 4 6;
1 7 8 a]
Y=[77 a 32 0;
4 6 2 a]
There. You're done.
Hugo Matias
2018 年 12 月 1 日
Hugo Matias
2018 年 12 月 1 日
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Eigenvalues and Eigenvectors についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!