Re: saving double loop to file.txt
- From: "Wouter den Boer" <wdenboer@xxxxxxxxx>
- Date: Sun, 11 Dec 2005 05:18:46 -0500
>
> Does this help?
>
> j = 1:5
> k = 1:10
> eta0 = 10;
> xi0 = 5;
> eta = eta0+2*j;
> xi = xi0+20*k;
> [etam,xim] = meshgrid(eta,xi);
> f1 = etam.*xim
> fid = fopen('test.txt','wt') % note the 't'-option
> fprintf(fid,[repmat(' %6.2f',1,size(f1,2)) '\n'],f1')
> fclose(fid)
>
> /PB
Thanks a lot,
This does exactly what I need, but this raised a new problem. The
function as above 'f1=etam.*xim' is not the function I use.
The function used is somewhat like;
f1 = ( B / ((B - A + xim) ^ 2 + (etam)^2)^(-3/2));
f2=int(f1,B,-L2/2,L2/2);
f3=int(f2,A,-L1/2,L1/2);
f5=(( rho * eta)/f4);
f6=double (f5) %this function is displayed not in numbers
If I use the solution above matlab gives this error
??? Error using ==> sym.mpower
Matrix must be square.
do you have a new solution?
thanks again
Wouter
.
- References:
- saving double loop to file.txt
- From: Wouter den Boer
- Re: saving double loop to file.txt
- From: PB
- saving double loop to file.txt
- Prev by Date: Re: saving double loop to file.txt
- Next by Date: Re: Binary search in Matlab
- Previous by thread: Re: saving double loop to file.txt
- Next by thread: large Residual in lsqnonlin
- Index(es):
Relevant Pages
|