3D from multiple 2D curves

8 次查看(过去 30 天)
Hello everyone, I have a question:
I have imported different curves with the help of txt files (see picture). Now I want to put these curves together in one figure, but always rotated by 5° around the Z-axis. At the end it should be a 3D surface.
I hope someone can help me, i`ve not been working with matlab for long :)
.

采纳的回答

William Rose
William Rose 2021-11-14
编辑:William Rose 2021-11-14
Suppose you have M different curves y1(x), y2(x),...,yM(x), and they each have N points. Let's assume you also have the vector x which is 1 by N.
Define y=1:M.
Put the curves into a 2D matrix z(i,j) which is N by M.
Plot it with surf(x,y,z).
Once you have plotted it, you will notice a little cube-inside-a-circle icon at top right. Click it to enable plot rotation by clicking and dragging. When you click and drag, it shows you the perspective angle, so you can adjust it to 5 degrees if you like.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Surface and Mesh Plots 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by