No BSD License  

Highlights from
Efficient Approximative Multiplication of Square Matrices

from Efficient Approximative Multiplication of Square Matrices by Henrik Pagenkopf
Public math open-source project in Java & MATLAB.

sqm_rand_init(dim, re_left, re_right, im_left, im_right) % returns a matrix of size dim with complex "random" entries.
%
% Copyright (C) May/June 2005 by Henrik Pagenkopf
%

function X = sqm_rand_init(dim, re_left, re_right, im_left, im_right) % returns a matrix of size dim with complex "random" entries.
%
% - cond: int dim >= 1.
%
  if dim >= 1

        E = eye(dim);

   for  j = 1 : dim % not i (imag:)

    for k = 1 : dim

        E(j, k)= re_left +(re_right - re_left)* rand + i*(im_left +(im_right - im_left)* rand);
    end;
   end; % for

   X = E;

  else X = []; % empty field
   
  end

% return.

Contact us at files@mathworks.com