how to solve bar Error . Error using bar (line 58) X must be same length as Y.
Mostrar comentarios más antiguos
i have this code. last time its work good and but now bar error is shown.
[num,text,raw] = xlsread('Book1.xlsx');
x=num(:,7);
observX = x(1:1000);
imageX=0:23;
nX = length(imageX);
for i = 1:nX
cX = imageX(i);
cntX(i) = sum(observX == cX);
end
pmfX = cntX/sum(cntX);
figure;
bar(imageX, pmfX);
title('Marginal PMF Of "O3.1st.Max.Hour"')
xlabel('Image Of O3.1st.Max.Hour')
ylabel('Marginal PMF')
figure;
bar(imageX, cntX);
title('Histogram Of "O3.1st.Max.Hour"');
xlabel('Image Of O3.1st.Max.Hour');
ylabel('Counts of Occurence');
Error using bar (line 58) X must be same length as Y.
5 comentarios
madhan ravi
el 27 de Dic. de 2018
Editada: madhan ravi
el 27 de Dic. de 2018
upload your excel file , I can't see any attachments
john karli
el 27 de Dic. de 2018
john karli
el 27 de Dic. de 2018
john karli
el 27 de Dic. de 2018
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Profile and Improve Performance en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!