home *** CD-ROM | disk | FTP | other *** search
- % function mat = sys2pss(sys)
- %
- % Unpacks a SYSTEM matrix into a packed matrix,
- % MAT = [A B; C D];
- %
- % See also: PCK, PSS2SYS, UNPCK, VPCK and VUNPCK.
-
- function [mat] = sys2pss(sys)
- if nargin ~= 1
- disp('usage: mat = sys2pss(sys)')
- return
- end
- [systype,sysr,sysc,sysn] = minfo(sys);
- if systype == 'syst'
- [nr nc] = size(sys);
- nr = nr-1;
- nc = nc-1;
- mat = sys(1:nr,1:nc);
- elseif systype == 'cons'
- mat = sys;
- elseif systype == 'vary'
- error(['can''t unpack a VARYING matrix']);
- return
- else
- mat = [];
- end
- %
- % Copyright MUSYN INC 1991, All Rights Reserved
-