Overview
Comment:Added third argument (file extension)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: 4d7fdc45fbf06533357eda50b2e12030679a3c3a01b86faf5cd8515a3e7d28e0
User & Date: gawthrop@users.sourceforge.net on 2002-05-15 16:37:30
Other Links: branch diff | manifest | tags
Context
2002-05-17
09:14:58
Optimises each line in a separate session. Allows larger models to be built. check-in: 029829cd3c user: geraint@users.sourceforge.net tags: origin/master, trunk
2002-05-15
16:37:30
Added third argument (file extension) check-in: 4d7fdc45fb user: gawthrop@users.sourceforge.net tags: origin/master, trunk
16:34:11
Added Q to arg list of ppp_optimise (par ident) check-in: 7eaa6496b9 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes

Modified mttroot/mtt/bin/trans/m/write_matrix.m from [ed4ac445d1] to [b13ea8436c].

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
29
30
31
32
33
34
35
function write_matrix(matrix,name);

% Writes the matrix function file

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



% %% Revision 1.5  1998/02/03 08:40:39  peterg
% %% Fixed a horrible bug -- changed filename -> filenum
% %%
% %% Revision 1.4  1996/08/15  11:56:11  peter
% %% Does complex matrices.
% %%
% %% Revision 1.3  1996/08/14 19:20:41  peter
% %% Fixed output naming bug.
% %%
% %% Revision 1.2  1996/08/14 08:36:52  peter
% %% Puts a tab between columns.
% %%
% %% Revision 1.1  1996/08/14 08:21:27  peter
% %% Initial revision
% %%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%






filename = [name, '.m'];
filenum = fopen(filename,'w');

% Write the function m-file for the causal bond graph
pc = '%';
fprintf(filenum, 'function data = %s\n', name);
fprintf(filenum, '%s data = %s\n\n', pc, name);

|








>
>
>


















>
>
>
>
|







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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
function write_matrix(matrix,name,extn);

% Writes the matrix function file

% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% Version control history
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% $Id$
% %% $Log$
% %% Revision 1.6  2000/12/27 16:06:17  peterg
% %% *** empty log message ***
% %%
% %% Revision 1.5  1998/02/03 08:40:39  peterg
% %% Fixed a horrible bug -- changed filename -> filenum
% %%
% %% Revision 1.4  1996/08/15  11:56:11  peter
% %% Does complex matrices.
% %%
% %% Revision 1.3  1996/08/14 19:20:41  peter
% %% Fixed output naming bug.
% %%
% %% Revision 1.2  1996/08/14 08:36:52  peter
% %% Puts a tab between columns.
% %%
% %% Revision 1.1  1996/08/14 08:21:27  peter
% %% Initial revision
% %%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


if nargin<3
  extn="m";
endif

filename = sprintf("%s.%s", name, extn);
filenum = fopen(filename,'w');

% Write the function m-file for the causal bond graph
pc = '%';
fprintf(filenum, 'function data = %s\n', name);
fprintf(filenum, '%s data = %s\n\n', pc, name);


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