遗忘海岸

江湖程序员 -Feiph(LM战士)

导航

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)

posted on 2017-04-25 08:53  遗忘海岸  阅读(769)  评论(0编辑  收藏  举报