Pvh2medvt=10^(Pvh2med/10);
Pvh2=10*log10(P)-L2;
Pvh2vt=10^(Pvh2/10);
disp(['L2med=', num2str(L2med),' дБ (медианные потери для заданного периода)']);
disp(['L2=', num2str(L2),' дБ (полные потери для заданного периода с учетом релеевских замираний)']);
disp(['Pvh2med=', num2str(Pvh2medvt),' Вт (медианная мощность сигнала на входе)']);
disp(['Pvh2=', num2str(Pvh2vt),' Вт (мощность сигнала на входе)']);
if kan==1|| tipcan==1
Pch2=4e-21*10^(Fe/10)*nk*3100
Pcht2=6975e-24*10^(Fe/10)*(Fk/dfk)^2/Pvh2vt;
h0t2=10*log10(1e-3/Pcht2);
h02=1e-3/Pcht2;
disp(['h02=', num2str(h02)]),'(отношение с/ш на входе детектора)';
disp(['h0t2=', num2str(h0t2),' дБ (отношение с/ш на выходе тлф канала)']);
elseif kan==2 && tipcan==2
Pch2=4e-21*10^(Fe/10)*V*1000;
h02=(10^(Pvh2/10))/Pch2;
disp(['h02=', num2str(h02),'(отношение с/ш на входе приемника и на входе детектора)']);
end
Zap2=Lpred-L2;
disp(['Zap2=', num2str(Zap2),' дБ (энергетический запас трассы)']);
error=0;
if error==0
if f <600 || f>6000
msgbox('Рабочая частота введена некорректно')
error= error+1
end
if P<0 || P >20000
msgbox('Мощность ПРД введена некорректно')
error= error+1
end
if Pfr>0 || Pfr <-10
msgbox('Потери в ПРД фидере введены некорректно')
error= error+1
end
if Gr <0 || Gr>70
msgbox('Усиление антенны введено некорректно')
error= error+1
end
if a<0 || a >10
msgbox('Ширина ДН антенны введена некорректно')
error= error+1
end
if h<0 || h >20
msgbox('Высота подъёма антенны введена некорректно')
error= error+1
end
if Ugr<0 || Ugr >5
msgbox('Угол горизонта введён некорректно')
error= error+1
end
if n<1 || n>2 && n<4 || n>4
msgbox('Краткость разнесения введена некорректно')
error= error+1
end
if Fe <0 || Fe > 20
msgbox('Коэффициент шума введен некорректно')
error= error+1
end
if Pfp>0 || Pfp <-10
msgbox('Потери в ПРМ введены некорректно')
error= error+1
end
if Gp <0 || Gp>70
msgbox('Усиление антенны введено некорректно')
error= error+1
end
if Ugp<0 || Ugp >5
msgbox('Угол горизонта введен некорректно')
error= error+1
end
end
if error==0;
if tipcan==2;
if Tm==1
LK_data_AM();
elseif Tm==2
LK_data_ChM();
elseif Tm==3
LK_data_FM();
elseif Tm==4
LK_data_OFT();
elseif Tm==5
LK_data_OFDM();
end
elseif tipcan==1;
LK_data_v02();
end
end
function edit19_Callback(hObject, eventdata, handles)
function edit19_CreateFcn(hObject, eventdata, handles)
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
function edit20_Callback(hObject, eventdata, handles)
function edit20_CreateFcn(hObject, eventdata, handles)
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
function listbox2_Callback(hObject, eventdata, handles)
function listbox2_CreateFcn(hObject, eventdata, handles)
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
function edit15_Callback(hObject, eventdata, handles)
function edit15_CreateFcn(hObject, eventdata, handles)
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
function edit16_Callback(hObject, eventdata, handles)
function edit16_CreateFcn(hObject, eventdata, handles)
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
function listbox3_Callback(hObject, eventdata, handles)
function listbox3_CreateFcn(hObject, eventdata, handles)
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
function radiobutton1_Callback(hObject, eventdata, handles)
function radiobutton2_Callback(hObject, eventdata, handles)
function edit23_Callback(hObject, eventdata, handles)
function edit23_CreateFcn(hObject, eventdata, handles)
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
function edit24_Callback(hObject, eventdata, handles)
function edit24_CreateFcn(hObject, eventdata, handles)
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
LbZam.m
function [ Lbz ] = Lbzam(Tpr,n)
if n==1
Lbz=abs(20*log10(0.8414*sqrt(-2*log(Tpr/100))));
elseif n==2
pp2.form='pp';
pp2.breaks=[50 70 80 90 95 98 99 99.5000 99.9000 99.9900];
pp2.coefs=[3.84210275826828e-05,0,0.0796329235178138,-3.70000622094116;-8.80037940540999e-05,0.00230526165496097,0.125738156617033,-1.79997952992342;0.000378860333770322,-0.000334852166662026,0.145442251500023,-0.400075592311095;0.00209556468655813,0.0110309578464476,0.252403308297879,1.39972203979325;0.00544230028577507,0.0424644281448196,0.519880238254215,3.19945811326360;1.31340755735463,0.0914451307167953,0.921608914839060,5.28822078904555;-0.630095933072249,4.03166780278070,5.04472184833655,7.61468239195604;-1.03894174768381,3.08652390317233,8.60381770131306,11.0661982751855;-6.81405113315541,1.83979380595174,10.5743447849627,14.9350769083666;];
pp2.pieces=9;
pp2.order=4;
pp2.dim=1;
Lbz=ppval(pp2,Tpr);
elseif n==4
pp4.form='pp';
pp4.breaks=[50 70 80 90 95 98 99 99.5000 99.9000 99.9900];
pp4.coefs=[3.66286868444963e-05,0,0.0453526263896390,-6.20001612140725;-0.000113102179577539,0.00219772121066978,0.0893070506030345,-4.99993409885850;0.000326883867208858,-0.00119534417665639,0.0993308209431684,-4.00019365133871;-0.000727365934956800,0.00861117183960936,0.173489097572698,-2.79953599236381;0.0168400327937770,-0.00229931718474264,0.205048370847032,-1.80773195037969;0.604392422407672,0.149260977959251,0.645933353170556,-0.758599807069293;-0.397553159541230,1.96243824518227,2.75763257631207,0.640986946468185;-0.762714404274230,1.36610850587042,4.42190595183842,2.46071865097713;-1.66981933607921,0.450851220741332,5.14868984248313,4.39924467077825;];
pp4.pieces=9;
pp4.order=4;
pp4.dim=1;
Lbz=ppval(pp4,Tpr);
end
end
Lzam.m
function [ Lz ] = Lzam(x, n, sigma)
if n==1
if sigma==3
a1=8.876e15;
b1=142.9;
c1=7.333;
a2=0;
b2=1;
c2=1;
a3=123.4;
b3=164.9;
c3=46.83;
elseif sigma==4
a1=7.495e15;
b1=141.8;
c1=7.16;
Читать дальше