creating a new file
조회 수: 123 (최근 30일)
이전 댓글 표시
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
채택된 답변
Oleg Komarov
2011년 5월 4일
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
Robert Cumming
2011년 5월 4일
to add to Olegs answer you can add the following line to view the file in notepad:
system ( 'notepad results.str' )
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 File Name Construction에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!