clear      %clear the variable

%----model calculation section---
x=[-pi:pi/10:pi]    %create  twenty data points
y1=sin(x)           %
y2=cos(x)

%---- plotting section ---%
hold off %clear the previous plot setting
figure(1)  %make plot in figure 1
plot(x,y1,'-*r') %line specification: solid line, marker *, red color
hold all  %hold on all previous settings: plotting window, axis, styles
plot(x,y2,':ob')    %line specification: dotted line, marker circle, blue
legend('sin','cos')


xlabel('X-value')    % X axis label
ylabel('Y-value')   % Y axis label
title('Simple Sinusoidal Functions',...
    'FontSize',18)