Change all matrix elements from x to 1/x
Afficher commentaires plus anciens
Hello, i am trying to change all the elements in a single line matrix from Xj to 1/Xj. Thanks
Réponse acceptée
Plus de réponses (1)
Asieh Daneshi
le 25 Avr 2020
0 votes
A=rand(n);
A(:,n)=1./A(:,n);
1 commentaire
Walter Roberson
le 25 Avr 2020
This would change a single column, rather than a single line (row). It happens to change the last column, by the way.
Catégories
En savoir plus sur Matrix Indexing dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!