How to remove the last column in an array
조회 수: 54 (최근 30일)
이전 댓글 표시
How to remove the last column in this array?
a=[1 2 3 4
5 6 7 8
9 1 2 3
4 5 6 7];
Resultant array is
a=[1 2 3
5 6 7
9 1 2
4 5 6];
댓글 수: 0
답변 (2개)
Julia
2014년 10월 28일
Hi again,
I think you should read a bit abot the ":"-operator, it is quite helpful ;)
a =
1 2 3 4
5 6 7 8
9 1 2 3
4 5 6 7
>> a=a(:,1:end-1)
a =
1 2 3
5 6 7
9 1 2
4 5 6
I also answered your last question. Did it help you? If so, please accept my answer, so other users know, that this solves the issue.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Logical에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!