Change all matrix elements from x to 1/x
14 次查看(过去 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.
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!