2013-12-18 44 views

回答

3

你需要的是legend命令。

例如在doc:

figure 
x = -pi:pi/20:pi; 
plot(x,cos(x),'-ro',x,sin(x),'-.b') 
hleg1 = legend('cos_x','sin_x'); 

會給你這樣的:

enter image description here

希望這有助於!

相關問題