Need help with 3-D plotting

y < (.01.*x.^(2).*exp(x.^(-2))./(8.*Z.*10.^10)).^(1./4);
I need to plot the inequality above in a 3-D mesh plot. Plot y and z along the x-axis and y-axis respectively, and x along the z direction. (this is really weird, I know :). For y variable choose a range between 10^−6 to 10^−2, while for z variable plot between 10^−8 and 1. I will need to do a loglog plot for sure.
I have been trying to use the meshgrid commands such as:
y = linspace(.000001,.01); z = linspace(.00000001,1); [z,y] = meshgrid(z,y); y = (10.^(-10).*x.^(2).*exp((x.^2).^(-1)/4).*y.^(-1)/2).^(1/4); mesh(x,y,z);
but I know this is wrong this is just what I've been playing around with. Any help or advice on the coding would be much appreciated.

2 Commenti

Sean de Wolski
Sean de Wolski il 28 Giu 2011
What is x in the above expression? You don't seem to be far off!
William Duhe
William Duhe il 28 Giu 2011
x is a variable I want to fluctuate with given ranges of y and z, I'm wondering if I need to set up an (x = .....) equation to make this work.

Accedi per commentare.

 Risposta accettata

Sean de Wolski
Sean de Wolski il 28 Giu 2011

1 voto

If you have the symbolic math toolbox, you may want to look at ezsurf

5 Commenti

Patrick Kalita
Patrick Kalita il 28 Giu 2011
FYI, there is an ezsurf function in base MATLAB (http://www.mathworks.com/help/techdoc/ref/ezsurf.html) that takes string or function handle inputs in addition to the ezsurf in the Symbolic Math Toolbox (http://www.mathworks.com/help/toolbox/symbolic/ezsurf.html) that accepts sym object inputs.
William Duhe
William Duhe il 28 Giu 2011
this is a huge help thanks guys!
ezmesh('(.01.*x.^(2).*exp(x.^(-2))./(8.*y.*10.^10)).^(1./4)')
this is the command line I think I need to use in order to generate the 3-D mesh plot I need. But one question is how do I change the domain to the parameters I listed above for the z and y values?
Sean de Wolski
Sean de Wolski il 28 Giu 2011
This isn't really my specialty but here are a few ideas:
-Write a more complicated function handle that blanks out the locations where y is less than that value.
-Look at the min/max optional inputs to ezmesh
-Wait for Patrick, whose specialty is this, to give a better answer ;)
William Duhe
William Duhe il 28 Giu 2011
All right, that works for me, hopefully Patrick can give me an example of the syntax to use in order to establish changes in the domain on the ezmesh command.
William Duhe
William Duhe il 28 Giu 2011
All right, that works for me, hopefully Patrick can give me an example of the syntax to use in order to establish changes in the domain on the ezmesh command.

Accedi per commentare.

Più risposte (0)

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by