필터 지우기
필터 지우기

gaussian beam height plot

조회 수: 2 (최근 30일)
Win Thomas Halim
Win Thomas Halim 2011년 4월 10일
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
  댓글 수: 1
Oleg Komarov
Oleg Komarov 2011년 4월 10일
Can you format the code?

댓글을 달려면 로그인하십시오.

채택된 답변

Oleg Komarov
Oleg Komarov 2011년 4월 10일
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
Win Thomas Halim
Win Thomas Halim 2011년 4월 10일
yes, i know i cant get more than 100% probability, thats why i need the values of z from my graph. from there i will be able to edit it at certain height.
here my task is to plot a 3d graph projecting a focused ion beam milling a material. the milling should be looks like gaussian distribution for each point. therefore i find the gmdistribution command come in handy to project the milling, but the problem is i cant modify the height. the result should be like:
http://img8.imageshack.us/i/fibn.jpg
i dont know how to format the code, therefore i just copy and paste it here:
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])
just need to know how to set the height.
thank you very much oleg.
Oleg Komarov
Oleg Komarov 2011년 4월 10일
To get the values of z call:
h = ezsurf(@(x,y)pdf(obj,[x y]),[-10 10],[-10 10])
get(h, 'zdata')

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Win Thomas Halim
Win Thomas Halim 2011년 4월 11일
thank you Mr. Komarov, thats very helpfull!

카테고리

Help CenterFile Exchange에서 Time Series Objects에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by