Cut the last n of matrix row ?
조회 수: 3 (최근 30일)
이전 댓글 표시
e.g i have matrix a :
1
2
3
4
5
6
7
i want to cut the last 2 row of matrix A ? and become
1
2
3
4
5
댓글 수: 0
채택된 답변
Andrei Bobrov
2013년 3월 25일
편집: Andrei Bobrov
2013년 3월 25일
a = (1:7)'; n = 2;
A = a(1:end - n);
or
a(end - [n-1, 0]) = [];
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Multidimensional Arrays에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!