MATLAB Answers

how to delete row and column at a single command????????????

3 views (last 30 days)
VIJAY
VIJAY on 12 Aug 2018
Answered: Matt J on 12 Aug 2018
A=[1 2 3 4 5; 6 7 8 9 10; 11 12 13 14 15; 16 17 18 19 20;];
I want to delete 2row and 2 column,4 row and 4 column
my require output is
a=[1 3 5; 11 13 15]

Answers (3)


KALYAN ACHARJYA
KALYAN ACHARJYA on 12 Aug 2018
Edited: KALYAN ACHARJYA on 12 Aug 2018
A(:,[2 4])=[]; A([2 4],:)=[];
  3 Comments

Sign in to comment.


Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!