Overview
Comment:Changed 'exp' to 'expm' whoops!
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: aa391be6695976fe3ac8309d39ecadefe8a642468f6542d6d468870f203034b4
User & Date: gawthrop@users.sourceforge.net on 1996-08-11 19:47:37
Other Links: branch diff | manifest | tags
Context
1996-08-11
19:48:29
Parameter passing added. check-in: 1f88275ca2 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
19:47:37
Changed 'exp' to 'expm' whoops! check-in: aa391be669 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
19:33:24
Replaced exp by expm - whoops! check-in: 3cfd3e5d96 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes

Modified mttroot/mtt/bin/trans/m/dm2ir.m from [1ba228b450] to [205a34d87e].

1
2
3
4
5
6
7
8
9
10
11
12



13
14
15
16
17
18
19
function ir = dm2ir(A,B,C,D,E,T);
% ir = dm2ir(A,B,C,D,E,T);
% Descriptor matrix to impulse response.
% NB At the moment - this assumes that E is unity .....
% A,B,C,D,E - descriptor matrices
% T vector of time points

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



% %% Revision 1.2  1996/08/10 11:49:39  peter
% %% Fixed multi-input/output problem
% %%
% %% Revision 1.1  1996/08/10 10:26:00  peter
% %% Initial revision
% %%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%












>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
function ir = dm2ir(A,B,C,D,E,T);
% ir = dm2ir(A,B,C,D,E,T);
% Descriptor matrix to impulse response.
% NB At the moment - this assumes that E is unity .....
% A,B,C,D,E - descriptor matrices
% T vector of time points

% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% Version control history
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% $Id$
% %% $Log$
% %% Revision 1.3  1996/08/10 14:16:04  peter
% %% Now has T vector input - it was tmax & tstep
% %%
% %% Revision 1.2  1996/08/10 11:49:39  peter
% %% Fixed multi-input/output problem
% %%
% %% Revision 1.1  1996/08/10 10:26:00  peter
% %% Initial revision
% %%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
28
29
30
31
32
33
34
35
36
37
[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;








|


31
32
33
34
35
36
37
38
39
40
[Ny,Nu] = size(D);
NN=Ny*Nu;

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


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