Integrating array of functions

5 visualizaciones (últimos 30 días)
w
w el 11 de En. de 2012
Editada: Walter Roberson el 4 de Mayo de 2015
Hi people,
I have an array of functions, something like func(x,y)=[func1(x,y) func2(x,y) ... funcN(x,y)]
Now I want to integrate func(x,y). I.e., I want to integrate each component of func(x,y). How can I do that?
All information I could find are about function of arrays, instead of array of functions.
Thanks in advance.
GQ

Respuesta aceptada

arun
arun el 12 de En. de 2012
Editada: Walter Roberson el 4 de Mayo de 2015
In this calculation i have assumed that you are doing double integration first w.r.t y then x. First define symbolic matrix. Then perform double integration.
>> syms x y
>> a=[x.^2+y x+y];
>> int(int(a,y, 0, sin(x)), 0, pi)
In this calculation y limit is from 0 to sin(x) and x limit is from 0 to pi.
  1 comentario
w
w el 13 de En. de 2012
Thanks a lot! This works!
I also found another solution.
>> funchandler={@(x,y)x^2+y, @(x,y)2x,@(x,y)x-y};
Then I can proceed to integrate using
>>dblquad(funchandler{1},xmin,xmax,ymin,ymax)
etc.

Iniciar sesión para comentar.

Más respuestas (1)

Walter Roberson
Walter Roberson el 11 de En. de 2012
There is no routine provided for this, unless perhaps the Symbolic Toolkit could handle it.
  1 comentario
w
w el 11 de En. de 2012
Thanks for saving my time...

Iniciar sesión para comentar.

Categorías

Más información sobre Symbolic Math Toolbox en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by