Error in Quad, suggestions required ?
5 次查看(过去 30 天)
显示 更早的评论
syms E
numer = inline('0.99954.*E + ((0.58058-0.044967.*m).*R.*T');
deno = inline('E + (2.54 + 0.94057.*m).*R.*T');
f1 = quad('numer./deno',80,158);
I basically want to calculate the integral of f1 which is a function of E,
it gives me an error . . Not enough inputs to inline function.
When I substitute the the whole function into quad i.e. substituting the function r and fun_e directly, the code works fine but not this way ?
I want to basically define the function in symbolic way step by step and then use it with quad, to integrate,
Any suggestions would help, Thanks, Tonu
0 个评论
回答(1 个)
Matt Fig
2012-12-15
Don't mix inlines with symbolics this way.
syms E m R T
f1 = int((0.99954.*E + ((0.58058-0.044967.*m).*R.*T))./(E + (2.54 + 0.94057.*m).*R.*T),E,80,158);
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Number Theory 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!