How can I define a symbolic function over a specific region?
8 views (last 30 days)
Show older comments
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
0 Comments
Answers (1)
Wayne King
on 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
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!