Prev: Changing the name of a field dynamically GUIDE
Next: Transferin Complex signals on udp simulink
From: jens on 9 Jun 2010 05:07 Hey I have the following example: price=1:10; fid = fopen('example.txt','wt'); fprintf(fid,'%2.0f\n',price(:)); fclose(fid); In the above example the txt-file is saved in the current directory. How do I change where to save the txt-file? How do I save the file on the desktop? \Jens
From: Wayne King on 9 Jun 2010 05:53 "jens " <pascal(a)hotmail.com> wrote in message <hunljp$s3u$1(a)fred.mathworks.com>... > Hey > > I have the following example: > price=1:10; > fid = fopen('example.txt','wt'); > fprintf(fid,'%2.0f\n',price(:)); > fclose(fid); > > In the above example the txt-file is saved in the current directory. How do I change where to save the txt-file? How do I save the file on the desktop? > > \Jens Hi Jens, you just need to add the path in front of example.txt % for windows price=1:10; fid = fopen('c:\data\example.txt','wt'); fprintf(fid,'%2.0f\n',price(:)); fclose(fid); With the obvious adjustments for linux or Mac Wayne
|
Pages: 1 Prev: Changing the name of a field dynamically GUIDE Next: Transferin Complex signals on udp simulink |