My program doesn't write data to file
Mostra commenti meno recenti
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);
Risposte (1)
Cris LaPierre
il 29 Mar 2021
0 voti
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?
Categorie
Scopri di più su Low-Level File I/O in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!