How can I change the view of a surface plot from a specified point to a specific direction?

조회 수: 22 (최근 30일)
Hello everyone,
I want to change the view of my surface plot {} from to a specific direction { & }
i.e,
At azimuth angle (ϕ)=?
= ; ,
elevation angle
Hence, i want to view the surface from to a direction ( & )
so, how can I perform it? please help...
I have used the surfl() function to plot my 3d surface {}
My Code is as follows:
x=-6:0.01:6;
y=x;
[xx yy]=meshgrid(x,y);
zz=xx.^2 + yy.^2;
surfl(xx,yy,zz);
colormap(gray) % change color map
shading interp % interpolate colors across lines and faces
xlabel('x-axis ->')
ylabel('y-axis ->')
zlabel('f(x,y) ->')
title('f(x,y)= x^2 + y^2')
  댓글 수: 4
VBBV
VBBV 2020년 10월 12일
편집: VBBV 2020년 10월 12일
Use campos function
i%f true
% code
%end
campos([4 4 0])
x y z are locations along x y z directions of the graph. See more info in the link below https://in.mathworks.com/help/matlab/ref/campos.html
KSSV
KSSV 2020년 10월 12일
You have two options.
  1. You can use view, campos by providing the viewing point input coordinates.
  2. You can do it manually, you have a rotation icon in the plot. You can click on it and adjuxt to your required view point.

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기

태그

제품


릴리스

R2013a

Community Treasure Hunt

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

Start Hunting!

Translated by