instead of saving a mat file i want ro save a .txt, i want to use fopen, fclose, and fprintf
1 回表示 (過去 30 日間)
古いコメントを表示
Instead of saving the lists of processes to Core1.mat and Core2.mat, write the lists of processes to the files Core1.txt and Core2.txt, respectively. You may use the functions fopen(), fclose(), and fprintf().
1 件のコメント
Geoff Hayes
2020 年 4 月 5 日
Alex - this seems like homework, so what have you tried so far? Please discuss your attempt, include code, etc. and indicate where you are having a problem. If you are observing error messages, please copy and paste the full error message (along with corresponding code) to this question.
回答 (1 件)
Walter Roberson
2020 年 4 月 5 日
fid = fopen('OutputFile.txt', 'w');
fprintf(fid, '%d\n', 1:10);
fclose(fid)
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Startup and Shutdown についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!