Plotting the parametrised intersection of two surfaces
7 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponses (1)
Pawel Jastrzebski
le 16 Jan 2018
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 commentaires
Voir également
Catégories
En savoir plus sur Surface and Mesh Plots dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!