% function [rdleft,rdrighti] = mkd(d,blk,nblk,blkp)
%   this routine expands each element of d into a row vector
%   with identical elements
%
%  dleft   = [ d(1)*ones(1,blk(1,2)) ... d(nblk)*ones(1,blk(nblk,2)) ]
%  drighti = [ (1/d(1))*ones(1,blk(1,2)) ... (1/d(nblk))*ones(1,blk(nblk,2)) ]

function [rdleft,rdrighti] = mkd(d,blk,nblk,blkp)
  rdleft = zeros(1,blkp(nblk+1,2)-1);       % row
  rdrighti = zeros(1,blkp(nblk+1,1)-1);     % row
  for i=1:nblk
    rdleft(1,blkp(i,2):blkp(i+1,2)-1) = d(i)*ones(1,blk(i,2));
    rdrighti(1,blkp(i,1):blkp(i+1,1)-1) = (1.0/d(i))*ones(1,blk(i,1));
  end
%
% Copyright MUSYN INC 1991,  All Rights Reserved
