Change all matrix elements from x to 1/x
14 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Iakovos Antonoglou
il 12 Giu 2018
Commentato: Walter Roberson
il 25 Apr 2020
Hello, i am trying to change all the elements in a single line matrix from Xj to 1/Xj. Thanks
0 Commenti
Risposta accettata
Più risposte (1)
Asieh Daneshi
il 25 Apr 2020
A=rand(n);
A(:,n)=1./A(:,n);
1 Commento
Walter Roberson
il 25 Apr 2020
This would change a single column, rather than a single line (row). It happens to change the last column, by the way.
Vedere anche
Categorie
Scopri di più su Get Started with MATLAB in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!