Info

此问题已关闭。 请重新打开它进行编辑或回答。

How can I change my fprint error

1 次查看(过去 30 天)
Yixuan Zhang
Yixuan Zhang 2019-9-15
关闭: MATLAB Answer Bot 2021-8-20

回答(1 个)

Image Analyst
Image Analyst 2019-9-15
编辑:Image Analyst 2019-9-15
You can't use the Ice array itself for indexes since they're floating point and indexes need to be like 1, 2, 3, 4, 5 etc. (integers starting at 1). To fix:
fprintf('Ice thickness for %d days = ', length(Ice));
fprintf('%.3f, ', Ice);

此问题已关闭。

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by