Overview
Comment:Fixed multi-input/output problem
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: b3b042b6651058f96115f5bf4e8f4c94e864dcd63924a465018c691fe05d5be5
User & Date: gawthrop@users.sourceforge.net on 1996-08-10 11:49:39
Other Links: branch diff | manifest | tags
Context
1996-08-10
12:54:56
Reorganised data file for gnuplot input. check-in: 918f93dd9b user: gawthrop@users.sourceforge.net tags: origin/master, trunk
11:49:39
Fixed multi-input/output problem check-in: b3b042b665 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
10:26:00
Initial revision check-in: 67560661e3 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes

Modified mttroot/mtt/bin/trans/m/dm2ir.m from [35a8da1aa8] to [129a6aed88].

1
2
3
4
5
6
7
8
9
10



11
12
13
14








15


function [t,ir] = dm2ir(A,B,C,D,E,tmax,tstep);

% Descriptor matrix to impulse response.
% NB At the moment - this assumes that E is unity .....

% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% Version control history
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% $Id$
% %% $Log$



% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


t=[0:tstep:tmax]';








ir = C*exp(A*t)*B;


|









>
>
>



|
>
>
>
>
>
>
>
>
|
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
function [T,ir] = dm2ir(A,B,C,D,E,tmax,tstep);

% Descriptor matrix to impulse response.
% NB At the moment - this assumes that E is unity .....

% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% Version control history
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% $Id$
% %% $Log$
% %% Revision 1.1  1996/08/10 10:26:00  peter
% %% Initial revision
% %%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


T=[0:tstep:tmax]';
N = length(T);
[Ny,Nu] = size(D);
NN=Ny*Nu;

ir = zeros(N,NN);
i = 0;
for t = T'
  i=i+1;
  ir(i,:) = reshape(C*exp(A*t)*B, 1,NN);
end;


MTT: Model Transformation Tools
GitHub | SourceHut | Sourceforge | Fossil RSS ]