Rev | Line | |
---|
[37] | 1 | % drawcloud ... draw point cloud |
---|
| 2 | % |
---|
| 3 | % [fig] = drawcloud(X,fig,{color}) |
---|
| 4 | % |
---|
| 5 | % X ... 3xn matrix containing the points |
---|
| 6 | % if X is 4xn only the first 3 rows are used |
---|
| 7 | % fig . figure handle |
---|
| 8 | % color color of plotting; defaults to blue |
---|
| 9 | % |
---|
| 10 | % fig . return the figure handle |
---|
| 11 | % |
---|
| 12 | % $Id: drawcloud.m,v 2.0 2003/06/19 12:07:12 svoboda Exp $ |
---|
| 13 | |
---|
| 14 | function [fig] = drawcloud(X,fig,color) |
---|
| 15 | if nargin < 3 |
---|
| 16 | color = 'b'; % default color |
---|
| 17 | end |
---|
| 18 | |
---|
| 19 | figure(fig), hold on |
---|
| 20 | plot3(X(1,:),X(2,:),X(3,:),[color,'o']) |
---|
| 21 | |
---|
| 22 | |
---|
| 23 | view([1,1,1]); |
---|
| 24 | axis('equal'); |
---|
| 25 | grid on |
---|
| 26 | rotate3d on |
---|
| 27 | fig=fig; |
---|
| 28 | return |
---|
Note: See
TracBrowser
for help on using the repository browser.