Azzera filtri
Azzera filtri

Add some data line to 3D plot

2 visualizzazioni (ultimi 30 giorni)
Alberto
Alberto il 17 Lug 2013
I have a series of data in this form:
0.298 4.698 2.942 5.017 2.405 51615.296 28.724
0.300 4.698 2.940 5.016 2.400 51731.544 28.789
0.266 4.700 2.938 5.018 2.400 51787.896 28.820
0.304 4.700 2.938 5.016 2.403 52032.432 28.956
0.283 4.700 2.936 5.017 2.414 51849.856 28.855
0.308 4.717 3.015 5.017 2.362 56216.260 31.285
0.308 4.717 3.014 5.018 2.351 56147.817 31.247
0.309 4.717 3.012 5.017 2.353 56170.732 31.259
0.306 4.717 3.011 5.017 2.367 56102.335 31.221
0.307 4.716 3.010 5.017 2.357 55960.284 31.142
0.307 4.716 3.009 5.017 2.361 55886.640 31.101
i want to make a 3d plot of only 3 column, precisely the 1st, 5th and 6th.
i make a script to read the values and store in variable, after that i use plot3 function to have this:
now for me this plot is not friendly readable, i want to put some line to the XY, YZ, XZ plane but i don't know how!
I want to obtain some like this: (i draw lines with paint...)
is that possible?
Thank in advance for all replies

Risposte (1)

David Sanchez
David Sanchez il 17 Lug 2013
use the line command:
M=rand(30,3); % sample data
plot3(M(:,1),M(:,2),M(:,3),'*')
grid on
xlabel('X')
ylabel('Y')
zlabel('Z')
hold on
x = [.4 .4];
y = [0 1];
z=[.4 .4];
line(x,y,z)
hold off
  1 Commento
Alberto
Alberto il 17 Lug 2013
With this command you impose only one line. I want to plot many lines, for each coordinates of plotted data

Accedi per commentare.

Categorie

Scopri di più su Line Plots in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by