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

조회 수: 2 (최근 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 CenterFile Exchange에서 MATLAB에 대해 자세히 알아보기

태그

아직 태그를 입력하지 않았습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by