Trouble using integral function
显示 更早的评论
I am facing errors in integrating the follow ng function.
xtemp=@(lambda)(((h*c)/(lambda*BoltzmnCst*Ts))^2)/(exp(((h*c)/(lambda*BoltzmnCst*Ts)))-1)
xtempintg= integral(xtemp,0,lambdabg)
Everything excep lambda is a constant and defined.
Following is the error I am getting:
Error using /
Matrix dimensions must agree.
Error in My_Code>@(lambda)(((h*c)/(lambda*BoltzmnCst*Ts))^2)/(exp(((h*c)/(lambda*BoltzmnCst*Ts)))-1)
Error in integralCalc/iterateScalarValued (line 314)
fx = FUN(t);
Error in integralCalc/vadapt (line 132)
[q,errbnd] = iterateScalarValued(u,tinterval,pathlen);
Error in integralCalc (line 75)
[q,errbnd] = vadapt(@AtoBInvTransform,interval);
Error in integral (line 88)
Q = integralCalc(fun,a,b,opstruct);
Error in My_Code (line 46)
xtempintg= integral(xtemp,0,lambdabg)
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 MATLAB 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!