[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Values not getting printed in csv file
From: |
N |
Subject: |
Re: Values not getting printed in csv file |
Date: |
Mon, 8 Jun 2020 18:13:40 +0200 |
> Thank so much, I got the results
> I need one help, thats when i have
> [fid1, msg1] = fopen('file1.csv', 'wt' );
> fprintf (fid1, 'Temperature \t');
> fprintf('\n');
> fprintf (fid1, 'Value_n \t');
> fprintf('\n');
> fprintf (fid1, 'Value_p\t');
>
> for
> for
> for
> ...
> fprintf (fid, '% 3.0f \ n' , temp)
> fprintf (fid1, '% 1.1f\t' , vnw);
> fprintf (fid1, '% 1.1f\t' , vpw);
>
> end
> end
> end
>
> I get the output
>
> Temperature VNW VPW-40 1.8 -1.5 0 1.2 -1.8 25 1.2 -1.8 60 1.2 -1.5 -40 1.2
> -1.8 0 1.8 -1.2 25 0.9 -1.8 60 0.9 -1.8 -40 0.9 -1.8 0 0.9 -1.8 25 0.9 -1.8
> 60 0.9-1.5
>
> in a single line, but I should get the values in 3 different lines
> Temperature 40,0,25 and so on ----------
> Value_n 1.8, 1.2,1.2 and so on ----------
> Value_p -1.5,-1.8, -1.8 and so on ----------
You have to add \n to insert a new line, windows also need an additional \r but
do not remember order. \t I think is a tab, I have concluded ; is rather good
choice separator as at least in Sweden , is used as decimal but I have also
seen it used as thousand separator.
> How do I assign each Temperature values to only temperature, Value_n to VNW
> and Value_p to VPW ? please help
?? no idea what you want.