matlab 设定坐标比例

figure(1)
u=-0.1:0.005:0.1;
v=-0.1:0.005:0.1;
[x,y]=meshgrid(u,v);

z=sin(x-y)./abs(x)+abs(y);
surf(x,y,z);
hold on
% contourf(x,y,z)
% ezplot('x+y=3')
% set(gca,'DataAspectRatio',[1 1 60])
%axis equal
View Code

 

clc
clear

u=-3:0.1:3;
v=-3:0.1:3;
[x,y]=meshgrid(u,v);
z=2.*x.^2 +3.*y.^2;

surf(x,y,z);
hold on
t=0:0.1:3;
x1=t;y1=t;z1=30-5*t;
plot3(x1,y1,z1,'r');

plot3(0,0,30,'r*')
quiver3(2, 2, 20,8/8,12/8,-1/8,'g') % 后面向量的3个分量除8是为了缩短长度
grid on
set(gca,'DataAspectRatio',[1 1 5])
%axis equal
View Code

 p点坐标(2,2,20)

转载于:https://www.cnblogs.com/wdfrog/p/6760155.html

你可能感兴趣的:(matlab 设定坐标比例)