In my homework I was asked to use fprintf to display my data in a table?
1 次查看(过去 30 天)
显示 更早的评论
I have been using the correct code but instead of having one header at the top and all the numbers below the headers all the numbers are displayed and the headers appear beside each number.
here is the code I've been typing
fprintf ( s% s% \n f2.0% e1.2% \n , 'K value', 'Temp', K , T)
Please Help!
0 个评论
采纳的回答
Image Analyst
2015-2-16
编辑:Image Analyst
2015-2-16
Because K and T are arrays, you need to do it in two separate fprintf()s:
fprintf('K value, Temp\n');
fprintf('%2.0f %6.2e\n', K , T);
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 String Parsing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!