Differences From Artifact [b13ea8436c]:

To Artifact [969955d3a1]:


1
2
3
4
5
6
7
8
9



10
11
12
13
14
15
16
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









>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
function write_matrix(matrix,name,extn);

% Writes the matrix function file

% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% Version control history
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% $Id$
% %% $Log$
% %% Revision 1.7  2002/05/15 16:37:30  gawthrop
% %% Added third argument (file extension)
% %%
% %% 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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43


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);

fprintf(filenum, 'data = [\n');







|







32
33
34
35
36
37
38
39
40
41
42
43
44
45
46


if nargin<3
  extn="m";
endif

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

% 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);

fprintf(filenum, 'data = [\n');

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