Overview
Comment: | Initial revision |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | origin/master | trunk |
Files: | files | file ages | folders |
SHA3-256: |
943ab01fa9c60ea765220b611080c29b |
User & Date: | gawthrop@users.sourceforge.net on 2000-12-27 16:51:18 |
Other Links: | branch diff | manifest | tags |
Context
2000-12-27
| ||
17:02:22 | Initial revision check-in: 51bc9f2809 user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
16:51:18 | Initial revision check-in: 943ab01fa9 user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
16:46:13 | Stripped the mtt- from paths check-in: e118e64682 user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
Changes
Added mttroot/mtt/bin/trans/m/add_bond.m version [575ba3aab9].
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 comp_list = add_bond(comp_list,bond_number,comp_number); % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% Version control history % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% $Id$ % %% $Log$ % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Adds a new bond entry to a list of components -- pads the list appropriately. [N,M] = size(comp_list); if M==0 M=1; end; if comp_number>N % Pad with zeros comp_list = [comp_list;zeros(comp_number-N,M)]; end; this_comp = [nozeros(comp_list(comp_number,:)), bond_number]; L = length(this_comp); [N,M] = size(comp_list); if L<M %pad new row with zeros comp_list(comp_number,:) = [this_comp, zeros(1,M-L)]; elseif L>M %pad matrix with zeros and insert new row comp_list = [comp_list zeros(N,L-M)]; comp_list(comp_number,:) = this_comp; else %Sizes match so just insert comp_list(comp_number,:) = this_comp; end; |
Added mttroot/mtt/bin/trans/m/add_row.m version [8618dcbf0d].
> > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | function New=add_row(Old,Row); # Adds a row to end of matrix [N,M]=size(Old); [n,m] = size(Row); if m>M Old = [Old, zeros(N,m-M)]; # Pad with zeros elseif M>m Row = [Row, zeros(n,M-m)]; endif New = [Old;Row]; endfunction |
Added mttroot/mtt/bin/trans/m/length2d.m version [ad2755e59c].
> > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | function len = length2d(vector_array) % length2d - Finds (geometric) length of row vectors stacked % into a column vector % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %%%%% Model Transformation Tools %%%%% % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % Matlab function length2d % len = length2d(vector_array) % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% Version control history % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% $Id$ % %% $Log$ % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Copyright (c) P.J. Gawthrop, 1996. % len = sqrt(sum(vector_array'.^2)'); |