Re: File writing Problem
- From: Jérôme <dutmatlab@xxxxxxxx>
- Date: Wed, 31 Aug 2005 10:05:58 -0400
I think you should start by reading this :
<http://www.mathworks.com/access/helpdesk/help/techdoc/matlab_prog/ch_imp50.html>
Try this (I know that it's a simple example) :
a=[1 2 2 5 4];
b=[3 3 4 1 1];
n=length(a);
fid=fopen('results.txt','wt');
fprintf(fid,[repmat('%d ',1,n) '\n'],a+b);
fprintf(fid,[repmat('%d ',1,n) '\n'],a-b);
fprintf(fid,[repmat('%.2f ',1,n) '\n'],a./b);
fprintf(fid,[repmat('%d ',1,n) '\n'],a.*b);
fclose(fid);
Jérôme
.
- References:
- Re: File writing Problem
- From: Vamsi
- Re: File writing Problem
- From: Jérôme
- Re: File writing Problem
- From: Vamsi
- Re: File writing Problem
- From: Jérôme
- Re: File writing Problem
- From: Vamsi
- Re: File writing Problem
- Prev by Date: Re: What exactly does the Fourier Transform do?
- Next by Date: User Error
- Previous by thread: Re: File writing Problem
- Next by thread: Re: File writing Problem
- Index(es):