Plotting log functions in App designer
显示 更早的评论
Hi there,
I am trying to create a radar app from scratch using functions that are tested okay in Matlab, when i run the codes in appdesigner, the graph does not show. Kindly help. Thanks.
Codes are :
tsc = app.TscansEditField.Value;
Tsc = 10*log10(tsc); % convert Tsc into log equiv
sigma_a = app.AircraftRCSdBsmEditField.Value;
sigma_m = app.MissileRCSdBsmEditField.Value;
% four_pi = 10*log10(4.0 * pi); % (4pi) in dB
k_db = 10*log10(1.38e-23); % Boltzman's constant in dB equiv.
te = app.EffectiveTemperatureKEditField.Value;
Te = 10*log10(te); % noise temp. in dB
% range_a = app.RangeaKmEditField.Value;
% range_adb = 10*log10(range_a* 1000.); % target range^4 in dB
% range_m = app.RangemKmEditField.Value;
% range_mdb = 10*log10(range_m* 1000.); % target range^4 in dB
az_anglea = app.AzimuthangledegEditField.Value;
el_anglea = app.ElevationangledegEditField.Value;
rloss = app.RadarLossdBEditField.Value;
snr = app.SNRdBEditField.Value;
nf = app.NoiseFiguredBEditField.Value;
factor = 10*log10(4*pi);
% Compute Omega in steradians
omega = (az_anglea / 57.296) * (el_anglea /57.296);
omega_db = 10.0*log10(omega); % Convert Omega to dBs
% Plot Power aperture product for missile and aircraft
rangevar = linspace (2,90,1);
rangedb = 10*log10(rangevar);
papm = snr - sigma_m - Tsc + factor + 4.0 .* rangedb + k_db + Te + nf + rloss + omega_db;
papa = snr - sigma_a - Tsc + factor + 4.0 .* rangedb + k_db + Te + nf + rloss + omega_db;
plot(app.UIAxes4,rangevar,papm,"g")
hold (app.UIAxes4, 'on' )
plot(app.UIAxes4,rangevar,papa, "r")
hold (app.UIAxes4, 'off' )
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Polar Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
