This is my code where i expect 1,2,3,4,5 as "xticklabel". But MATLAB is adding 0 and 6 at the end and skipping 1,3,5!
EFV = [34.4263250184944312;55.7029868436263982;56.9140938310396862;60.0977661822922329;15.4772478454135065];figure(1)title(' (EFV)','fontsize',10,"fontweight","Bold");xlabel(' Mechanisms')ylabel('(EFV)')box onhold onfor i = 1:length(EFV) h=bar(i,EFV(i)); if EFV(i) == min(EFV) set(h,'FaceColor','b'); elseif EFV(i) == max(EFV) set(h,'FaceColor','r'); else set(h,'FaceColor','k'); endend
Best Answer