How do I delete rows and columns from a matrix
Afficher commentaires plus anciens
I know this has been asked before, but I am new to matlab and all the answers I read through were jargon to me. So if someone could really dumb this down that would be wonderful. That being said, I have a simple matrix A= [1 2 3; 4 5 6; 7 8 9]. If I want to make A1 = the same matrix with the second row deleted and A2 = matrix A with the second column deleted. How would I do this? I can delete the end rows and columns, but can not seem to figure out a way to delete middle sections. Again, I know this has been asked so I appreciate your patients. Thanks in advance.
1 commentaire
Lalit Dhurve
le 29 Jan 2020
A= [1 2 3; 4 5 6; 7 8 9];
A1=A;
A1(2,:)=[];
A2=A;
A2(:,2)=[];
A1 , A2
DONE!!!
Réponse acceptée
Plus de réponses (1)
Lalit Dhurve
le 29 Jan 2020
0 votes
A= [1 2 3; 4 5 6; 7 8 9];
A1=A;
A1(2,:)=[];
A2=A;
A2(:,2)=[];
A1 , A2
Catégories
En savoir plus sur Logical 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!