Overview
Comment:Reformated to octave standard
Now writes variables in non-matrix form
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: 5a55f4eaf35f8c68876b64483cb6bd6abb94ec3d8c0de5fb6e2250a5c6dd6eb6
User & Date: gawthrop@users.sourceforge.net on 2003-03-24 09:09:52
Other Links: branch diff | manifest | tags
Context
2003-03-24
10:19:42
Documentation added check-in: 11503b2330 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
09:09:52
Reformated to octave standard
Now writes variables in non-matrix form
check-in: 5a55f4eaf3 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
09:00:15
Now uses varname.m to generate variable names
-- thus name format is determined by varname.m only.
check-in: 4a5032af1d user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes

Modified mttroot/mtt/bin/trans/m/varname.m from [e7458ea714] to [57c15f2276].

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


function name = varname(name,index,causality);
% varname - Creates name of bond graph variable

% 
%     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
%     %%%%% Model Transformation Tools %%%%%
%     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 

% Matlab function  varname.m
% Acausal bond graph to causal bond graph: mfile format


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



% %% Revision 1.2  2000/12/27 16:06:15  peterg
% %% *** empty log message ***
% %%
% %% Revision 1.1  1996/08/27 08:08:44  peterg
% %% Initial revision
% %%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



%bond_name = [name,'_bond'];
%name =sprintf('%s%1.0f_%s', bond_name, index, cause2name(causality));

bond_name = [name,'('];
name =sprintf('%s(%1.0f,%1.0f)', name, abs(index), cause2num(causality));



|
|
|
|
|
|
<
>
|
|


|
|
|
|
|
>
>
>
|
|
|
|
|
|
<
>


|
|

|
|
>
>
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
function name = varname(name,index,causality);
  ## varname - Creates name of bond graph variable
  ## Usage: name = varname(name,index,causality);
 
##     ###################################### 
##     ##### Model Transformation Tools #####
##     ######################################

## 
## Matlab function  varname.m
## Copyright (C) 1994-2003 by Peter J. Gawthrop


# ###############################################################
# ## Version control history
# ###############################################################
# ## $Id$
# ## $Log$
# ## Revision 1.3  2003/03/13 14:22:34  gawthrop
# ## No negative bond numbers
# ##
# ## Revision 1.2  2000/12/27 16:06:15  peterg
# ## *** empty log message ***
# ##
# ## Revision 1.1  1996/08/27 08:08:44  peterg
# ## Initial revision
# ##

# ###############################################################


# # bond_name = [name,'_bond'];
# # name =sprintf('%s%1.0f_%s', bond_name, index, cause2name(causality));

# # bond_name = [name,'('];
# # name =sprintf('%s(%1.0f,%1.0f)', name, abs(index), cause2num(causality));

name =sprintf('%s_%i_%s', name, abs(index), cause2name(causality));


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