How do I extract a substring in a cell array of strings?

12 ビュー (過去 30 日間)
Abdullah Hamidi
Abdullah Hamidi 2019 年 3 月 4 日
コメント済み: Abdullah Hamidi 2019 年 3 月 4 日
I have loaded up a catalog of satellite and space debris entries on MATLAB and I am trying to extract everything that is debris.
As you can see in the attachment (column 4), I am trying to run a for loop to look for strings that contain the word 'deb' (and other corresponding fields) and save them separately. But I am just not getting anywhere. Any help would be hugely appreciated.

採用された回答

KSSV
KSSV 2019 年 3 月 4 日
[num,txt,raw] = xlsread(myfile) ;
C4 = txt(:,4) ;
idx = contains(C4,'DEB')
Note that for better help, you should attach your file not an image snippet.
  5 件のコメント
KSSV
KSSV 2019 年 3 月 4 日
Ohhh....simple:
[num,txt,raw] = xlsread(myfile) ;
C4 = txt(:,4) ;
idx = contains(C4,'DEB')
iwant = txt(idx,:)
Abdullah Hamidi
Abdullah Hamidi 2019 年 3 月 4 日
Perfect!!!
You're a life saver!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeString についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by