13 lines
241 B
Mathematica
13 lines
241 B
Mathematica
|
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
|