Removing certain lines of text from a cell array
古いコメントを表示
I have a 53218x1 cell named N1. It is a cell consisting of the names of galaxies I have taken from a loaded ASCII catalog. I need to remove galaxies that have the first three letters starting with 'ESO'. There are 5,980 of these lines of code I have to remove. How would I do that? Would a 'for loop' work?
SIDE NOTE: these words all are 1x10 char in N1.
採用された回答
その他の回答 (1 件)
Azzi Abdelmalek
2015 年 6 月 12 日
v={'esoabcd';'abcgd';'ehdf';'esoez'}
out=v(cellfun(@isempty,regexp(v,'(?<=eso).+')))
カテゴリ
ヘルプ センター および File Exchange で Loops and Conditional Statements についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!