minor change to channel amp phase est .m script

add plot grid
This commit is contained in:
2023-03-28 00:22:57 +08:00
parent 26fa3e9e50
commit b000e2702e
@@ -14,7 +14,7 @@ clc; clear;
%% initial parameters/初始参数 %% initial parameters/初始参数
interp = 8; % interpolation factor interp = 8; % interpolation factor
channelNum = 4; channelNum = 4;
dataLen = 1024*8; dataLen = 131072;
fs = 48e6; fs = 48e6;
dataFile = "iladata_ant_3-1.csv"; dataFile = "iladata_ant_3-1.csv";
@@ -80,13 +80,15 @@ if dataFile.contains("loop")
plot(ampEstSym(:,[1,4])); plot(ampEstSym(:,[1,4]));
legend({"ch1","ch4"}); legend({"ch1","ch4"});
title("Amplitude Estimation"); title("Amplitude Estimation");
ylim([min(ampEstSym(:,[1,4]),[],'all')-0.1,max(ampEstSym(:,[1,4]),[],'all')+0.1]) ylim([min(ampEstSym(:,[1,4]),[],'all')-0.1,max(ampEstSym(:,[1,4]),[],'all')+0.1]);
grid on; grid minor;
subplot(122); subplot(122);
plot(angleEstSym(:,[1,4])); plot(angleEstSym(:,[1,4]));
legend({"ch1","ch4"}); legend({"ch1","ch4"});
title("Angle Estimation"); title("Angle Estimation");
ylim([min(angleEstSym(:,[1,4]),[],'all')-10,max(angleEstSym(:,[1,4]),[],'all')+10]) ylim([min(angleEstSym(:,[1,4]),[],'all')-1,max(angleEstSym(:,[1,4]),[],'all')+1]);
grid on; grid minor;
else else
@@ -94,12 +96,14 @@ else
plot(ampEstSym); plot(ampEstSym);
legend({"ch1","ch2","ch3","ch4"}); legend({"ch1","ch2","ch3","ch4"});
title("Amplitude Estimation"); title("Amplitude Estimation");
ylim([min(ampEstSym,[],'all')-0.2,max(ampEstSym,[],'all')+0.2]) ylim([min(ampEstSym,[],'all')-0.2,max(ampEstSym,[],'all')+0.2]);
grid on; grid minor;
subplot(122); subplot(122);
plot(angleEstSym); plot(angleEstSym);
legend({"ch1","ch2","ch3","ch4"}); legend({"ch1","ch2","ch3","ch4"});
title("Angle Estimation"); title("Angle Estimation");
ylim([min(angleEstSym,[],'all')-10,max(angleEstSym,[],'all')+10]) ylim([min(angleEstSym,[],'all')-10,max(angleEstSym,[],'all')+10]);
grid on; grid minor;
end end