BUILDDEVLIST - Make a full device list from devices in one sector [DeviceList, Index] = builddevlist(Family, Elem) INPUTS 1. Family - Family name 2. Elem - Element number in sector {Default: all} OUPUTS 1. DeviceList 2. Index NOTES 1. DeviceList and Index are the device list and index w.r.t. family2dev(Family)
0001 function [DeviceList, Index] = builddevlist(Family, Elem) 0002 %BUILDDEVLIST - Make a full device list from devices in one sector 0003 % [DeviceList, Index] = builddevlist(Family, Elem) 0004 % 0005 % INPUTS 0006 % 1. Family - Family name 0007 % 2. Elem - Element number in sector {Default: all} 0008 % 0009 % OUPUTS 0010 % 1. DeviceList 0011 % 2. Index 0012 % 0013 % 0014 % NOTES 0015 % 1. DeviceList and Index are the device list and index w.r.t. family2dev(Family) 0016 0017 % 0018 % Written by Gregory J. Portmann 0019 0020 if nargin == 0 0021 error('Must have at least one input (''Family'')!'); 0022 end 0023 0024 DeviceListTotal = family2dev(Family); 0025 0026 if nargin == 1 0027 DeviceList = DeviceListTotal; 0028 return 0029 end 0030 0031 DeviceList = []; 0032 Index = []; 0033 for i = 1:size(DeviceListTotal,1) 0034 if any([Elem]==DeviceListTotal(i,2)) 0035 DeviceList = [DeviceList; DeviceListTotal(i,:)]; 0036 Index = [Index; i]; 0037 end 0038 end 0039 0040 0041