integration of a function of two variables in which the limits of integral on one are functions of the other
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Ranjan Sonalkar
le 1 Mar 2018
Commenté : Steven Lord
le 1 Mar 2018
I want to integrate the function f(x,theta)={1-exp[-alpha/sin(theta)]} over x and theta. x has definite limits, but the limits of the integral over theta, are functions of x. So, I don't think I can use intergral2. Any suggestions?
0 commentaires
Réponse acceptée
Steven Lord
le 1 Mar 2018
"q = integral2(fun,xmin,xmax,ymin,ymax) approximates the integral of the function z = fun(x,y) over the planar region xmin ≤ x ≤ xmax and ymin(x) ≤ y ≤ ymax(x)."
The limits on y can be functions of x. The "Evaluate Double Integral in Polar Coordinates" example on that page includes an example where the upper limit on r is a function of theta.
3 commentaires
Steven Lord
le 1 Mar 2018
You can't perform arithmetic on function handles. You can perform arithmetic on the values you receive from evaluating function handles.
fh = @sin;
x = fh(pi/4).^2 % works
y = fh.^2 % does not work
Evaluate your theta2 and theta1 functions for the values of theta that integral2 passed into your integrand function.
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Function Creation dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!