Overview
| Comment: | Spurious start to vector 0 and 1 |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | origin/master | trunk |
| Files: | files | file ages | folders |
| SHA3-256: |
05cf66f40c75b35e0d7cf876d97dad87 |
| User & Date: | gawthrop@users.sourceforge.net on 1999-08-25 21:45:03.000 |
| Other Links: | branch diff | manifest | tags |
Context
|
1999-08-26
| ||
| 00:15:58 | Initial revision check-in: 606a3ff599 user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
|
1999-08-25
| ||
| 21:45:03 | Spurious start to vector 0 and 1 check-in: 05cf66f40c user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
| 21:20:07 | Don't list components starting with 0 ot 1 check-in: a0cacb95f9 user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
Changes
Modified mttroot/mtt/bin/trans/m/rbg2abg.m
from [5fcd824e34]
to [55c42237ba].
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | function [bonds,components] = rbg2abg(name,rbonds,rstrokes,rcomponents,\ port_coord,port_name,\ infofile,errorfile) ## ############################################################### ## ## Version control history ## ############################################################### ## ## $Id$ ## ## $Log$ ## ## Revision 1.40 1999/08/19 05:39:55 peterg ## ## Put into octave format ## ## ## ## Revision 1.39 1999/08/19 05:22:16 peterg ## ## To RCS prior to inplementing vector junctions ## ## ## ## Revision 1.38 1999/03/12 00:58:06 peterg | > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | function [bonds,components] = rbg2abg(name,rbonds,rstrokes,rcomponents,\ port_coord,port_name,\ infofile,errorfile) ## ############################################################### ## ## Version control history ## ############################################################### ## ## $Id$ ## ## $Log$ ## ## Revision 1.41 1999/08/19 21:12:33 peterg ## ## Tidied and started implementaation of vector junctions ## ## ## ## Revision 1.40 1999/08/19 05:39:55 peterg ## ## Put into octave format ## ## ## ## Revision 1.39 1999/08/19 05:22:16 peterg ## ## To RCS prior to inplementing vector junctions ## ## ## ## Revision 1.38 1999/03/12 00:58:06 peterg |
| ︙ | ︙ | |||
229 230 231 232 233 234 235 | comp_near_bond ## We now have a list (comp_near_bond) of the component(s) at each end ## of each bond ## Now do a list of the bonds on each component - unsorted at this stage. ## Also expand aliases using the alias list for each component | | > > > > > > > > > > > > > > > > | 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 |
comp_near_bond
## We now have a list (comp_near_bond) of the component(s) at each end
## of each bond
## Now do a list of the bonds on each component - unsorted at this stage.
## Also expand aliases using the alias list for each component
components = [];
i_vector=0; # Counter for vector components
for i = 1:n_components
##Get component type
eval(['[comp_type, comp_name] = ', name, '_cmp(i)']);
# ## Vector 0 and 1
# n_vector = 1; # Default to scalar component
# if (comp_type(1)=='0')||(comp_type(1)=='1')
# n_name = length(comp_type);
# if n_name>1
# n_vector = str2num(comp_type(2:n_name));
# endif
# endif
# n_vector
## Create scalar versions of vector components
for new_comp=2:n_vector
i_vector++;
endfor
## There are n_comp_bonds bonds on this component with corresponding index
[index,n_comp_bonds] = getindex(comp_near_bond,i);
if index(1,1)==0
mtt_error(sprintf("Component %s (%s) has no bonds", comp_name,
comp_type),errorfile);
endif
|
| ︙ | ︙ | |||
484 485 486 487 488 489 490 |
## Produce a list of bonds on each component (within this component)
## - sorted if explicit port numbers
for i = 1:n_components
disp('-----------------');
##Get component type
eval(['[comp_type, comp_name] = ', name, '_cmp(i)']);
| < | > | > | | 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 |
## Produce a list of bonds on each component (within this component)
## - sorted if explicit port numbers
for i = 1:n_components
disp('-----------------');
##Get component type
eval(['[comp_type, comp_name] = ', name, '_cmp(i)']);
##Convert junction names
if comp_type(1)=='0'
comp_type = 'zero';
endif
if comp_type(1)=='1'
comp_type = 'one';
endif
## Find the (unsorted) bond list on this component
signed_bond_list = nozeros(components(i,:));
n_comp_bonds = length(signed_bond_list);
direction = sign(signed_bond_list);
##Find the port list for this component
|
| ︙ | ︙ |