Info
此问题已关闭。 请重新打开它进行编辑或回答。
How can i count the value of a string?
1 次查看(过去 30 天)
显示 更早的评论
I want to calculate a string how many staffs in there. For example
1)Steven Alex Mason 28 85 65.5
2)Alex Jones 29 35 60
For example 1 it has 6 elements and 2 it has 5 elements. I would like to find them.
0 个评论
回答(1 个)
KSSV
2016-5-12
str = 'I love MATLAB' ;
A=strread(str,'%s','delimiter',' ') ;
length(A{1})
length(A{2})
length(A{3})
0 个评论
此问题已关闭。
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!