How to assign the result of a row deletion operation to a new matrix?
1 view (last 30 days)
Show older comments
Ecaterina Savenco on 17 Jan 2023
Commented: Star Strider on 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.
I would do something like this —
A = magic(10) % Save Original
C = A; % Copy 'A' To 'C'
C(3,:) =  % Delete Row 3 From 'C'
More Answers (0)
Find more on Matrix Indexing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!