[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Plotting Lines in 3D
From: |
fbarbuto |
Subject: |
Re: Plotting Lines in 3D |
Date: |
Thu, 6 Aug 2015 07:19:33 -0700 (PDT) |
Hi,
Not sure if that's what you want, but here is my approach on your problem
(you may need to rotate the plot to see it in 3-D).
PS: I used a small (20x6) subset of your long 100x6 array.
X = [
-0.24537 0.00000 3.02878 -0.24537 -0.74948 3.02878;
-0.21714 0.00000 3.02693 -0.21714 0.66326 3.02693;
-0.19216 0.00000 3.02529 -0.19216 -0.58695 3.02529;
-0.17005 0.00000 3.02385 -0.17005 0.51943 3.02385;
-0.15049 0.00000 3.02256 -0.15049 -0.45967 3.02256;
-0.13317 0.00000 3.02143 -0.13317 0.40679 3.02143;
-0.11785 0.00000 3.02042 -0.11785 -0.35999 3.02042;
-0.10430 0.00000 3.01954 -0.10430 0.31857 3.01954;
-0.09230 0.00000 3.01875 -0.09230 -0.28192 3.01875;
-0.08168 0.00000 3.01805 -0.08168 0.24949 3.01805;
-0.07228 0.00000 3.01744 -0.07228 -0.22079 3.01744;
-0.06397 0.00000 3.01689 -0.06397 0.19539 3.01689;
-0.05661 0.00000 3.01641 -0.05661 -0.17291 3.01641;
-0.05009 0.00000 3.01598 -0.05009 0.15302 3.01598;
-0.04433 0.00000 3.01561 -0.04433 -0.13541 3.01561;
-0.03923 0.00000 3.01527 -0.03923 0.11984 3.01527;
-0.03472 0.00000 3.01498 -0.03472 -0.10605 3.01498;
-0.03072 0.00000 3.01471 -0.03072 0.09385 3.01471;
-0.02719 0.00000 3.01448 -0.02719 -0.08305 3.01448;
-0.02406 0.00000 3.01428 -0.02406 0.07350 3.01428];
[N,M] = size(X);
for i=1:N
figure(1)
line([X(i,1) X(i,4)], [X(i,2) X(i,5)], [X(i,3)
X(i,6)],'linestyle','-','color','b')
hold on;
endfor
--
View this message in context:
http://octave.1599824.n4.nabble.com/Plotting-Lines-in-3D-tp4672026p4672033.html
Sent from the Octave - General mailing list archive at Nabble.com.