How can I define a symbolic function over a specific region?
Afficher commentaires plus anciens
I need to define a two dimensional, let's say exponential, function over a certain ring, say from R=2 to R=3.
I tried to define assumptions on the variables X and Y such that 2<= X^2+Y^2 <= 3 , and then define the function
F=exp(-0.5*(X^2+Y^2));
when I ezplot, I find the function F defined over the whole domain not over the ring I defined. How can I insert such bounds for both 'the variables' and 'the function' ? In other words, How can I limit the output of the function to a certain slice of the domain?
Thanks,
Waleed
Réponses (1)
Wayne King
le 15 Jan 2013
F=exp(-0.5*(X^2+Y^2));
ezsurf(F,[-2,2,-2,2])
In the above -2 <= X <= 2 and -2 <= Y <= 2
1 commentaire
Waleed Khedr
le 15 Jan 2013
Catégories
En savoir plus sur Common Operations dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!