Writing Strings to File in MATLAB

1 reply · 3K views · last reply
darthxepher
Messages
56
Reaction score
0
Hey,

so i want to write a string to a .txt file and I tried by doing this:

save filename.txt writer

(where writer is the variable containing string)
...
But i get weird char. instead of the string.
Any ideas?
 
I solved it with a

fid = fopen(path,'wt');
fprintf(fid,writer);
fclose(fid);


:)