save workspace variables to *.dat along with int type
3 次查看(过去 30 天)
显示 更早的评论
How to save workspace to *.dat along with int type?
1 个评论
回答(1 个)
Jan
2011-5-11
If you have a STRUCT or CELL in the workspace, what result do you expect after saving the data to a dat file with INT type? I cannot imagine, that there is a reliable solution for the general task.
Please post any details.
2 个评论
Jan
2011-5-12
a = int32(1:4);
save a.dat a -ascii
or:
fid = fopen('a.dat', 'w');
fprintf('%d ', a);
fclose(fid);
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Audio and Video Data 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!