Delete rows from array

조회 수: 1 (최근 30일)
Benjamin Cowen
Benjamin Cowen 2016년 2월 2일
답변: Image Analyst 2016년 2월 5일
I have an array called yi1
It has more than 10,000 rows.
How can I delete all rows from 10,000 upwards?

채택된 답변

James Tursa
James Tursa 2016년 2월 2일
yi1 = your matrix
yi1(10000:end,:) = [];

추가 답변 (1개)

Image Analyst
Image Analyst 2016년 2월 5일
Another way. Assuming a 2D array:
yi1 = yi1(1:9999,:); % Extract first 9,999 rows

카테고리

Help CenterFile Exchange에서 Operators and Elementary Operations에 대해 자세히 알아보기

태그

아직 태그를 입력하지 않았습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by