How to assign the result of a row deletion operation to a new matrix?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Ecaterina Savenco
le 17 Jan 2023
Commenté : Star Strider
le 17 Jan 2023
I have a 10X10 matrix, from which I delete the row 3 applying A(3,:)= [] . I want to save the original matrix and have the new matrix with a deleted row assigned to a new variable C. Now how do I assign this result to a new matrix C?
I do C= A(3,:)=[] but it is obviously wrong.
Thank you!
0 commentaires
Réponse acceptée
Star Strider
le 17 Jan 2023
I would do something like this —
A = magic(10) % Save Original
C = A; % Copy 'A' To 'C'
C(3,:) = [] % Delete Row 3 From 'C'
.
4 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Logical dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!