Save char to file
3 views (last 30 days)
Show older comments
Hi,
I have a char (name: CallSave, structure: <3x315 >) with this output
"
val =
I9.CLS;53;53;59;61;51;47;41;21;26;28;27;38;44;43;47;56;55;47;50;51;51;52;51;49;47;46;44;45;53...
I6.ALS;67;60;59;56;54;55;57;56;53;49;51;53;56;57;56;51;46;46;54;59;58;56;59;65;69;70;54;45;49...
I88.XAS;39;47;47;40;35;37;39;38;37;37;37;36;34;34;35;36;35;35;31;33;35;34;30;27;27;28;29;25;23...
"
How can I save it to a txt file?
Thanks
0 Comments
Answers (1)
Image Analyst
on 8 Aug 2014
What are the members? Can you just do
fid = fopen(filename, 'wt');
fprintf(fid, '%s\n', CallSave.I9.CLS);
fprintf(fid, '%s\n', CallSave.I6.ALS);
fprintf(fid, '%s\n', CallSave.I88.XAS);
fclose(fid);
2 Comments
Image Analyst
on 8 Aug 2014
But I don't know your structure's structure/field/members. Please give some code to create a CallSave structure or "val" structure or whatever you call it. Then we'll have something that we can work with. Right not we have nothing, except a bunch of guesses, which apparently are wrong.
See Also
Categories
Find more on JSON Format 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!