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