How plot a shifted Parabola?
2 ビュー (過去 30 日間)
古いコメントを表示
I know Parabola have formula z=x^2+y^2 now I want to plot it when it has simple shifted like image: http://i55.tinypic.com/33y50kx.gif I know how to plot3 or surf but I don't know how to plot3 this one.
0 件のコメント
回答 (2 件)
Paulo Silva
2011 年 3 月 4 日
plot3(X+10,Y+10,Z); %this shifts the parabola 10 units on both x and y axis
2 件のコメント
Paulo Silva
2011 年 3 月 5 日
x=-10:0.1:10;
y=x;
z=x.^2+y.^2;
ang=pi/4;
sm=[cos(ang) 0 sin(ang)
0 1 0
-sin(ang) 0 cos(ang)];
r=sm*[x;y;z];
x=r(1,:);y=r(2,:);z=r(3,:);
[x,y]=meshgrid(x,y);
plot3(x,y,z)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!