Plotting the parametrised intersection of two surfaces
1 次查看(过去 30 天)
显示 更早的评论
Am trying to plot the line x=2, y=-t, z=4+t^2 from -2<t<1. I am attempting to use the plot3 command to plot a 3D paramtrised line, yet the issue arises in the t^2 term as t is a row matrix of t inputs between -2 and 1 and cannot simply be 'squared.'Is there a way I can plot this line? The line was originally defined as the intersection between z=x^2 +y^2 and x=2 if there is alternative method plotting the surfaces?
Thanks
0 个评论
回答(1 个)
Pawel Jastrzebski
2018-1-16
clear all;
clc;
t = linspace(-2,1,50);
x = zeros(size(t));
x(:) = 2;
y = -t;
z = 4+(t.^2);
plot3(x,y,z,'r')
grid on
xlabel('x');
ylabel('y');
zlabel('t');
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Surface and Mesh Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!