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 :)
.

 Réponse acceptée

William Rose
William Rose le 14 Nov 2021
Modifié(e) : William Rose le 14 Nov 2021

0 votes

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.

Plus de réponses (0)

Catégories

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by