필터 지우기
필터 지우기

How to store value of az and El in a variable ?

조회 수: 2 (최근 30일)
yogesh jain
yogesh jain 2015년 10월 15일
댓글: Star Strider 2015년 10월 16일
Hello all , as we know we use "rotate3d" function for rotating 3d objects , this shows Azimuth and Elevation angle , how to store those values into a variable so that we can access them after rotation also . the code is -
load mri.mat;
K = squeeze(D);
K = padarray(K,[10 10 10],'both');
% Create an isosurface
Ds = smooth3(K);
i_surface = isosurface(Ds,5);
% Display the surface
hiso = patch('Vertices', i_surface.vertices,...
'Faces', i_surface.faces,...
'FaceColor', [.2,.8,.9],...
'EdgeColor', 'none');
grid on;
view(90,90)
axis tight
daspect([1,1,.35])
h = rotate3d;
h.RotateStyle = 'box';
h.Enable = 'on';
lightangle(40,30);
set(gcf,'Renderer','zbuffer'); lighting phong
isonormals(Ds,hiso)
set(hiso, 'SpecularColorReflectance', 0, 'SpecularExponent', 50)

채택된 답변

Star Strider
Star Strider 2015년 10월 15일
You didn’t post your code, so taking a wild guess, use the view function.
From its documentation:
  • [az,el] = view returns the current azimuth and elevation.
  댓글 수: 2
yogesh jain
yogesh jain 2015년 10월 16일
Thank you , I have edited the question and had put the code . Expectation is that it should always update values of az and el after every rotation .
Star Strider
Star Strider 2015년 10월 16일
My pleasure.
You would have to specifically call it after each rotation to have it return the resulting values, since it is an Axis Property.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Scalar Volume Data에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by