Converting a 2d curve into a 3d curve
4 views (last 30 days)
Show older comments
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
Answers (1)
See Also
Categories
Find more on Line Plots in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
