This repository has been archived on 2024-01-06. You can view files and clone it, but cannot push or open issues or pull requests.
justhomework/Matlab/comm/lab8_1.m

13 lines
241 B
Mathematica
Raw Normal View History

2023-03-30 07:18:49 +00:00
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