Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Matlab writing to file

  1. Aug 13, 2010 #1

    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?
  2. jcsd
  3. Aug 13, 2010 #2
    I solved it with a

    fid = fopen(path,'wt');

Share this great discussion with others via Reddit, Google+, Twitter, or Facebook