home *** CD-ROM | disk | FTP | other *** search
- % function out = crand(dim1,dim2)
- %
- % Complex random matrix generator: generates a complex,
- % random matrix (distribution is 'normal' or 'uniform'
- % depending on the current MATLAB status) of dimension
- % DIM1 x DIM2. If only one dimension argument is given,
- % the output matrix is square.
- %
- % See also: RAND and SYSRAND.
-
- function [out] = crand(dim1,dim2)
- if nargin == 2
- out = rand(dim1,dim2) + sqrt(-1)*rand(dim1,dim2);
- elseif nargin == 1
- out = rand(dim1) + sqrt(-1)*rand(dim1);
- else
- disp('usage: out = crand(dim1,dim2)')
- end
- %
- % Copyright MUSYN INC 1991, All Rights Reserved
-