My program doesn't write data to file
조회 수: 1 (최근 30일)
이전 댓글 표시
I don't know why this program doesn't work. I think is good, but I don't know.
clc, clear;
plik = fopen('dane.txt','w');
x = -5:1:5;
y = -5:1:5;
z = sin(x).*exp(y.*y);
fprintf(plik,'\tx\ty\tz\n%6.3f\t%6.3f\t%6.3f\n', [x;y;z]);
fclose(plik);
댓글 수: 0
답변 (1개)
Cris LaPierre
2021년 3월 29일
Works for me. What do you mean by "this program doesn't work"? Do you mean it's not creating the file, or the file contents are not what you wanted?
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Low-Level File I/O에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!