How do I format a .txt file I've created?
1 view (last 30 days)
Show older comments
Im trying to display max_speed for 6 different satellites in a .txt file, however when i run this code only sat_id appears, not max_speed. Can someone help me fix this?
fileID=fopen('report.txt','w');
fprintf(fileID,'name\n');
fprintf(fileID,'studentnumber\n');
fprintf(fileID,'sat_id,max_speed(m/s),min_speed(m/s),orbital_period_before(s),orbital_period_after(s)\n');
for n = 1:6
fprintf(fileID,'%d\n', stat(n).sat_id);fprintf(fileID,'%15:9e %15:9e\n', stat(n).max_speed);
end fclose(fileID);
end
0 Comments
Accepted Answer
More Answers (0)
See Also
Categories
Find more on Text Data Preparation in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!