From: Benedikt Heudorfer on 20 Jun 2010 13:00 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 21 Jun 2010 16:34 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
|
Pages: 1 Prev: Assignment within State (syntax error in Stateflow) Next: Noise filter calculation |