a1=2271;
b1=102.4;
c1=0.9524;
a2=179.7;
b2=114.6;
c2=13.67;
a3=-86.2;
b3=108.2;
c3=10.75;
elseif sigma==5
a1=9.461e14;
b1=124.6;
c1=4.296;
a2=0.4379;
b2=91.79;
c2=3.112;
a3=1429;
b3=189.1;
c3=40.17;
elseif sigma==6
a1=6.402e15;
b1=133.6;
c1=5.704;
a2=0;
b2=100.5;
c2=2.282;
a3=122.7;
b3=160.2;
c3=39.06;
elseif sigma==7
a1=6.102e15;
b1=129.6;
c1=5.049;
a2=0;
b2=59.72;
c2=25.03;
a3=129.3;
b3=161.5;
c3=40.62;
end
end
Lz=a1*exp(-((x-b1)/c1)^2)+a2*exp(-((x-b2)/c2)^2)+a3*exp(-((x-b3)/c3)^2);
end
kramp.m
function [Kr] = kramp(x)
K=2/sqrt(2*pi)*int(sym('exp(-t^2/2)'),'t',0,x);
Kr=double(vpa(K,5));
end
poly_approx.m
clc
clear
x = [100 150 200 250 300 350 400];
y = [15 14.5 14 13.2 12.2 11 9.6];
p = polyfit(x, y, 6)
f = polyval(p, x);
f = polyval(p, x);
plot(x, y, 'ob', x, f, '-g')
cftool
LK_data_AM.m
function varargout = LK_data_AM(varargin)
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, …
'gui_Singleton', gui_Singleton, …
'gui_OpeningFcn', @LK_data_AM_OpeningFcn, …
'gui_OutputFcn', @LK_data_AM_OutputFcn, …
'gui_LayoutFcn', [] , …
'gui_Callback', []);
if nargin && ischar(varargin{1})
gui_State.gui_Callback = str2func(varargin{1});
end
if nargout
[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
gui_mainfcn(gui_State, varargin{:});
end
function LK_data_AM_OpeningFcn(hObject, eventdata, handles, varargin)
handles.output = hObject;
global Pvh1vt
global Lm1z
global Pvh1med
global L2
global h02
global Zap2
global h0t1
global Lz
global h01
global L1
global Zap1
global Rpred
global Lbz
global Lmz
global Pvh2medvt
global Tm
global m
global L0r
global L2med
global Pvh2vt
global h0t2
set(handles.edit1, 'String', L0r);
set(handles.edit2, 'String', Lbz);
set(handles.edit3, 'String', Lmz);
set(handles.edit4, 'String', Lz);
set(handles.edit5, 'String', Lm1z);
set(handles.edit6, 'String', L1);
set(handles.edit7, 'String', Pvh1med);
set(handles.edit8, 'String', Pvh1vt);
set(handles.edit9, 'String', h01);
set(handles.edit11, 'String', Zap1);
set(handles.edit12, 'String', Rpred);
set(handles.edit14, 'String', L0r);
set(handles.edit16, 'String', Lbz);
set(handles.edit17, 'String', Lmz);
set(handles.edit18, 'String', Lz);
set(handles.edit19, 'String', L2med);
set(handles.edit20, 'String', L2);
set(handles.edit21, 'String', Pvh2medvt);
set(handles.edit22, 'String', Pvh2vt);
set(handles.edit23, 'String', h02);
set(handles.edit25, 'String', Zap2);
if Tm~=5
disp('Аналоговая обработка сигнала');
if Tm==1
disp('Амплитудная манипуляция');
x=sqrt(h01/2);
Kr1=kramp(x);
Pk1=(1-Kr1)/2;
x=sqrt(h02/2);
Kr2=kramp(x);
Pk2=(1-Kr2)/2;
set(handles.edit13, 'String', Pk1);
set(handles.edit26, 'String', Pk2);
disp(['Poh1=', num2str(Pk1),' когерентный прием']);
disp(['Poh2=', num2str(Pk2),' когерентный прием']);
Pn1=exp(-h01/4)/2;
Pn2=exp(-h02/4)/2;
set(handles.edit15, 'String', Pn1);
set(handles.edit27, 'String', Pn2);
disp(['Poh1=', num2str(Pn1),' некогерентный прием']);
disp(['Poh2=', num2str(Pn2),' некогерентный прием']);
elseif Tm==2
disp('Частотная манипуляция');
x=sqrt(h01);
Kr1=kramp(x);
Pk1=(1-Kr1)/2;
x=sqrt(h02);
Kr2=kramp(x);
Pk2=(1-Kr2)/2;
disp(['Poh1=',