From: Benedikt Heudorfer on
another newby-question by me ;-) I hope i don't overuse your patience.

I have one Matrix C with dates and one Matrix D with doubles measurements. If I leave C in datenum, saving both matrices in one .txt via fprintf is no Problem:

data = [C,D];
fid=fopen('text.txt', 'wt');
fprintf(fid,'%6d\t %f\n',data');
fclose(fid);

(with help of Wayne and dpd ;-) )

But how do I have to change this code so that it is possible to write C and D into the same .txt with C being in datestr???
From: Jan Simon on
Dear Benedikt Heudorfer!

> I have one Matrix C with dates and one Matrix D with doubles measurements. If I leave C in datenum, saving both matrices in one .txt via fprintf is no Problem:
>
> data = [C,D];
> fid=fopen('text.txt', 'wt');
> fprintf(fid,'%6d\t %f\n',data');
> fclose(fid);
>
> (with help of Wayne and dpd ;-) )
>
> But how do I have to change this code so that it is possible to write C and D into the same .txt with C being in datestr???

Either use a FOR loop or create a CELL, because you cannot combine strings (as replied by DATESTR) and numbers in one array.

Good luck, Jan