Filter löschen
Filter löschen

Undefined function or method 'int' for input arguments of type 'double'.

1 Ansicht (letzte 30 Tage)
Abdulaziz
Abdulaziz am 11 Dez. 2011
Hi Everybody, I need your help please. When I run my following script:
x=-3:.1:3;
Go=1000;
Bc=5;
Pin=3*exp(-x.^2);
Ein(i)=int(Pin,x,-inf,inf);
for i=1:length(x);
z=x(i);
Eo(i)=int(Pin,x,-inf,z);
E(i)=Eo (i)/Ein(i);
G(i)=Go/(Go-(Go-1)*exp(-E(i)*0.1));
Pin=3*exp(-x(i)^2);
Pout(i)=Pin*G(i);
Phi(i)=-0.5*Bc*log(G(i))*pi/180;
Aout(i)=sqrt(Pout(i))*exp(i*Phi(i));
end
Aoutf=fftshift(fft(Aout,100000));
f=(-100000/2:(100000/2-1)).*1/(0.01*100000);
Poutf(i)=abs (Aoutf).^2;
plot(f,abs(Poutf),'-r*')
I get this error
Undefined function or method 'int' for input arguments of type
'double'.
Do you know how can I solve that please?

Antworten (1)

bym
bym am 11 Dez. 2011
Int is only defined for symbolic variables, for numeric values see
quadgk()

Tags

Noch keine Tags eingegeben.

Community Treasure Hunt

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

Start Hunting!

Translated by