[Index for tmp_for_tar/misc] [Return to Master Index]

bdiag0

(tmp_for_tar/misc/bdiag0.m)


Function Synopsis

x = bdiag0 (sz,...)

Help text

 x = bdiag0 (sz,m1,...)

 Same as bdiag(), but with an argument sz which contains the total size of
 the result, x.

 Last modified: April 2001



Listing of function file tmp_for_tar/misc/bdiag0.m

## x = bdiag0 (sz,m1,...)
##
## Same as bdiag(), but with an argument sz which contains the total size of
## the result, x.
##

## Author:        Etienne Grossmann  <etienne@isr.ist.utl.pt>
## Last modified: April 2001

function x = bdiag0 (sz,...)

x = zeros (sz);
sz = [0,0];
nargin--;

while nargin--,
  tmp = va_arg ();
  x(sz(1)+[1:rows(tmp)],sz(2)+[1:columns(tmp)]) = tmp;
  sz += size (tmp);
end

Produced by oct2html on Sat Apr 28 21:14:54 2001
Cross-Directory links are: ON