필터 지우기
필터 지우기

how can i exclude rows from a matrix

조회 수: 27 (최근 30일)
MAHMOUD ALZIOUD
MAHMOUD ALZIOUD 2017년 10월 20일
댓글: Cyrus Rezvanifar 2017년 10월 20일
Dear Guys, I have a question that will help me a lot in my research. lets say I have a matrix of 3000*2 dimensions. the first 2900 rows are number 02 repeated in each row. the last 100 rows carry number 01. I do not need this number one rows. How can i tell MATLAB to read just the first 2900 or to exclude the outliers such as number 01 here? thank you guys
  댓글 수: 2
Andrei Bobrov
Andrei Bobrov 2017년 10월 20일
Please attach smal part your data here as mat-file.
MAHMOUD ALZIOUD
MAHMOUD ALZIOUD 2017년 10월 20일
Here is a sample of the matrix, i need matlab to read just the similar number which is here number 2, and to delete the number 1 cells
thank you

댓글을 달려면 로그인하십시오.

채택된 답변

Cyrus Rezvanifar
Cyrus Rezvanifar 2017년 10월 20일
편집: Cyrus Rezvanifar 2017년 10월 20일
Simply try the two lines of code below, and it would remove the 1's elements from your data:
Data=str2num(Month_of_Data);
Data(2785:end)=[]
Let me know if this is what you needed to do
  댓글 수: 2
MAHMOUD ALZIOUD
MAHMOUD ALZIOUD 2017년 10월 20일
it worked thank you Mr Sayed very much
Cyrus Rezvanifar
Cyrus Rezvanifar 2017년 10월 20일
You're welcome, glad it worked

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Cell Arrays에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by