function createfigure(ymatrix1)


% Create axes
axes1 = axes('Parent',figure,'YGrid','on',...
    'XTickLabel',{'Rectangular','Triangle','Sinc','Spline'},...
    'XTick',[1 2 3 4],...
    'XGrid','on');
% Uncomment the following line to preserve the X-limits of the axes
xlim([0.5 6]);
box('on');
hold('all');

% Create multiple lines using matrix input to bar
bar1 = bar(ymatrix1,'Parent',axes1);
set(bar1(1),'DisplayName','T_s=0.01s');
set(bar1(1),'DisplayName','T_s=0.01s');
set(bar1(2),'DisplayName','T_s=0.05s');
set(bar1(3),'DisplayName','T_s=0.1s');

% Create legend
legend(axes1,'show');
