fdata(:,1) = cellfun(@(x) x(4:8),fdata(:,1),'un',0)
String Manipulation Syntax
1 次查看(过去 30 天)
显示 更早的评论
I have a cell array. Column 1 contains a string, and I would like to extract characters 4 through 8 of this column (in each row) and place this in column 10. I understand how to do make column 10 match column 1 with:
fdata(:,10) = fdata(:,1);
but how to I make fdata(:,10) just contain characters 4 through 8 of fdata(:,1)?
Thanks for the the help.
0 个评论
采纳的回答
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Characters and Strings 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!