Info
此问题已关闭。 请重新打开它进行编辑或回答。
Hey,I have this huge data file and what i would like to do is , use strfind to match the string and capture the data followed by this string(no problem).my problem is that i have same string twice..how can i write a code to take first match first?
1 次查看(过去 30 天)
显示 更早的评论
**edge
1 2 2
4 5 6
*edge
-1 1 1 -8 9 10
*edge
2 8 9
3 5 6
0 个评论
回答(1 个)
Yogananda Jeppu
2016-10-6
A={'**edge'
'1 2 2'
'4 5 6'
'*edge'
'-1 1 1 -8 9 10'
'*edge'
'2 8 9'
'3 5 6'
}
a=strfind(A,'edge')
find(~cellfun(@isempty,a))
This seems to work.
1 个评论
此问题已关闭。
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!