
View the following examples to digest the plot facilities.
Matlab’s command:
>> plot(x, y, 'md: '); figure; plot(x, y, 'r*--'); hold on;
>> y1=rand(1,length(y)), plot(x,y1, 'bo'); plot(x,y1, 'r+');
>> xlabel('X-values'); ylabel('Y-values'); title('This is a plot');
>> close all; plot(x,y, 'bp--', x, log(y1.^2), 'rh', x, log(y1.^2),'bs');
Matlab’s response:
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
-15
-10
-5
0
5
10
15
20
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
-15
-10
-5
0
5
10
15
20
X-values
Y-values
This is a plot
Commentaires sur ces manuels