Matlab writing to file

  • MATLAB
  • Thread starter darthxepher
  • Start date
  • #1
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?
 

Answers and Replies

  • #2
I solved it with a

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


:)
 

Related Threads on Matlab writing to file

Replies
5
Views
8K
Replies
5
Views
78K
Replies
1
Views
3K
Replies
1
Views
2K
Replies
1
Views
6K
  • Last Post
Replies
1
Views
6K
  • Last Post
Replies
3
Views
11K
Replies
3
Views
14K
  • Last Post
Replies
1
Views
2K
Replies
3
Views
2K
Top