Quaternion Function Reference

blkdiag

Construct block diagonal matrix from input arguments.
(Quaternion overloading of standard MATLAB® function)

Syntax

R = blkdiag(varargin)

Description

Given a number of quaternion matrices, blkdiag builds a block diagonal matrix with the given matrices on the diagonal. It works exactly as the overloaded MATLAB® function. The matrices supplied are not required to have the same size.

Examples

>> blkdiag(randq(2), randq(3))
 
ans =
 
     5x5 quaternion array
 
>> s(ans)

ans =

    0.0058    0.7714         0         0         0
   -0.1470   -0.4792         0         0         0
         0         0   -0.5044    0.5444   -0.5741
         0         0    0.3300    0.8763    0.0667
         0         0   -0.0868    0.9223    0.6933

See Also

MATLAB® function: blkdiag
QTFM functions: diag, horzcat, vertcat

© 2008-2013 Stephen J. Sangwine and Nicolas Le Bihan

License terms.