필터 지우기
필터 지우기

creating a new file

조회 수: 123 (최근 30일)
Win Thomas Halim
Win Thomas Halim 2011년 5월 4일
댓글: Hamza 2023년 11월 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.

채택된 답변

Oleg Komarov
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
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' )
Hamza
Hamza 2023년 11월 30일
Right

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 File Name Construction에 대해 자세히 알아보기

제품

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by