Convert cell array to vector
1 次查看(过去 30 天)
显示 更早的评论
Hi there,
I have imported time values (i.e 12:57:00) into matlab using the textscan() function.
fid = fopen('time.txt','r')
out = textscan(fid,'%s')
fclose(fid)
out{1}
However the values are in a cell array, I think?
How can I convert them to a vector? I need to do this because I want to import the data into the dfitool.
Thank you
0 个评论
采纳的回答
Jan
2012-2-13
I assume you want a datenum vector:
d = datenum(out{1});
If not, please explain the wanted output format.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Data Type Conversion 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!