n*3矩阵用plot3画图后线很乱,如何处理
有一组n*3数据(每列为相应的x, y, z坐标) a.txt,clear all;clc
load a.txt
plot3(a(:,1),a(:,2),a(:,3),'k-')
画出很乱的折线图(如图),要怎样画一条光滑的曲线,谢谢??
数据如下:
a=[
2.338221983863957e-002 -5.256418590219274e-003 5.000000000000000e-002
4.662703814441325e-002 7.371445839179751e-002 5.000000864565155e-002
3.301435327171546e-002 2.745521807248888e-002 4.999999861837110e-002
4.086588147578588e-002 5.412362614337204e-002 5.000000866100911e-002
4.089677466773004e-002 5.196614500168657e-002 5.000000447124244e-002
4.350255931525666e-002 4.798440631540006e-002 5.000000382191955e-002
4.646288201131053e-002 4.891128473521992e-002 5.000000282769516e-002
6.086842454745917e-002 5.935932464985707e-002 5.000000767795931e-002
5.842169948045810e-002 6.483059987008050e-002 5.000000271977822e-002
5.627989752313258e-002 7.406832679599720e-002 5.000000528904272e-002
5.987434359571897e-002 7.710675508524252e-002 5.000000314591277e-002
6.619882002147375e-002 8.620828357548525e-002 5.000000493360141e-002
6.369567969565480e-002 9.180468488046806e-002 5.000000371696105e-002
6.205892122797832e-002 1.020650906895091e-001 5.000000465775030e-002
6.459395488806974e-002 1.077462752053967e-001 5.000000368097513e-002
6.433898934308704e-002 1.173919972408321e-001 5.000000413984021e-002
6.114056350154880e-002 1.252108914953766e-001 5.000000416375358e-002
6.183558112173672e-002 1.347439204897166e-001 5.000000432497839e-002
6.326606995534122e-002 1.437924954691107e-001 5.000000420509337e-002
6.247286936020523e-002 1.540139588544642e-001 5.000000415229455e-002
6.295490273309780e-002 1.632759785079671e-001 5.000000420209538e-002
6.368142849351088e-002 1.744882355712298e-001 5.000000422494365e-002
6.395088682641653e-002 1.840416831506874e-001 5.000000411363113e-002
6.487714440235795e-002 1.958420091054539e-001 5.000000431672367e-002
6.551738058062526e-002 2.053629928428032e-001 5.000000408332753e-002
6.644508263376169e-002 2.163868857819573e-001 5.000000433739920e-002
6.714469409449875e-002 2.248744801413686e-001 5.000000406741445e-002
6.802201502683486e-002 2.347360481495560e-001 5.000000429260068e-002
6.861395734376745e-002 2.423026833787667e-001 5.000000391448495e-002
6.935329279937656e-002 2.510991175665099e-001 5.000000439042276e-002
6.979891986669480e-002 2.578597583279395e-001 5.000000410710509e-002
7.033369863549893e-002 2.657204494736932e-001 5.000000416078314e-002
7.065488527897580e-002 2.717896366961513e-001 5.000000411134038e-002
7.099726004686439e-002 2.788120418143846e-001 5.000000425541953e-002
7.126913244588212e-002 2.842739390135971e-001 5.000000411352835e-002
7.170115849945105e-002 2.905687464862775e-001 5.000000424276790e-002
7.228209651301065e-002 2.954388830724494e-001 5.000000425765715e-002
7.325271695704605e-002 3.011769184996905e-001 5.000000411233726e-002
7.424141271223872e-002 3.053622093782033e-001 5.000000423777067e-002
7.563822699472621e-002 3.104431242270999e-001 5.000000417854583e-002
7.670295828639813e-002 3.139627522151042e-001 5.000000427691492e-002
7.808887558056836e-002 3.184388316866029e-001 5.000000419238628e-002
7.901640040622956e-002 3.213336121573095e-001 5.000000440619440e-002
8.027739051625146e-002 3.251621091637674e-001 5.000000461269826e-002
8.106611144922667e-002 3.274143112317574e-001 5.000000503313613e-002
8.229923013240580e-002 3.307846080188908e-001 5.000000615223756e-002
8.286894823401282e-002 3.322106885757585e-001 5.000000667854810e-002
8.403857701651195e-002 3.350943561000025e-001 5.000000749321945e-002
]
]
参考下这个方法:http://blog.csdn.net/yihandk666/article/details/7109817 chybeyond 发表于 2014-8-6 14:44
参考下这个方法:http://blog.csdn.net/yihandk666/article/details/7109817
谢谢指点
页:
[1]