Convert numbers in a 1x1 string to an array.
显示 更早的评论
I'm currently using MATLAB to read data directly from an instrument using the instrument toolbox. The problem I'm having is that when i read the data in, it brings it into MATLAB into a 1 x 1239 char string. This means i have all my data stored as text in the same 'cell', only separated by spaces. E.g in cell (1,1) of variable A there is: V 0, 100 -0.001 -0.01 -0.02........ #END Is there any way to take this data, convert it to number and put it into an array?
Please note i have tried str2num, str2mat, cell2mat etc and these do not work because the data i have is all in the same 1x1 'cell'
Thanks in advance for your help.
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Characters and Strings 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!