home *** CD-ROM | disk | FTP | other *** search
- % function out = sysrand(nstates,ninputs,noutputs)
- %
- % Create a random SYSTEM matrix, with a specified number of
- % states, inputs and outputs.
- %
- % See also: CRAND, MINFO, PCK, PSS2SYS, SYS2PSS, RAND, and RANDEL.
-
- function out = sysrand(n,nin,nout)
- if nargin < 3
- disp(['usage: out = sysrand(nstates,ninputs,noutputs)'])
- else
- if min([n nin nout]) <= 0
- error('dimensions should be positive')
- elseif ceil([n nin nout]) == floor([n nin nout])
- out = pck(rand(n,n),rand(n,nin),rand(nout,n),rand(nout,nin));
- else
- error('dimensions should be integers')
- end
- end
-
- %
- % Copyright MUSYN INC 1991, All Rights Reserved
-