Borrar filtros
Borrar filtros

define a function in terms of an integral with variable limits

1 visualización (últimos 30 días)
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?

Respuesta aceptada

Torsten
Torsten el 31 de En. de 2023
Editada: Torsten el 31 de En. de 2023
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

Más respuestas (0)

Categorías

Más información sobre External Language Interfaces en Help Center y File Exchange.

Productos


Versión

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by