Effacer les filtres
Effacer les filtres

2-D integral of function with >2 params (but only 2 variables)

2 vues (au cours des 30 derniers jours)
Sam Butler
Sam Butler le 30 Août 2013
Is there a slick method for me to do a 2-D integral (ie, using quad2d) for a function with more than 2 varaibles, but specifying actual values for the other variables in the function?
To be more specific, say I have a function:
f(x, y, z, t)
I want to integrate f in 2-D over x and y using an Adaptive Simpson's Method (ie, quad2d), for certain fixed values of z and t.
How would I go about performing this operation in MatLab?

Réponse acceptée

Walter Roberson
Walter Roberson le 30 Août 2013
fixedZ = 9.2;
fixedT = 118;
integral( @(x, y) f(x, y, fixedZ, fixedT), ....)
  1 commentaire
Sam Butler
Sam Butler le 30 Août 2013
Excellent; didn't realize you could use variable names in those definitions, very glad to see you can! Works like a charm!

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Curve Fitting Toolbox dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by