The sc value in the equation B should be function of x
sc(x) that depends on range x= 0:0.01:10

3 Kommentare

Garmit Pant
Garmit Pant am 28 Jun. 2022
Can you please elaborate as to what exactly is the problem that you are facing?
Anfal AlShehhi
Anfal AlShehhi am 28 Jun. 2022
I want to write the varibale sc in Equation B as a function of x
B(x) = rhoref/ rhot * x^2/ xref^2 * exp ( -2 * atm * xref)^10^-er/10 / T * sc(x)
x is the range from 0 to 10
Then define
sc = @(x) ... % whatever the definition is.
But since you have set the values of x previously you could just set
sc = ... % directly in terms of x

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Alan Stevens
Alan Stevens am 28 Jun. 2022
Bearbeitet: Alan Stevens am 28 Jun. 2022

0 Stimmen

  1. You need to define sc before using it in B.
  2. In B you have ...1000/dref*dref.... This just means the dref va;lues cancel each other out. Did you mean ...1000/(dref*dref)...?
PS Upload the actual code, niot an image. Use the > symbol above.

3 Kommentare

Anfal AlShehhi
Anfal AlShehhi am 28 Jun. 2022
Yes exactly. 1000/(dref*dref)
Anfal AlShehhi
Anfal AlShehhi am 28 Jun. 2022
Bearbeitet: Anfal AlShehhi am 28 Jun. 2022
clc; clear all;
% Defined values
atm=0.17 % km-1
xt=2.3; % target (x) in m
yt=2.3; % target (y) in m
p=50/100; % percent target
vis=23; %Visibility in km target
er=26; % LRF
dref=500; % LRF in m
pref=85/100; % LRF
vis2=23; % LRF Visbility
T=90/100; % LRF
% Range
x=0:0.01:10; % in km
A= exp(-2*atm.*x) % Attenuation func
sc =
B= ((pref/p)*((x.*x)*1000/dref*dref))*(((exp((-2*atm*dref/1000))*10^(-er/10)))/(T*sc)) % Sensi func
% plotting
figure
plot(A,x.*1000,'-b')
hold on
plot(B/1000,x.*1000,'-r')
grid on
xlabel("Range in km")
ylabel("Distance in km")
title("Range Preformance")
legend('Atmospheric Attenuation','Sensitivity')
hold off
Alan Stevens
Alan Stevens am 28 Jun. 2022
You need to define sc.
If you don't know what sc is, how is Matlab to know?

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu 2-D and 3-D Plots finden Sie in Hilfe-Center und File Exchange

Produkte

Version

R2022a

Gefragt:

am 28 Jun. 2022

Kommentiert:

am 28 Jun. 2022

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by