How to export string with timeperiod to .dat file?
4 views (last 30 days)
Show older comments
zulkarnain hassan
on 7 Feb 2017
Commented: zulkarnain hassan
on 7 Feb 2017
I have a large string that containing time period such as 23-May-2009 02:00:00 (as attached). Variable editor in Matlab is unable to display these variables, since the variables have more that 524288 elements. I want to export the variables to .dat file, so I can see the list of the variables. I try to use fopen and fprintf functions to export the variables, but unsuccessful. Any help? Thank you.
0 Comments
Accepted Answer
KSSV
on 7 Feb 2017
load hourlyperiod.mat
d = hourlyperiod ;
fid = fopen('iwant.dat','w') ;
for i = 1:length(d)
fprintf(fid,'%s \n',d(i,:)) ;
end
fclose(fid) ;
More Answers (0)
See Also
Categories
Find more on String Parsing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!