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

1 回表示 (過去 30 日間)
Abdulaziz
Abdulaziz 2011 年 12 月 11 日
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?

回答 (1 件)

bym
bym 2011 年 12 月 11 日
Int is only defined for symbolic variables, for numeric values see
quadgk()

カテゴリ

Help Center および File ExchangeMATLAB についてさらに検索

タグ

タグが未入力です。

Community Treasure Hunt

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

Start Hunting!

Translated by