problem with function handle
1 次查看(过去 30 天)
显示 更早的评论
alpha
alpha =
function_handle with value:
@(z)(z-b)/a
>> qa
qa =
function_handle with value:
@(z)sqrt((1./alpha.^2)-p.^2)
>> t = integral(qa,0,3)
Undefined operator '.^' for input arguments of type 'function_handle'.
Error in @(z)sqrt((1./alpha.^2)-p.^2)
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);
0 个评论
采纳的回答
madhan ravi
2019-1-7
编辑:madhan ravi
2019-1-7
EDITED
syms z
a=1; % an example datas
b=2;
p=3;
alpha=(z-b)/a;
qa=sqrt((1./(alpha.^2)-p.^2));
t = integral(matlabFunction(qa),0,3)
5 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Assumptions 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!