I would like to know the problem of the following codes to generate the bar graphs. Moreover, I need the years to appear on the graph. Anyone help. Thanks.
Names = {'US','Canada','Belgium','Hungary'};
YearsWon = {[2002, 2005],[2012, 2013],...
[2003, 2004,2011, 2017],[2001, 2015, 2016]};
set(gca, 'YTickLabel', Names,...
'XTick',2001:2017);
xlabel('Years Won');ylabel('Country Name')