double integral matlab error

4 次查看(过去 30 天)
Firas
Firas 2015-9-17
编辑: Firas 2015-9-17
A small question :
This is my script ;
R=4
SL=2
CR = @(s,t)(1/pi).*exp(-0.5*(s.^2+t.^2))
smax=@(t)-R.*(t-SL)
smin=@(t)-R.*(t+SL)
tmax=inf
tmin=SL
qCR = integral2(CR,smin,smax,tmin,tmax)
PR = @(s,t)(1/pi).*exp(-0.5*(s.^2+t.^2))
smax=inf
smin=@(t)R.*(SL-t)
tmax=SL
tmin=-SL
qPR = integral2(PR,smin,smax,tmin,tmax)
but Matlab show me this error : Error using integral2 XMIN must be a floating point scalar. Error in qCR = integral2(CR,smin,smax,tmin,tmax)
Thank you :)

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Programming 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by