Comment: | Uses new version of equation.m - passes component type to cr. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | origin/master | trunk |
Files: | files | file ages | folders |
SHA3-256: |
2d8fdcf653fecdad7775d353f2fae015 |
User & Date: | gawthrop@users.sourceforge.net on 2003-01-07 10:10:14 |
Other Links: | branch diff | manifest | tags |
2003-01-07
| ||
10:11:45 |
Octavised. Added new first argument to write component type to cr in ese file. check-in: db05b576fa user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
10:10:14 | Uses new version of equation.m - passes component type to cr. check-in: 2d8fdcf653 user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
09:11:53 | Octavised check-in: 2a91d53c00 user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
Modified mttroot/mtt/lib/comp/simple/AE_eqn.m from [2991c6f3bd] to [a764490bd3].
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | + + + | function structure = AE_eqn(name,bond_number,bonds,direction,cr,args, ... structure,eqnfile); % AE_eqn. Equation generation for effort amplifier. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% Version control history % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% $Id$ % %% $Log$ % %% Revision 1.4 1996/09/10 10:10:41 peter % %% Now uses eqaution.m to format the equation. % %% % %% Revision 1.3 1996/08/30 19:03:10 peter % %% Added argument check. % %% Added extra name argument. % %% % %% Revision 1.2 1996/08/30 13:23:11 peter % %% Added bond number check % %% |
︙ | |||
52 53 54 55 56 57 58 | 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 | - + | outbond = bond_number(1); inbond = bond_number(2); outport = 1; inport = 2; end |
Modified mttroot/mtt/lib/comp/simple/AF_eqn.m from [1fcd8b0274] to [beebc3dcaf].
︙ | |||
11 12 13 14 15 16 17 18 19 20 21 22 23 24 | 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | + + + | % structure,eqnfile); % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% Version control history % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% $Id$ % %% $Log$ % %% Revision 1.3 1996/09/12 19:29:35 peter % %% Use new equation method. % %% % %% Revision 1.2 1996/09/11 13:35:14 peter % %% New equation.m method used. % %% % %% Revision 1.1 1996/08/30 18:38:57 peter % %% Initial revision % %% % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
︙ | |||
57 58 59 60 61 62 63 | 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 | - + | outbond = bond_number(1); inbond = bond_number(2); outport = 1; inport = 2; end |
Modified mttroot/mtt/lib/comp/simple/C_eqn.m from [2daad60fd9] to [2af3de08f1].
︙ | |||
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | 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 | + + + - + | % structure,eqnfile); % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% Version control history % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% $Id$ % %% $Log$ % %% Revision 1.2 1997/04/09 13:00:28 peterg % %% *** empty log message *** % %% % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Copyright (c) P.J. Gawthrop, 1996. if nargin<8 eqnfile = 'stdout'; end; % Unicausal version CorI = 1; |
︙ |
Modified mttroot/mtt/lib/comp/simple/EMTF_eqn.m from [f2e12d75c2] to [7cc82fd47a].
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | + + + | function structure = EMTF_eqn(name,bond_number,bonds,direction,cr,args, ... structure,eqnfile); % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% Version control history % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% $Id$ % %% $Log$ % %% Revision 1.2 2000/12/28 11:45:48 peterg % %% *** empty log message *** % %% % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% if nargin<8 eqnfile = 'stdout'; end; |
︙ | |||
39 40 41 42 43 44 45 | 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 | - + - + | else outbond = bond_number(1); inbond = bond_number([2 3]); outport = 1; inport = [2;3]; end; |
Modified mttroot/mtt/lib/comp/simple/FMR_eqn.m from [5ad1df79af] to [da8322ed66].
︙ | |||
11 12 13 14 15 16 17 18 19 20 21 22 23 24 | 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | + + + | % structure,eqnfile); % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% Version control history % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% $Id$ % %% $Log$ % %% Revision 1.3 1996/09/12 19:30:31 peter % %% Updated to use new eqaution.m % %% % %% Revision 1.2 1996/08/30 18:35:43 peter % %% New name argument added. % %% % %% Revision 1.1 1996/08/30 16:38:25 peter % %% Initial revision % %% % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
︙ | |||
70 71 72 73 74 75 76 | 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 | - + - + | outnumber = bond_number(1); if f_1 == 1 % Flow out outcause = -1; else % Effort out outcause = 1; end; incause = [-outcause; -1]; % Flow input on port 2 |
︙ |
Modified mttroot/mtt/lib/comp/simple/GY_eqn.m from [f2e485f0f7] to [b248761e3d].
︙ | |||
11 12 13 14 15 16 17 18 19 20 21 22 23 24 | 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | + + + | % structure,eqnfile); % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% Version control history % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% $Id$ % %% $Log$ % %% Revision 1.1 2000/12/28 11:51:06 peterg % %% Initial revision % %% % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Copyright (c) P.J. Gawthrop, 1996. if nargin<8 |
︙ | |||
46 47 48 49 50 51 52 | 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 | - + - + | inbond = bond_number(2); outport = 1; inport = 2; outcause = 1; incause = -1; end; |
Modified mttroot/mtt/lib/comp/simple/R_eqn.m from [56cc6513ff] to [9457569ec3].
︙ | |||
11 12 13 14 15 16 17 18 19 20 21 22 23 24 | 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | + + + | % structure,eqnfile) % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% Version control history % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% $Id$ % %% $Log$ % %% Revision 1.4 1996/09/12 19:28:11 peter % %% Added defaults (with no constitutive relationship) % %% % %% Revision 1.3 1996/09/12 16:40:45 peter % %% Now does a default (when no constitutive relationship) with a unit % %% constitutive relationship on each port. % %% % %% Revision 1.2 1996/09/12 13:12:04 peter % %% Removed an fprintf that was a mistake. % %% |
︙ | |||
48 49 50 51 52 53 54 | 51 52 53 54 55 56 57 58 59 60 61 62 63 | - + | inbond = bond_number; else % default if no cr: unit cr on each port incause = bonds(outport,1); inport = outport; inbond = outnumber; end; |
Modified mttroot/mtt/lib/comp/simple/TF_eqn.m from [0f6f6099bc] to [da8cba2d73].
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | + + + | function structure = TF_eqn(name,bond_number,bonds,direction,cr,args, ... structure,eqnfile); % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% Version control history % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% $Id$ % %% $Log$ % %% Revision 1.2 1996/09/10 10:41:37 peter % %% Now used equation.m to write the equations. % %% % %% Revision 1.1 1996/08/19 09:05:04 peter % %% Initial revision % %% % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% if nargin<8 |
︙ | |||
39 40 41 42 43 44 45 | 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 | - + - + | else outbond = bond_number(1); inbond = bond_number(2); outport = 1; inport = 2; end; |
Modified mttroot/mtt/lib/comp/simple/cieqn.m from [1e5df81dfe] to [e985d8ce2c].
︙ | |||
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 43 44 | 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 43 44 45 46 47 48 49 50 51 52 53 54 | + + + + + + + + + + | % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% Version control history % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% $Id$ % %% $Log$ % %% Revision 1.3 1998/06/29 13:05:08 peterg % %% Changed cieqn so that sign ignored. % %% % %% Revision 1.2 1997/12/04 13:48:00 peterg % %% Added sign info to take account of direction of bonds. % %% % %% Revision 1.1 1997/04/09 10:18:26 peterg % %% Initial revision % %% % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Copyright (c) P.J. Gawthrop, 1996. if nargin<8 eqnfile = 'stdout'; end; if (CorI==1) comp_type = "C"; else comp_type = "I"; endif CorIorISW = CorI; if CorIorISW==0 % ISW CorI = -1; end; % Find the number of ports [ports,junk] = size(bonds); % Right-hand side causality RHS_cause = (bonds(:,1)==CorI*ones(ports,1))*CorI state_cause = zeros(ports,1); % State causality |
︙ | |||
62 63 64 65 66 67 68 | 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 | - + - + | fprintf(eqnfile, '%s := MTTx(%1.0f,1);\n', ... varname(name,LHS_number, state_cause), state); % Print equation of form xdot = input - with sign fprintf(eqnfile, 'MTTdX(%1.0f,1) := %s%s;\n', state, sign, ... varname(name,LHS_number,-LHS_cause)); % Print equation of form output = CR (state) |
︙ |