using find function for char
显示 更早的评论
line =
10 L1 L2 L5 C1 C2 P2 C5 S1 S2# / TYPES OF OBSERV
Name Size Bytes Class
line 1x81 162 char
%I need to use find function for each character in line. For example, I need to know which column is L1 or L2.
采纳的回答
更多回答(1 个)
Michael Haderlein
2015-4-16
line='10 L1 L2 L5 C1 C2 P2 C5 S1 S2';
strfind(line,'L2')
ans =
13
类别
在 帮助中心 和 File Exchange 中查找有关 Characters and Strings 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!