how can ı solve this error ? Error using fprintf Invalid file identifier. Use fopen to generate a valid file identifier.
Show older comments
clear all;clc;
y=[2 3 4 5;5 6 7 8]
fid=fopen('myfile.txt','wt');
fprintf(fid,'%d,%d\n',y);
fclose(fid);
Accepted Answer
More Answers (2)
Caio Vaz Rimoli
on 4 Sep 2018
1 vote
Just brief comment: I also got this error because I ran out HD memory.
Aparna Komarla
on 2 Oct 2018
1 vote
Creating the directory you are storing the files/data in first might help!
Categories
Find more on File Operations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!