removing specific rows from char array
조회 수: 23 (최근 30일)
이전 댓글 표시
data=['01'; '02'; '03'; '04'; '05'; '06'; '07'; '08'; '09'; '10'];
How I can remove the 1st and 5th columns from data aray?
댓글 수: 1
the cyclist
2021년 8월 27일
data is a 10x2 character array, so it does not have a 5th column. I assume you meant row. See my solution.
채택된 답변
the cyclist
2021년 8월 27일
data=['01'; '02'; '03'; '04'; '05'; '06'; '07'; '08'; '09'; '10'];
data([1 5],:) = []
댓글 수: 2
the cyclist
2021년 8월 27일
data=['01'; '02'; '03'; '04'; '05'; '06'; '07'; '08'; '09'; '10'];
remove = [1 5];
data(remove,:) = []
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!