i get an error in plot
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
% this program is used to compute power per channel versus FWM power
% and to compute channe spaing versus FWM channel
% X = third order susceptibility
% lemda = wavelength in vacuum
% c = speed og light in vacuum
% Aeff= effecive area of the optical fiber
% n= nonlinear reflective inex
% alfa = fiber loss
% D= degeneracy factor
% eff = FWM efficiency
% Leff = effctive length
x=6*10^-15;
lemda=0.5*10^-6;
c=3*10^8;
Aeff=6.4*10^-11;
n=1.48;
alfa=.0461;
eff=.05;
Leff=22*10^3;
D=3;
k=(32*(pi)^3*x)./(n^2.*lemda*c)*(Leff/Aeff)
P=eff*(D.*k).^2*(1*10^-3)^3*exp(-alfa*75)
Pdb= 10*log10(P/10^-3)
plot(x,y)
hold on
y1 = [-59.5 -61.2 -65.5 -68 -72.5 -80];
plot(x,y1,'r')
1 Commento
Geoff Hayes
il 21 Ago 2016
nor - presumably the error message is
Undefined function or variable 'y'.
Error in *** (line 26)
plot(x,y)
The local variable y needs to be defined before you try to use it. What should it be? Why is x a scalar? Why do you have many local variables but do not use them in any of the variables that you plot? Please clarify and add comments to your code where necessary.
Risposte (0)
Vedere anche
Categorie
Scopri di più su Define Shallow Neural Network Architectures in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!