how to truncate specific rows and columns of matrix in matlab.
106 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
A = [10,20,30,40; ...
20,30,40,50; ...
30,40,50,60; ...
40,50,60,70];
now i want to truncate the row no 2 and col no 2 and wants to get new matrix of 3x3? kindly help me
1 Commento
Risposta accettata
Azzi Abdelmalek
il 3 Gen 2016
A(2,:)=[]
A(:,2)=[]
4 Commenti
Steven Lord
il 16 Nov 2020
Rajinder singh wrote a flag that is more of a comment.
we can also delete columns by this method, but in case of columns deletion, the colon has to come first in the bracket, then comes the cols_to_delete
Please use flags for alerting contributors with higher level of privileges of spam, places where someone has edited away a question, answer, or comment that renders later answers or comments unclear, etc. If you have clarifying questions, additional information to contribute (as was the case here), or want to start / reopen a discussion please add a comment.
Più risposte (1)
Vedere anche
Categorie
Scopri di più su Logical 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!