Error calling 'int'. This call-site passes more inputs to this function than it can accept.

20 次查看(过去 30 天)
I'm trying to make a user defined function for integration. It gives an error Error calling 'int'. This call-site passes more inputs to this function than it can accept.
My code is:
function y = fcn(u,a,b)
%#codegen
y=int(u,a,b)
end
where a = t-0.1 ;
b=t
t is input from clock
Please help how to resolve this.
  4 个评论
Kiran Mahmood
Kiran Mahmood 2018-10-29
Yes it is not a symbolic integration. What I'm trying to do is..I want to integrate a function over time from t-h to t. where t is simulation running time and h=0.1

请先登录,再进行评论。

回答(1 个)

madhan ravi
madhan ravi 2018-10-28
编辑:madhan ravi 2018-10-28
what happens when you do this :
y = integral ( @(t) u,a,b )
  3 个评论

请先登录,再进行评论。

类别

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

产品


版本

R2016a

Community Treasure Hunt

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

Start Hunting!

Translated by