2D quadrature for an array valued function
Ältere Kommentare anzeigen
I need to perform integration of an array valued function over a rectangular domain. I have found dblquad and quad2, which will perform 2d integration with a scalar function, and quadv, which will perform 1d integration of an array valued function, but I need to do both. I put together a couple for loops that will perform a crude rectangular integration but it is quite slow. I was hoping to optimize my code with the built-in functions. Is there any way to combine the above functions to achieve what I'm looking for?
.
edit: Another approach would be to redefine the array valued function as a set of scalar functions, integrate them separately using dblquad, then reassemble them into an array. I'm working with a 12 x 12 array, however, which would mean defining 144 separate functions. Is there an efficient way to do this without writing out each function?
3 Kommentare
Doug Hull
am 21 Jan. 2011
What does it mean to integrate over an array valued function over a rectangular domain? So at each x,y coordinate you would have an (n x m) result?
Sam G.
am 24 Jan. 2011
Doug Hull
am 24 Jan. 2011
What does it mean to integrate in this context? If this returned a scalar at each (x,y), I would integrate the scalar. How do I integrate an m x n array? Would you treat this as m*n different scalars to integrate separatly?
Best practice is to edit your question to reflect this new information. Then I will delete my comments for clarification, and you can too.
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Programming finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!