필터 지우기
필터 지우기

instead of saving a mat file i want ro save a .txt, i want to use fopen, fclose, and fprintf

조회 수: 2 (최근 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
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
Walter Roberson 2020년 4월 5일
fid = fopen('OutputFile.txt', 'w');
fprintf(fid, '%d\n', 1:10);
fclose(fid)

카테고리

Help CenterFile Exchange에서 Programming에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by