error as input must be numeric

walter i get this error
Error using ==> hist at 45 Input arguments must be numeric.
Error in ==> gra at 24 hist(month);
as per your code
hist(month);
set(gca,'XLabel', GD);

답변 (1개)

Prateekshya
Prateekshya 2024년 9월 2일

0 개 추천

Hello @FIR,
This error will occur when "month" is not numeric, since "hist" function expects a numeric argument. To resolve this error, you need to use a numeric data type as an argument of "hist" function.
You may also explore "histogram" function as an alternative. Please find the link for the documentation of "histogram": https://www.mathworks.com/help/matlab/ref/matlab.graphics.chart.primitive.histogram.html
I hope this helps!

카테고리

도움말 센터File Exchange에서 Histograms에 대해 자세히 알아보기

태그

질문:

FIR
2011년 11월 9일

답변:

2024년 9월 2일

Community Treasure Hunt

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

Start Hunting!

Translated by