(1)MATLAB繪製曲線時如何將曲線背景設置爲白色
figure('color',[1 1 1]);
MATLAB代碼中加入這句話就會使繪製的曲線背景是白色
(2)如何繪製曲線
figure
plot(smooth(Pf,20),smooth(Pz_withoutquantization,20),'r') %繪製曲線,橫座標是Pf,縱座標是Pz_withoutquantization,'r'表示顏色red
hold on
plot(smooth(Pf,20),smooth(Pd,20),'b') %繪製曲線,橫座標是Pf,縱座標是Pd,'b'表示顏色blue
hold on
plot(smooth(Pf,20),smooth(Pz_quantization,20),'g')
hold on
str=sprintf(' ROC diagram,SNR=-6db');
title(str);//設置曲線的標題
xlabel('False alarm probability(Pfa)'); //X座標軸的名稱
ylabel('Detection probability(Pd)');//Y座標軸的名稱
legend('directly spectrum sensing','corperative spectrum sensing without non-uniform quantization','corperative specturm sensing with non-uniform quantization');
//每個曲線的名稱
legend('directly spectrum sensing','corperative spectrum sensing without non-uniform quantization','corperative specturm sensing with non-uniform quantization');
//每個曲線的名稱
(3)繪製圖形的同時添加小三角、矩形、菱形等標誌
標記符 點形
+ 加號
o 圓圈
* 星號
. 實心點
x 叉號
s 正方形
d 鑽石形
^ 上三角形
v 下三角形
> 右三角形
< 左三角形
p 五角星形
h 六角星形