creating a new file
123 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Win Thomas Halim
am 4 Mai 2011
Kommentiert: Hamza
am 30 Nov. 2023
hi there, anyone know hot to save results to a file in matlab?(i.e. create new file) suppose i had this x,y,z data that i want to save it as "results.str" that is openable via notepad. i really need help here! anyone can help? thank you very much.
0 Kommentare
Akzeptierte Antwort
Oleg Komarov
am 4 Mai 2011
Create new file discarding content if already exists:
fid = fopen('results.str','w');
fprintf(fid,'%f,%f,%f\r\n',[1 2 3; 4 5 6].');
fid = fclose(fid);
2 Kommentare
Robert Cumming
am 4 Mai 2011
to add to Olegs answer you can add the following line to view the file in notepad:
system ( 'notepad results.str' )
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu File Name Construction finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!