Using matlab simple draw curves, and labeling, the legend, the screen grid, and other operations
Method / Step
-
I used r2012 version is now simply draw two curves, a sine, cosine a different line widths, named curve. Procedures are as follows:
x = 0: 0.001: 2 * pi;% create a time series
y1 = 0.5 * sin (x);% creates sinusoidal
y2 = cos (x);% create cosine curve
% Corresponding to the width painting
plot(x,y1,'r','LineWidth',0.5);
hold on;
plot(x,y2,'b','LineWidth',1);
axis ([0 2 * pi -1 1]);
% Curved axis title
title ( 'profile');
-
The curve text annotation, I was just looking for two points on the curve, application text function:
text (pi, 0, '\ leftarrow sine');
text (pi / 2,0, '\ leftarrow cosine');
-
Obtaining maximum point of the curve to a curve as an example:
[a2,b2]=max(y2);
plot(x(b2),a2,'r*');
text (x (b2), a2, 'maximum point curve 2');
-
Two exemplary curves of legend, and to join the grid. "
Legend% plus
Legend ( 'curve 1' 'curve 2');
% Plus grid
grid on;
-