Undefined function or method 'int' for input arguments of type 'double'.
조회 수: 2 (최근 30일)
이전 댓글 표시
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?
댓글 수: 0
답변 (1개)
bym
2011년 12월 11일
Int is only defined for symbolic variables, for numeric values see
quadgk()
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!