gaussian beam height plot
2 views (last 30 days)
Show older comments
hi there, is there any matlab code that return the value of a 3d plot? for example: mu = [1 2;-3 -5]; sigma = cat(3,[2 0;0 .5],[1 0;0 1]); p = ones(1,2)/2; obj = gmdistribution(mu,sigma,p);
ezsurf(@(x,y)pdf(obj,[x y]),[-10 10],[-10 10])
so i got this graph so simulate my gaussian beam for nanomachining, the problem is by using this m file, i cant specify the height of the beam. i think the only one way is to return the z value of the graph, and multiply by certain coefficient that reach the height that i want then regraph it. any help would be much appreciated.
thank you
Accepted Answer
Oleg Komarov
on 10 Apr 2011
Can you be more specific? What do you want to do with the graph?
Also, pdf map the domain into the [0 1] interval. You can't have more than 100% probability.
If you are just trying to set values for the z axis then:
set(gca,'zlim',[0,1])
or
inspect(gca)
2 Comments
Oleg Komarov
on 10 Apr 2011
To get the values of z call:
h = ezsurf(@(x,y)pdf(obj,[x y]),[-10 10],[-10 10])
get(h, 'zdata')
More Answers (1)
See Also
Categories
Find more on Time Series Objects in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!