Info

Questa domanda è chiusa. Riaprila per modificarla o per rispondere.

How can I change my fprint error

1 visualizzazione (ultimi 30 giorni)
Yixuan Zhang
Yixuan Zhang il 15 Set 2019
Chiuso: MATLAB Answer Bot il 20 Ago 2021

Risposte (1)

Image Analyst
Image Analyst il 15 Set 2019
Modificato: Image Analyst il 15 Set 2019
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);

Questa domanda è chiusa.

Community Treasure Hunt

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

Start Hunting!

Translated by