source: proiecte/pmake3d/make3d_original/Make3dSingleImageStanford_version0.1/third_party/qtfm/@quaternion/disp.m @ 37

Last change on this file since 37 was 37, checked in by (none), 14 years ago

Added original make3d

File size: 777 bytes
Line 
1function disp(q)
2% DISP Display array.
3% (Quaternion overloading of standard Matlab function.)
4
5% Copyright © 2005 Stephen J. Sangwine and Nicolas Le Bihan.
6% See the file : Copyright.m for further details.
7
8error(nargchk(1, 1, nargin)), error(nargoutchk(0, 0, nargout))
9
10% The argument is not checked, since this function is called by Matlab only if
11% the argument is a quaternion.  There are three cases to be handled: empty, a
12% pure quaternion, a full quaternion.  In the latter two cases, the fields may
13% be arrays.
14
15[r,c] = size(q);
16if isempty(q)
17   disp('   []')
18elseif r == 1 & c == 1
19   disp(['   ' char(q)])
20elseif ispure(q)
21   disp(['   ' num2str(r) 'x' num2str(c) ' pure quaternion array'])
22else
23   disp(['   ' num2str(r) 'x' num2str(c) ' quaternion array'])
24end
Note: See TracBrowser for help on using the repository browser.