Converting a 2d curve into a 3d curve
4 次查看(过去 30 天)
显示 更早的评论
I have plotted a 2d line, x vs y. x is a 1x202 double and so is y. I want to extent the y values into the 3rd diemension. So if I have a kink in my line, i want that extened into the third dimension.
For example:
x = linspace(-2,2,50)
y = x.^2;
[X,Y]= meshgrid(x,y)
Z = X.^2
surf(X,Y,Z)
xlabel('x')
ylabel('y')
zlabel('z')
This will extend 1d plot into a 3d plot.
But however for my plot, I have the x and y values only. I was wondering if there's a way to extend the pointint into the 3rd diemension such that it still retains it's 1d shape
回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Line Plots 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

