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