13 lines
No EOL
241 B
Matlab
13 lines
No EOL
241 B
Matlab
clc
|
|
clear
|
|
close all
|
|
SNR1=linspace(0.001,5,30);
|
|
for i=1:length(SNR1)
|
|
fprintf("round %d is runing...\n",i);
|
|
SNR=10*log10(SNR1(i));
|
|
sim('lab8_0.slx');
|
|
Ps(i)=E(1);
|
|
end
|
|
Ps1=1/2*exp(-SNR1);
|
|
plot(SNR1,Ps,'-o',SNR1,Ps1,'-*');
|
|
grid on |