Change all matrix elements from x to 1/x
11 ビュー (過去 30 日間)
古いコメントを表示
Hello, i am trying to change all the elements in a single line matrix from Xj to 1/Xj. Thanks
0 件のコメント
採用された回答
その他の回答 (1 件)
Asieh Daneshi
2020 年 4 月 25 日
A=rand(n);
A(:,n)=1./A(:,n);
1 件のコメント
Walter Roberson
2020 年 4 月 25 日
This would change a single column, rather than a single line (row). It happens to change the last column, by the way.
参考
カテゴリ
Help Center および File Exchange で Logical についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!