define a function in terms of an integral with variable limits

1 次查看(过去 30 天)
I have defined a function of two variables, say f(u,t), and would like to define a function g(t)=@(t)integral(f(u,t),u,[t-1,t]). How would I do this?

采纳的回答

Torsten
Torsten 2023-1-31
编辑:Torsten 2023-1-31
f1=@(t)3+2*cos(2*pi*t);
f2=@(t)4-3*sin(2*pi*t);
ff=@(t)-f1(t)-f2(t);
gg=@(u,t)integral(ff,u,t);
ww = @(u,t)f1(t).*exp(gg(u,t));
www=@(t)integral(@(u)ww(u,t),t-1,t,'ArrayValued',1);
www(2)
ans = 0.5163

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 External Language Interfaces 的更多信息

产品


版本

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by