however, how can I do something similar for the variables residing right of
the formatstring (xarray / yarray)? I have been trying
params=sprintf("%s; yarray(%d:)", params i);
looking at "params" this results in
[xarray; yarray(1:); yarray(2:); ... yarray((size(yarray)(1)):)]
and consequently what I'd like to see on the right side.
But when I write
fprintf(outfile, [repmat(formatstring,[1 (size(yarray)
after that this doesn't work at all and writes nonsense into "outfile". At the
end of the day I would like to write as many colums into "outfile" as there
are - without knowing in advance how many ones this could be.
Any idea how to realize this (if possible at all)?
sorry for the noise - after one day of fiddling (grrrrrr :-) ) my son helped
me out - just give the entire array as parameter and things work like a charm
- and I nearly broke my head how to make this the complicated way ...
Thank you for looking into this,
Am Freitag, 5. Mai 2017, 19:56:39 schrieb Dr.-Ing. Dieter Jurzitza:
> Dear listmembers,
> say you have a function called f having two variables as parameters:
> function f(xarray,yarray)
> outfile=fopen("test.dat", "w");
> fprintf(outfile, "%12.8f %12.8f\n", [xarray; yarray[1:]);
> fclose (outfile)
> assuming xarray being an array of type 1:1000 and yarray being an array of