필터 지우기
필터 지우기

Add some data line to 3D plot

조회 수: 2 (최근 30일)
Alberto
Alberto 2013년 7월 17일
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

답변 (1개)

David Sanchez
David Sanchez 2013년 7월 17일
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
Alberto
Alberto 2013년 7월 17일
With this command you impose only one line. I want to plot many lines, for each coordinates of plotted data

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Line Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by