Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

i have a matrix A(25357*2), i want to delete rows as i explained below. any help?

조회 수: 1 (최근 30일)
M.Prasanna kumar
M.Prasanna kumar 2019년 2월 6일
마감: MATLAB Answer Bot 2021년 8월 20일
In the attachced excel sheet above,
Some rows starts with 1(40rows),some rows starts with 2(58rows), some rows starts with 3(55rows) and so on....
if we consider rows starting with 1, the corresponding 40 column values
6
42
50
55
57
62
83
107
148
157
186
211
213
245
261
282
284
333
429
471
490
506
537
549
551
590
659
693
698
763
769
778
782
794
797
876
881
965
970
991
so if we consider the above values, i want to delete rows starting with 6,42,50,55,57,........991 from matrix A
since value 2 is not there in the list , rows starting with 2 should not be deleted, now again consider 58 rows starting with 2, the rows starting with these 58 column values should be deleted.
next rows starting with three and rows starting with these 55 column values should be deleted.
and so on....
when it comes rows starting with 6are already deleted in the first operation.so it should start with rows starting with 7.
and whole process should continue..

답변 (1개)

Raghav Singhal
Raghav Singhal 2019년 2월 20일
Hi,
You can try using logical vectors if it helps resolve your query. You can refer to the documentation link below for more details

이 질문은 마감되었습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by