Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
NCTM or The Math Forum.


Tadgh
Posts:
1
Registered:
12/30/13


Matrix export to text file not moving to next line
Posted:
Dec 30, 2013 10:12 AM


Hi,
I have read all the previous posts relating to this error but i cannot figure out and its preventing me from moving on in my FYP.
To simplify i have calculated the radiation from the sun every hour for every day of the year leaving me with 8760 output values for TotalRadiation. I then created a matrix, where n is the day number, LST is the hour and TotalRadiation.
A=[n, LST, TotalRadiation] fileID = fopen('solardatanew.txt','w'); fprintf(fileID,'%3s %2s %12s\r\n','Day','Hour','Total Radiation [(W/m)^2]'); fprintf(fileID,'%3f %2.2f %12.8f\r\n',A); fclose(fileID);
The file is creating and opening correctly, the header is adding as it should but i am only getting one line of data in the txt file..
I would really appreciate help


Date

Subject

Author

12/30/13


Tadgh

12/30/13


dpb


