source: MML/trunk/mml/doc_html/mml/getfamilydata.html @ 4

Last change on this file since 4 was 4, checked in by zhangj, 10 years ago

Initial import--MML version from SOLEIL@2013

File size: 47.5 KB
Line 
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2                "http://www.w3.org/TR/REC-html40/loose.dtd">
3<html>
4<head>
5  <title>Description of getfamilydata</title>
6  <meta name="keywords" content="getfamilydata">
7  <meta name="description" content="GETFAMILYDATA - Gets data associated with the accelerator control">
8  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
9  <meta name="generator" content="m2html &copy; 2003 Guillaume Flandin">
10  <meta name="robots" content="index, follow">
11  <link type="text/css" rel="stylesheet" href="../m2html.css">
12</head>
13<body>
14<a name="_top"></a>
15<div><a href="../index.html">Home</a> &gt;  <a href="index.html">mml</a> &gt; getfamilydata.m</div>
16
17<!--<table width="100%"><tr><td align="left"><a href="../index.html"><img alt="<" border="0" src="../left.png">&nbsp;Master index</a></td>
18<td align="right"><a href="index.html">Index for mml&nbsp;<img alt=">" border="0" src="../right.png"></a></td></tr></table>-->
19
20<h1>getfamilydata
21</h1>
22
23<h2><a name="_name"></a>PURPOSE <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
24<div class="box"><strong>GETFAMILYDATA - Gets data associated with the accelerator control</strong></div>
25
26<h2><a name="_synopsis"></a>SYNOPSIS <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
27<div class="box"><strong>function [Data, ErrorFlag] = getfamilydata(Family, Field1, Field2, DeviceList) </strong></div>
28
29<h2><a name="_description"></a>DESCRIPTION <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
30<div class="fragment"><pre class="comment">GETFAMILYDATA - Gets data associated with the accelerator control
31
32  When getting data from the accelerator object (AO):
33  [Data, ErrorFlag] = getfamilydata(Family, Field1, Field2, DeviceList)
34  [Data, ErrorFlag] = getfamilydata(Family, Field1, DeviceList)
35  [Data, ErrorFlag] = getfamilydata(Family, Field1)
36  [Data, ErrorFlag] = getfamilydata(Family)
37  [Data, ErrorFlag] = getfamilydata
38
39  When getting data from the accelerator data stucture (AD):
40  [Data, ErrorFlag] = getfamilydata(Field1)
41  [Data, ErrorFlag] = getfamilydata(Field1, Field2)
42  [Data, ErrorFlag] = getfamilydata(Field1, Field2, Field3)
43  [Data, ErrorFlag] = getfamilydata(Field1, Field2, Field3, Field4)
44
45  INPUTS
46  1. Family = Family Name
47              Data Structure (only the FamilyName is used)
48              Field
49              Accelerator Object
50  2. Field1 = Field name (string)
51  3. Field2 = Field name (string)
52  4. DeviceList = Device list for that family
53
54  OUTPUT
55  1. Data = AO.Field1.Field2  or  AD.Field1.Field2.Field3.Field4
56     Looks for Family in the accelerator data structure and returns the appropriate data.
57
58     If DeviceList is not an input, then the exact contents of the field is returned
59     If DeviceList exists, then Data is indexed according to DeviceList
60     If DeviceList is empty, [], then the entire DeviceList is returned
61     If DeviceList is empty, [], and the field is one row (or cell) then Data is expanded
62                                 to the size of the entire DeviceList
63                     
64     Returns [] if the data could not be found
65
66  2. ErrorFlag = 1 if the data could not be found
67
68  NOTE
69  1. If the inputs are cell arrays, then the output is a cell array
70  2. If Family is a cell array, then DeviceList must also be a cell array,
71     however, Field1 or Field2 can either be a cell array array or a string.
72
73  EXAMPLES
74  1. getfamilydata('BPMx')
75  2. getfamilydata('BPMx','Monitor')
76  3. getfamilydata('BPMx','Monitor','Units')
77  4. getfamilydata('HCOR', 'Status')
78
79  See Also <a href="setfamilydata.html" class="code" title="function setfamilydata(Data, Family, Field1, Field2, DeviceList)">setfamilydata</a></pre></div>
80
81<!-- crossreference -->
82<h2><a name="_cross"></a>CROSS-REFERENCE INFORMATION <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
83This function calls:
84<ul style="list-style-image:url(../matlabicon.gif)">
85<li><a href="elem2dev.html" class="code" title="function Output = elem2dev(Family, ElementList)">elem2dev</a>   ELEM2DEV - Converts a device list to an element list</li><li><a href="family2dev.html" class="code" title="function DeviceList = family2dev(Family, varargin);">family2dev</a>  FAMILY2DEV - Return the device list for a family</li><li><a href="getad.html" class="code" title="function  AD = getad">getad</a>       GETAD - returns the Accelerator Data (AD) structure</li><li><a href="getfamilydata.html" class="code" title="function [Data, ErrorFlag] = getfamilydata(Family, Field1, Field2, DeviceList)">getfamilydata</a>  GETFAMILYDATA - Gets data associated with the accelerator control</li><li><a href="isfamily.html" class="code" title="function  [FamilyFlag, AO] = isfamily(Family, Field)">isfamily</a>        ISFAMILY - True for family names</li></ul>
86This function is called by:
87<ul style="list-style-image:url(../matlabicon.gif)">
88<li><a href="addmenuad.html" class="code" title="function varargout = addmenuad(h, Command)">addmenuad</a>      ADDMENUAD - Menu to tune AD parameters</li><li><a href="addmenuao.html" class="code" title="function varargout = addmenuao(h, Command)">addmenuao</a>   ADDMENUAO - Menu to tune AO parameters</li><li><a href="buildopsdatafiles.html" class="code" title="function buildopsdatafiles">buildopsdatafiles</a>   BUILDOPSDATAFILES - Builds the files for the OpsData directory from the model</li><li><a href="cddataroot.html" class="code" title="function DirectoryName = cddataroot">cddataroot</a> CDDATAROOT - Change to the MML data directory</li><li><a href="cdopsdata.html" class="code" title="function DirectoryName = cdopsdata">cdopsdata</a>    CDOPSDATA - Change to the MML operational data directory</li><li><a href="channel2common.html" class="code" title="function [CommonNames, ErrorFlag] = channel2common(ChannelNames, Field, Family)">channel2common</a>  CHANNEL2COMMON - Convert a channel name to a common name</li><li><a href="channel2handle.html" class="code" title="function [Handle, ErrorFlag] = channel2handle(ChannelNames, FamilyList)">channel2handle</a>  CHANNEL2HANDLE - Returns the MCA handle (obsolete)</li><li><a href="common2handle.html" class="code" title="function [Handles, ErrorFlag] = common2handle(CommonNames, Field, Family);">common2handle</a>       COMMON2HANDLE - Converts a common name to a MCA handle (Obsolete function)</li><li><a href="copybpmrespfile.html" class="code" title="function copybpmrespfile(DataFileName, ToFileName)">copybpmrespfile</a>   COPYBPMRESPFILE - Copies a BPM response matrix file to the golden file</li><li><a href="copybpmsigmafile.html" class="code" title="function copybpmsigmafile(DataFileName, ToFileName)">copybpmsigmafile</a>    COPYBPMSIGMAFILE - Copies a BPM data file to the golden BPM sigma file</li><li><a href="copychrorespfile.html" class="code" title="function copychrorespfile(DataFileName, ToFileName)">copychrorespfile</a>    COPYCHRORESPFILE - Copies a chromaticity response matrix file to the golden file</li><li><a href="copydispersionfile.html" class="code" title="function copydispersionfile(DataFileName, ToFileName)">copydispersionfile</a>    COPYDISPERSIONFILE - Copies a dispersion file to golden file</li><li><a href="copydisprespfile.html" class="code" title="function copydisprespfile(DataFileName, ToFileName)">copydisprespfile</a>      COPYDISPRESPFILE - Copies a dispersion response matrix file to the golden file</li><li><a href="copyinjectionconfigfile.html" class="code" title="function copyinjectionconfigfile(DataFileName, ToFileName)">copyinjectionconfigfile</a>       COPYINJECTIONCONFIGFILE - Copies a lattice file to the golden injection file</li><li><a href="copymachineconfigfile.html" class="code" title="function copymachineconfigfile(DataFileName, ToFileName)">copymachineconfigfile</a>       COPYMACHINECONFIGFILE - Copies a lattice file to the golden file</li><li><a href="copytunerespfile.html" class="code" title="function copytunerespfile(DataFileName, ToFileName)">copytunerespfile</a>  COPYTUNERESPFILE - Copies a tune response matrix file to the golden file</li><li><a href="correctors2golden.html" class="code" title="function correctors2golden">correctors2golden</a> CORRECTORS2GOLDEN - Sets the default corrector families to the golden configuration values</li><li><a href="dev2common.html" class="code" title="function [Output, Err] = dev2common(Family, DeviceList)">dev2common</a>        DEV2COMMON - Converts Device lists to common names</li><li><a href="dev2elem.html" class="code" title="function Output = dev2elem(Family, DevList)">dev2elem</a>        DEV2ELEM - Converts an element list to a device list</li><li><a href="family2channel.html" class="code" title="function [ChannelNames, ErrorFlag] = family2channel(varargin);">family2channel</a>       FAMILY2CHANNEL - Converts the family name to a channel name</li><li><a href="family2common.html" class="code" title="function [CommonNames, ErrorFlag] = family2common(Family, DeviceList)">family2common</a>   FAMILY2COMMON - Convert a family name, device list to a common name list</li><li><a href="family2datastruct.html" class="code" title="function [DataStruct, ErrorFlag] = family2datastruct(varargin)">family2datastruct</a>     FAMILY2DATASTRUCTURE - Returns a datastructure corresponding to a Family</li><li><a href="family2dev.html" class="code" title="function DeviceList = family2dev(Family, varargin);">family2dev</a>      FAMILY2DEV - Return the device list for a family</li><li><a href="family2status.html" class="code" title="function [S, IndexList] = family2status(Family, DeviceList)">family2status</a>        FAMILY2STATUS - Returns the device status</li><li><a href="family2tol.html" class="code" title="function [Data, ErrorFlag] = family2tol(varargin)">family2tol</a>       FAMILY2TOL - Return the (SP-AM) tolerance for a family</li><li><a href="findrf1.html" class="code" title="function [DeltaRF, RFnew, frf] = findrf1(DeltaRF, BPMFamily, BPMList, FileName)">findrf1</a>  FINDRF1 - Finds the RF frequency that minimizes the horizonal dispersion</li><li><a href="getao.html" class="code" title="function  AO = getao(FileName)">getao</a>     GETAO - returns the AcceleratorObject (AO)</li><li><a href="getbpm.html" class="code" title="function [BPM1, BPM2, FileName]=getbpm(varargin);">getbpm</a>      GETBPM - Returns the horizontal and vertical orbit</li><li><a href="getbpmresp.html" class="code" title="function [S, FileName] = getbpmresp(varargin)">getbpmresp</a>  GETBPMRESP - Returns the BPM response matrix in the horizontal and vertical planes</li><li><a href="getbrho.html" class="code" title="function brho = getbrho(varargin)">getbrho</a>    GETBRHO - Calculations of the beam rigidity</li><li><a href="getchro.html" class="code" title="function [Data, FileName] = getchro(varargin)">getchro</a>       GETCHRO - Return the chromaticity function (from file)</li><li><a href="getchroresp.html" class="code" title="function [ChromaticityMatrix, FileName] = getchroresp(varargin)">getchroresp</a>  GETCHRORESP - Loads the chromaticity response vector (or matrix) for multiple sextupole families</li><li><a href="getcircumference.html" class="code" title="function C = getcircumference">getcircumference</a>        GETCIRCUMFERENCE - Returns the ring circumference</li><li><a href="getcrunch.html" class="code" title="function Data = getcrunch(varargin)">getcrunch</a>       GETCRUNCH- Returns the crunch values for a family (radians)</li><li><a href="getdisp.html" class="code" title="function [Data, FileName] = getdisp(varargin)">getdisp</a>       GETDISP - Returns the dispersion for a family (from file)</li><li><a href="getenergy.html" class="code" title="function [Energy, HCMEnergy] = getenergy(varargin)">getenergy</a>        GETENERGY - Returns the beam energy base on the bend magnet</li><li><a href="getfamilydata.html" class="code" title="function [Data, ErrorFlag] = getfamilydata(Family, Field1, Field2, DeviceList)">getfamilydata</a>  GETFAMILYDATA - Gets data associated with the accelerator control</li><li><a href="getgain.html" class="code" title="function Data = getgain(varargin)">getgain</a>     GETGAIN - Returns the gain for a family</li><li><a href="getgolden.html" class="code" title="function Data = getgolden(varargin)">getgolden</a> GETGOLDEN - Returns the golden values for a family</li><li><a href="getinjectionlattice.html" class="code" title="function [ConfigSetpoint, ConfigMonitor, FileName] = getinjectionlattice(varargin)">getinjectionlattice</a>   GETINJECTIONLATTICE - Get data from the production lattice file</li><li><a href="getlattice.html" class="code" title="function [Setpoint, Monitor, FileName] = getlattice(varargin)">getlattice</a>     GETLATTICE - Get data from a lattice file</li><li><a href="getmachineconfig.html" class="code" title="function [ConfigSetpoint, ConfigMonitor, FileName] = getmachineconfig(varargin)">getmachineconfig</a>     GETMACHINECONFIG - Returns or saves to file the present storage ring setpoints and monitors</li><li><a href="getmachinename.html" class="code" title="function machine = getmachinename">getmachinename</a>     GETMACHINENAME - Return name of the machine loaded in MML</li><li><a href="getmcf.html" class="code" title="function Alpha = getmcf(ModelString)">getmcf</a>    GETMCF - Returns the momentum compaction factor (MCF) stored in the AD or the model</li><li><a href="getmemberof.html" class="code" title="function  MemberOfCell = getmemberof(FamilyName, Field)">getmemberof</a>     GETMEMBEROF - Returns the membership information of a family (cell of strings)</li><li><a href="getmode.html" class="code" title="function Mode = getmode(Family, Field)">getmode</a>   GETMODE - Returns the present family mode ('Online', 'Simulator', 'Manual', 'Special', etc)</li><li><a href="getoffset.html" class="code" title="function Data = getoffset(varargin)">getoffset</a>     GETOFFSET - Returns the offset values for a family</li><li><a href="getphysdata.html" class="code" title="function [Data, iNotFound] = getphysdata(Family, Field, DeviceList)">getphysdata</a>  GETPHYSDATA - Gets physics data</li><li><a href="getproductionlattice.html" class="code" title="function [ConfigSetpoint, ConfigMonitor, FileName] = getproductionlattice(varargin)">getproductionlattice</a>   GETPRODUCTIONLATTICE - Read the Golden lattice from file GoldenLattice</li><li><a href="getpv.html" class="code" title="function [AM, tout, DataTime, ErrorFlag] = getpv(varargin)">getpv</a>   GETPV - Returns a variable from the online system or the model</li><li><a href="getramprate.html" class="code" title="function RampRate = getramprate(varargin)">getramprate</a>        GETRAMPRATE - Returns the ramp rate for a family</li><li><a href="getrespmat.html" class="code" title="function [S, FileName] = getrespmat(varargin)">getrespmat</a>    GETRESPMAT - Get response matrix data from a file</li><li><a href="getrf.html" class="code" title="function [RFsp, RFam, DataTime, ErrorFlag] = getrf(varargin)">getrf</a>      GETRF - Gets the RF frequency</li><li><a href="getroll.html" class="code" title="function Data = getroll(varargin)">getroll</a> GETROLL - Returns the roll values for a family (radians)</li><li><a href="getrunflag.html" class="code" title="function [RunFlag, Delta, Tol] = getrunflag(varargin)">getrunflag</a>    GETRUNFLAG - Returns position if the device is in the process of changing a setpoint</li><li><a href="getsigma.html" class="code" title="function [Data, FileName] = getsigma(varargin)">getsigma</a>   GETSIGMA - Return the standard deviation in the monitor for a family</li><li><a href="getspos.html" class="code" title="function S = getspos(Family, DeviceList)">getspos</a>   GETSPOS - Returns the longitudinal position in meters</li><li><a href="getsubmachinename.html" class="code" title="function machine = getmachinename">getsubmachinename</a>     GETMACHINENAME - Return name of the machine loaded in MML</li><li><a href="gettune.html" class="code" title="function [Tune, tout, DataTime, ErrorFlag] = gettune(varargin)">gettune</a>        GETTUNE - Returns the betatron tunes</li><li><a href="gettuneresp.html" class="code" title="function [TuneMatrix, FileName] = gettuneresp(varargin)">gettuneresp</a>    GETTUNERESP - Loads the tune response vector (or matrix) for multiple quadrupole families</li><li><a href="getunits.html" class="code" title="function [Units, UnitsString] = getunits(Family, Field)">getunits</a>     GETUNITS - Return the present family units and units string</li><li><a href="getx.html" class="code" title="function [AM, tout, DataTime, ErrorFlag] = getx(varargin)">getx</a> GETX - Returns the horizontal orbit</li><li><a href="gety.html" class="code" title="function [AM, tout, DataTime, ErrorFlag] = gety(varargin)">gety</a> GETY - Returns the vertical orbit</li><li><a href="golden2sim.html" class="code" title="function golden2sim(ZeroCMFlag)">golden2sim</a> GOLDEN2SIM - loads online machine configuration to AT configuration</li><li><a href="gotodataroot.html" class="code" title="function gotodataroot">gotodataroot</a>     GOTODATAROOT - Change directory to the data root directory</li><li><a href="hw2physics.html" class="code" title="function S = hw2physics(Family, Field, value, DeviceList, Energy)">hw2physics</a>      HW2PHYSICS - Converts from 'Hardware' units to 'Physics' units</li><li><a href="isbooster.html" class="code" title="function Test = isbooster">isbooster</a>    ISBOOSTER - Is this a booster ring?</li><li><a href="isstoragering.html" class="code" title="function Test = isstoragering">isstoragering</a>   ISSTORAGERING - Is this a storage ring?</li><li><a href="istransport.html" class="code" title="function Test = istransport">istransport</a>     ISTRANSPORT - Is this a transport line?</li><li><a href="loadao.html" class="code" title="function  loadao(FileName)">loadao</a>        LOADAO - Loads the AO and AD from a .mat file</li><li><a href="loadorbit.html" class="code" title="function varargout = loadorbit(varargin)">loadorbit</a>      LOADORBIT -  Loads orbit by file/directory specification - or - Golden %orbit by default</li><li><a href="makebump.html" class="code" title="function OCS = makebump(varargin)">makebump</a>    MAKEBUMP - Creates and orbit correction structure (OCS) usable by setorbit</li><li><a href="makephysdata.html" class="code" title="function makephysdata(varargin)">makephysdata</a>    MAKEPHYSDATA - Make a starting physics data file</li><li><a href="maxpv.html" class="code" title="function [Data, ErrorFlag] = maxpv(varargin)">maxpv</a>       MAXPV - Maximum value of a process variable</li><li><a href="measbpmresp.html" class="code" title="function [Rmat, OutputFileName] = measbpmresp(varargin)">measbpmresp</a>     MEASBPMRESP - Measures the BPM response matrix in the horizontal and vertical planes</li><li><a href="measbpmresplinearity.html" class="code" title="function measbpmresplinearity(CMFamily, mm, CMDeviceList, XAxisFlag)">measbpmresplinearity</a>     MEASBPMRESPLINEARITY - Compute BPMlinearity</li><li><a href="measchro.html" class="code" title="function [Chromaticity, FileName] = measchro(varargin)">measchro</a>    MEASCHRO -  measures the chromaticity function emperically</li><li><a href="measchroresp.html" class="code" title="function [Rmat, OutputFileName] = measchroresp(varargin)">measchroresp</a>   MEASCHRORESP - measures the response from sextupoles to chromaticity</li><li><a href="meascmhysteresis.html" class="code" title="function meascmhysteresis(BPMList, CMFamily, CMList, MaxChange, NSteps)">meascmhysteresis</a>  MEASCMHYSTERESIS - Measure corrector magnet hysteresis</li><li><a href="measdisp.html" class="code" title="function [Dx, Dy, FileName] = measdisp(varargin);">measdisp</a>      MEASDISP - Measures the dispersion function</li><li><a href="measidfftable.html" class="code" title="function ffgettbl(Sector, BPMFlag)">measidfftable</a>      FFGETTBL - Measures an insertion device feed forward table for the vertical gap</li><li><a href="measlocodata.html" class="code" title="function measlocodata(varargin)">measlocodata</a>       MEASLOCODATA - Measures a set of LOCO data</li><li><a href="measrespmat.html" class="code" title="function S = measrespmat(varargin)">measrespmat</a>   MEASRESPMAT - Measure a response matrix</li><li><a href="meastuneresp.html" class="code" title="function [Rmat, OutputFileName] = meastuneresp(varargin)">meastuneresp</a>      MEASTUNERESP - Measures the response from quadrupole to tune</li><li><a href="minpv.html" class="code" title="function [Data, ErrorFlag] = minpv(varargin)">minpv</a>   MinPV - Maximum value of a process variable</li><li><a href="monmags.html" class="code" title="function [MagnetSetpoints, MagnetMonitors, BPMMonitors, MagnetSetpointsEnd, FileName] = monmags(varargin)">monmags</a>   MONMAGS - Monitors all magnet power supplies and plots various statistics</li><li><a href="orbitcorrectionmethods.html" class="code" title="function [OCS, SmatNoWeights, S, U, V] = orbitcorrectionmethods(OCS, Smat, S, U, V)">orbitcorrectionmethods</a>     ORBITCORRECTIONMETHODS - Some the orbit correction methods used on light sources</li><li><a href="physics2hw.html" class="code" title="function S = physics2hw(Family, Field, value, DeviceList, Energy)">physics2hw</a>        PHYSICS2HW - Converts from 'Physics' units to 'Hardware' units</li><li><a href="plotbpmrespsym.html" class="code" title="function plotbpmrespsym(R)">plotbpmrespsym</a> PLOTBPMRESPSYM - Looks for symmetry of the orbit response matrix</li><li><a href="plotcm.html" class="code" title="function [DeltaRF, HCMEnergyChangeTotal, DeltaL] = plotcm(varargin)">plotcm</a>      PLOTCM - Plots the horizontal and vertical corrector magnet families and</li><li><a href="plotgoldenorbit.html" class="code" title="function plotgoldenorbit(varargin)">plotgoldenorbit</a>     PLOTGOLDENORBIT - Plots the golden orbit</li><li><a href="plotidfftable.html" class="code" title="function FigureHandles = plotidfftable(Sector, GeV)">plotidfftable</a>        PLOTIDFFTABLE - Plots various information about the feed forward tables</li><li><a href="plotlattice.html" class="code" title="function plotlattice(varargin)">plotlattice</a>  PLOTLATTICE - Plot the lattice</li><li><a href="plotoffsetorbit.html" class="code" title="function plotoffsetorbit(varargin)">plotoffsetorbit</a>       PLOTOFFSETORBIT - Plots the offset orbit</li><li><a href="plotorbit.html" class="code" title="function plotorbit(varargin)">plotorbit</a>       PLOTORBIT - Plot the present orbit w.r.t. the golden or offset orbit</li><li><a href="plotorbitdata.html" class="code" title="function [BPMx, BPMy] = plotorbitdata(varargin)">plotorbitdata</a>        PLOTORBITDATA - Plots BPM statistics</li><li><a href="quad2bpm.html" class="code" title="function [BPMFamilyOutput, BPMDevOutput, DeltaSpos, PhaseAdvance] = quad2bpm(QUADFamily, QUADDev, LocationFlag)">quad2bpm</a>  QUAD2BPM - Returns the nearest BPM to the specified quadrupole</li><li><a href="quadcenter.html" class="code" title="function [QMS1, QMS2] = quadcenter(QuadFamily, QuadDev, XYPlane, FigureHandle)">quadcenter</a>     QUADCENTER - Measure the magnet center of a quadrupole magnet</li><li><a href="quadcenterinit.html" class="code" title="function QMS = quadcenterinit(QuadFamily, QuadDev, QuadPlane)">quadcenterinit</a>       QMS = quadcenterinit(Family, Device, QuadPlane)</li><li><a href="quadgetdata.html" class="code" title="function [X, Y, BPMxFamily, QUADxFamily, BPMyFamily, QUADyFamily, DateMatX, DateMatY] = quadgetdata(DirName, PlotFlag)">quadgetdata</a>  QUADGETDATA - Collect the date from a quadrupole center run.</li><li><a href="quadplot.html" class="code" title="function [QMS, WarningString] = quadplot(Input1, FigureHandle, sigmaBPM)">quadplot</a> QUADPLOT - Plots quadrupole centering data</li><li><a href="quadplotall.html" class="code" title="function [Xnew, Ynew, BPMxFamily, QUADxFamily, BPMyFamily, QUADyFamily, DateMatX, DateMatY] = quadplotall(DirName, PlotFlag)">quadplotall</a> QUADPLOTALL - Collect the date from a quadrupole center run.</li><li><a href="quadplotphysics.html" class="code" title="function [QMS, WarningString] = quadplotphysics(Input1, FigureHandle, sigmaBPM)">quadplotphysics</a>    QUADPLOTPHYSICS - Plots quadrupole centering data in physics units</li><li><a href="saveao.html" class="code" title="function  saveao(FileName)">saveao</a>     SAVEAO - Saves the AO and AD to a .mat file</li><li><a href="savegoldenorbit.html" class="code" title="function savegoldenorbit(FileName)">savegoldenorbit</a>  SAVEGOLDENORBIT - Save present orbit as golden orbit into a file</li><li><a href="saveoffsetorbit.html" class="code" title="function saveoffsetorbit(FileName)">saveoffsetorbit</a>     SAVEOFFSETORBIT - Save offset orbit into file</li><li><a href="setao.html" class="code" title="function  setao(AO)">setao</a>   SETAO - Set Accelerator Object (AO)</li><li><a href="setenergy.html" class="code" title="function [ConfigSetpointEnd, ConfigSetpointStart, ConfigSetpointPhysics] = setenergy(varargin)">setenergy</a>  SETENERGY - Sets the storage ring energy (GeV) by ramping all lattice magnets</li><li><a href="setgolden.html" class="code" title="function varargout = setgolden(varargin)">setgolden</a>      SETGOLDEN - Set the golden values</li><li><a href="setmachineconfig.html" class="code" title="function [ConfigSetpoint, FileName] = setmachineconfig(varargin)">setmachineconfig</a>    SETMACHINECONFIG - Sets the storage ring setpoints from a file or configuration data structure</li><li><a href="setoffset.html" class="code" title="function varargout = setoffset(varargin)">setoffset</a>     SETOFFSET - Set the offset</li><li><a href="setorbit.html" class="code" title="function [OCS, OCS0, V, S, ErrorFlag] = setorbit(varargin)">setorbit</a> SETORBIT - Orbit correction function</li><li><a href="setorbitbump.html" class="code" title="function [OCS, OCS0, V, S, ErrorFlag] = setorbitbump(varargin)">setorbitbump</a>   SETORBITBUMP - Local bump program (uses setorbit)</li><li><a href="setphysdata.html" class="code" title="function setphysdata(varargin)">setphysdata</a>        SETPHYSDATA - Set physics data</li><li><a href="setpv.html" class="code" title="function ErrorFlag = setpv(varargin)">setpv</a> SETPV - Setpoint change of the online system or model</li><li><a href="setrf.html" class="code" title="function setrf(RF, varargin)">setrf</a>  SETRF - Sets the RF frequency</li><li><a href="switch2hardware.html" class="code" title="function ErrorFlag = switch2hardware(Family)">switch2hardware</a>      SWITCH2HARDWARE - Switch family to hardware units</li><li><a href="switch2manual.html" class="code" title="function ErrorFlag = switch2manual(Family)">switch2manual</a>        SWITCH2MANUAL - Switch family to manual mode.</li><li><a href="switch2online.html" class="code" title="function ErrorFlag = switch2online(Family, DisplayFlag)">switch2online</a>       SWITCH2ONLINE - Switch family to online mode</li><li><a href="switch2physics.html" class="code" title="function ErrorFlag = switch2physics(Family)">switch2physics</a>  SWITCH2PHYSICS - Switch family to physics units</li><li><a href="switch2sim.html" class="code" title="function ErrorFlag = switch2sim(Family, DisplayFlag)">switch2sim</a>      SWITCH2SIM - Switch family to simulator mode if the family is in online mode.</li><li><a href="switchunits.html" class="code" title="function Units = switchunits(varargin)">switchunits</a>    SWITCHUNITS - Change the units field  for all families in the MML</li></ul>
89<!-- crossreference -->
90
91<h2><a name="_subfunctions"></a>SUBFUNCTIONS <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
92<ul style="list-style-image:url(../matlabicon.gif)">
93<li><a href="#_sub1" class="code">function Data = sortdatabydevicelist(Data, DeviceList, DeviceListTotal)</a></li></ul>
94<h2><a name="_source"></a>SOURCE CODE <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
95<div class="fragment"><pre>0001 <a name="_sub0" href="#_subfunctions" class="code">function [Data, ErrorFlag] = getfamilydata(Family, Field1, Field2, DeviceList)</a>
960002 <span class="comment">%GETFAMILYDATA - Gets data associated with the accelerator control</span>
970003 <span class="comment">%</span>
980004 <span class="comment">%  When getting data from the accelerator object (AO):</span>
990005 <span class="comment">%  [Data, ErrorFlag] = getfamilydata(Family, Field1, Field2, DeviceList)</span>
1000006 <span class="comment">%  [Data, ErrorFlag] = getfamilydata(Family, Field1, DeviceList)</span>
1010007 <span class="comment">%  [Data, ErrorFlag] = getfamilydata(Family, Field1)</span>
1020008 <span class="comment">%  [Data, ErrorFlag] = getfamilydata(Family)</span>
1030009 <span class="comment">%  [Data, ErrorFlag] = getfamilydata</span>
1040010 <span class="comment">%</span>
1050011 <span class="comment">%  When getting data from the accelerator data stucture (AD):</span>
1060012 <span class="comment">%  [Data, ErrorFlag] = getfamilydata(Field1)</span>
1070013 <span class="comment">%  [Data, ErrorFlag] = getfamilydata(Field1, Field2)</span>
1080014 <span class="comment">%  [Data, ErrorFlag] = getfamilydata(Field1, Field2, Field3)</span>
1090015 <span class="comment">%  [Data, ErrorFlag] = getfamilydata(Field1, Field2, Field3, Field4)</span>
1100016 <span class="comment">%</span>
1110017 <span class="comment">%  INPUTS</span>
1120018 <span class="comment">%  1. Family = Family Name</span>
1130019 <span class="comment">%              Data Structure (only the FamilyName is used)</span>
1140020 <span class="comment">%              Field</span>
1150021 <span class="comment">%              Accelerator Object</span>
1160022 <span class="comment">%  2. Field1 = Field name (string)</span>
1170023 <span class="comment">%  3. Field2 = Field name (string)</span>
1180024 <span class="comment">%  4. DeviceList = Device list for that family</span>
1190025 <span class="comment">%</span>
1200026 <span class="comment">%  OUTPUT</span>
1210027 <span class="comment">%  1. Data = AO.Field1.Field2  or  AD.Field1.Field2.Field3.Field4</span>
1220028 <span class="comment">%     Looks for Family in the accelerator data structure and returns the appropriate data.</span>
1230029 <span class="comment">%</span>
1240030 <span class="comment">%     If DeviceList is not an input, then the exact contents of the field is returned</span>
1250031 <span class="comment">%     If DeviceList exists, then Data is indexed according to DeviceList</span>
1260032 <span class="comment">%     If DeviceList is empty, [], then the entire DeviceList is returned</span>
1270033 <span class="comment">%     If DeviceList is empty, [], and the field is one row (or cell) then Data is expanded</span>
1280034 <span class="comment">%                                 to the size of the entire DeviceList</span>
1290035 <span class="comment">%</span>
1300036 <span class="comment">%     Returns [] if the data could not be found</span>
1310037 <span class="comment">%</span>
1320038 <span class="comment">%  2. ErrorFlag = 1 if the data could not be found</span>
1330039 <span class="comment">%</span>
1340040 <span class="comment">%  NOTE</span>
1350041 <span class="comment">%  1. If the inputs are cell arrays, then the output is a cell array</span>
1360042 <span class="comment">%  2. If Family is a cell array, then DeviceList must also be a cell array,</span>
1370043 <span class="comment">%     however, Field1 or Field2 can either be a cell array array or a string.</span>
1380044 <span class="comment">%</span>
1390045 <span class="comment">%  EXAMPLES</span>
1400046 <span class="comment">%  1. getfamilydata('BPMx')</span>
1410047 <span class="comment">%  2. getfamilydata('BPMx','Monitor')</span>
1420048 <span class="comment">%  3. getfamilydata('BPMx','Monitor','Units')</span>
1430049 <span class="comment">%  4. getfamilydata('HCOR', 'Status')</span>
1440050 <span class="comment">%</span>
1450051 <span class="comment">%  See Also setfamilydata</span>
1460052
1470053 <span class="comment">%</span>
1480054 <span class="comment">%  Written by Gregory J. Portmann</span>
1490055 <span class="comment">%  Modified by Laurent S. Nadolski</span>
1500056
1510057 <span class="keyword">if</span> nargin == 0
1520058     Data = getappdata(0, <span class="string">'AcceleratorObjects'</span>);
1530059     <span class="keyword">return</span>
1540060 <span class="keyword">end</span>
1550061
1560062 <span class="comment">% Cell array input</span>
1570063 <span class="keyword">if</span> iscell(Family)
1580064     <span class="keyword">if</span> nargin &gt;= 2
1590065         <span class="keyword">if</span> iscell(Field1)
1600066             <span class="keyword">if</span> length(Family) ~= length(Field1)
1610067                 error(<span class="string">'If Field1 is a cell array, then it must be the same size as Family.'</span>);
1620068             <span class="keyword">end</span>
1630069         <span class="keyword">end</span>
1640070     <span class="keyword">end</span>
1650071     <span class="keyword">if</span> nargin &gt;= 3
1660072         <span class="keyword">if</span> iscell(Field2)
1670073             <span class="keyword">if</span> length(Family) ~= length(Field2)
1680074                 error(<span class="string">'If Field2 is a cell array, then it must be the same size as Family.'</span>);
1690075             <span class="keyword">end</span>
1700076         <span class="keyword">end</span>
1710077     <span class="keyword">end</span>
1720078     <span class="keyword">if</span> nargin &gt;= 4
1730079         <span class="keyword">if</span> ~iscell(DeviceList)
1740080             error(<span class="string">'If family is a cell array, then DeviceList must be a cell array.'</span>);
1750081         <span class="keyword">end</span>
1760082         <span class="keyword">if</span> length(Family) ~= length(DeviceList)
1770083             error(<span class="string">'Family and DeviceList must be the same size cell arrays.'</span>);
1780084         <span class="keyword">end</span>
1790085     <span class="keyword">end</span>
1800086     
1810087     <span class="keyword">for</span> i = 1:length(Family)
1820088         <span class="keyword">if</span> nargin == 1
1830089             [Data{i}, ErrorFlag{i}] = <a href="getfamilydata.html" class="code" title="function [Data, ErrorFlag] = getfamilydata(Family, Field1, Field2, DeviceList)">getfamilydata</a>(Family{i});
1840090         <span class="keyword">elseif</span> nargin == 2
1850091             <span class="keyword">if</span> iscell(Field1)
1860092                 [Data{i}, ErrorFlag{i}] = <a href="getfamilydata.html" class="code" title="function [Data, ErrorFlag] = getfamilydata(Family, Field1, Field2, DeviceList)">getfamilydata</a>(Family{i}, Field1{i});
1870093             <span class="keyword">else</span>
1880094                 [Data{i}, ErrorFlag{i}] = <a href="getfamilydata.html" class="code" title="function [Data, ErrorFlag] = getfamilydata(Family, Field1, Field2, DeviceList)">getfamilydata</a>(Family{i}, Field1);
1890095             <span class="keyword">end</span>
1900096         <span class="keyword">elseif</span> nargin == 3
1910097             <span class="keyword">if</span> iscell(Field1)
1920098                 <span class="keyword">if</span> iscell(Field2)
1930099                     [Data{i}, ErrorFlag{i}] = <a href="getfamilydata.html" class="code" title="function [Data, ErrorFlag] = getfamilydata(Family, Field1, Field2, DeviceList)">getfamilydata</a>(Family{i}, Field1{i}, Field2{i});
1940100                 <span class="keyword">else</span>
1950101                     [Data{i}, ErrorFlag{i}] = <a href="getfamilydata.html" class="code" title="function [Data, ErrorFlag] = getfamilydata(Family, Field1, Field2, DeviceList)">getfamilydata</a>(Family{i}, Field1{i}, Field2);
1960102                 <span class="keyword">end</span>               
1970103             <span class="keyword">else</span>
1980104                 <span class="keyword">if</span> iscell(Field2)
1990105                     [Data{i}, ErrorFlag{i}] = <a href="getfamilydata.html" class="code" title="function [Data, ErrorFlag] = getfamilydata(Family, Field1, Field2, DeviceList)">getfamilydata</a>(Family{i}, Field1, Field2{i});
2000106                 <span class="keyword">else</span>
2010107                     [Data{i}, ErrorFlag{i}] = <a href="getfamilydata.html" class="code" title="function [Data, ErrorFlag] = getfamilydata(Family, Field1, Field2, DeviceList)">getfamilydata</a>(Family{i}, Field1, Field2);
2020108                 <span class="keyword">end</span>               
2030109             <span class="keyword">end</span>
2040110         <span class="keyword">else</span>
2050111             <span class="keyword">if</span> iscell(Field1)
2060112                 <span class="keyword">if</span> iscell(Field2)
2070113                     [Data{i}, ErrorFlag{i}] = <a href="getfamilydata.html" class="code" title="function [Data, ErrorFlag] = getfamilydata(Family, Field1, Field2, DeviceList)">getfamilydata</a>(Family{i}, Field1{i}, Field2{i}, DeviceList{i});
2080114                 <span class="keyword">else</span>
2090115                     [Data{i}, ErrorFlag{i}] = <a href="getfamilydata.html" class="code" title="function [Data, ErrorFlag] = getfamilydata(Family, Field1, Field2, DeviceList)">getfamilydata</a>(Family{i}, Field1{i}, Field2, DeviceList{i});
2100116                 <span class="keyword">end</span>               
2110117             <span class="keyword">else</span>
2120118                 <span class="keyword">if</span> iscell(Field2)
2130119                     [Data{i}, ErrorFlag{i}] = <a href="getfamilydata.html" class="code" title="function [Data, ErrorFlag] = getfamilydata(Family, Field1, Field2, DeviceList)">getfamilydata</a>(Family{i}, Field1, Field2{i}, DeviceList{i});
2140120                 <span class="keyword">else</span>
2150121                     [Data{i}, ErrorFlag{i}] = <a href="getfamilydata.html" class="code" title="function [Data, ErrorFlag] = getfamilydata(Family, Field1, Field2, DeviceList)">getfamilydata</a>(Family{i}, Field1, Field2, DeviceList{i});
2160122                 <span class="keyword">end</span>               
2170123             <span class="keyword">end</span>
2180124         <span class="keyword">end</span>
2190125     <span class="keyword">end</span>
2200126     <span class="keyword">return</span>   
2210127 <span class="keyword">end</span>  <span class="comment">% End cell inputs</span>
2220128
2230129
2240130 <span class="comment">%%%%%%%%%%%%%%%%%%%%%%%%%%</span>
2250131 <span class="comment">% Non-cell getfamilydata %</span>
2260132 <span class="comment">%%%%%%%%%%%%%%%%%%%%%%%%%%</span>
2270133 ErrorFlag = 0;
2280134
2290135 [FamilyIndex, AO] = <a href="isfamily.html" class="code" title="function  [FamilyFlag, AO] = isfamily(Family, Field)">isfamily</a>(Family);
2300136 <span class="keyword">if</span> FamilyIndex
2310137     <span class="keyword">if</span> nargin == 1
2320138         Data = AO;
2330139         <span class="keyword">return</span>
2340140     <span class="keyword">end</span>
2350141 <span class="keyword">else</span>
2360142     <span class="comment">% Check the AD</span>
2370143     AD = <a href="getad.html" class="code" title="function  AD = getad">getad</a>;
2380144     <span class="keyword">if</span> isfield(AD, Family)
2390145         Data = AD.(Family);
2400146     <span class="keyword">else</span>
2410147         Data = [];
2420148         ErrorFlag = 1;   
2430149         <span class="keyword">return</span>
2440150     <span class="keyword">end</span> 
2450151     <span class="keyword">if</span> nargin &gt; 1
2460152         <span class="keyword">if</span> isfield(Data, Field1)
2470153             Data = Data.(Field1);
2480154         <span class="keyword">else</span>
2490155             Data = [];
2500156             ErrorFlag = 1;   
2510157         <span class="keyword">end</span>
2520158     <span class="keyword">end</span>
2530159     <span class="keyword">if</span> nargin &gt; 2
2540160         <span class="keyword">if</span> isfield(Data, Field2)
2550161             Data = Data.(Field2);
2560162         <span class="keyword">else</span>
2570163             Data = [];
2580164             ErrorFlag = 1;   
2590165         <span class="keyword">end</span>
2600166     <span class="keyword">end</span>
2610167     <span class="keyword">return</span>
2620168 <span class="keyword">end</span>
2630169
2640170
2650171 <span class="comment">% Select field1</span>
2660172 <span class="keyword">if</span> isfield(AO, Field1)
2670173     Data = AO.(Field1);
2680174 <span class="keyword">else</span>
2690175     Data = [];
2700176     ErrorFlag = 1;
2710177     <span class="keyword">return</span>
2720178 <span class="keyword">end</span>
2730179 <span class="keyword">if</span> nargin == 2
2740180     <span class="keyword">return</span>
2750181 <span class="keyword">end</span>
2760182
2770183 <span class="comment">% Select field2 or field2 maybe a devicelist</span>
2780184 <span class="keyword">if</span> nargin == 3
2790185     <span class="keyword">if</span> isstr(Field2)
2800186         <span class="keyword">if</span> isfield(Data, Field2)
2810187             Data = Data.(Field2);
2820188         <span class="keyword">else</span>
2830189             Data = [];
2840190             ErrorFlag = 1;
2850191         <span class="keyword">end</span>
2860192         <span class="keyword">return</span>
2870193     <span class="keyword">else</span>
2880194         DeviceList = Field2;
2890195     <span class="keyword">end</span>
2900196 <span class="keyword">end</span>
2910197
2920198 <span class="comment">% Select field2</span>
2930199 <span class="keyword">if</span> nargin &gt;= 4
2940200     <span class="keyword">if</span> isfield(Data, Field2)
2950201         Data = Data.(Field2);
2960202     <span class="keyword">else</span>
2970203         Data = [];
2980204         ErrorFlag = 1;
2990205         <span class="keyword">return</span>
3000206     <span class="keyword">end</span>
3010207 <span class="keyword">end</span>
3020208
3030209
3040210 <span class="comment">% If you made it to here, DeviceList must exist</span>
3050211 <span class="keyword">if</span> isempty(DeviceList)
3060212     DeviceList = <a href="family2dev.html" class="code" title="function DeviceList = family2dev(Family, varargin);">family2dev</a>(Family);
3070213 <span class="keyword">end</span>
3080214 <span class="keyword">if</span> (size(DeviceList,2) == 1) <span class="comment">%Elementlist</span>
3090215     DeviceList = <a href="elem2dev.html" class="code" title="function Output = elem2dev(Family, ElementList)">elem2dev</a>(Family, DeviceList);
3100216 <span class="keyword">end</span>
3110217
3120218 DeviceListTotal = AO.DeviceList;
3130219 <span class="comment">%DeviceListTotal = family2dev(Family, 0);</span>
3140220
3150221 <span class="keyword">if</span> iscell(Data)
3160222     <span class="keyword">if</span> size(Data,1) == 1
3170223         <span class="comment">% For each cell array determine what rows needs to be altered</span>
3180224         <span class="keyword">for</span> i = 1:size(Data,2)
3190225             Data{i} = <a href="#_sub1" class="code" title="subfunction Data = sortdatabydevicelist(Data, DeviceList, DeviceListTotal)">sortdatabydevicelist</a>(Data{i}, DeviceList, DeviceListTotal);
3200226         <span class="keyword">end</span>
3210227         <span class="keyword">return</span>
3220228     <span class="keyword">elseif</span> size(Data,1) == size(DeviceListTotal,1)
3230229         <span class="comment">% Cell matrix is Ok (but not recommended)</span>
3240230     <span class="keyword">else</span>
3250231         error(sprintf(<span class="string">'Number of rows in AO field must be 1 or equal to the number of rows in AO{}.DeviceList.'</span>));
3260232     <span class="keyword">end</span>
3270233 <span class="keyword">elseif</span> isstruct(Data)
3280234     error(<span class="string">'Structure AO fields can not be indexed by a DeviceList.'</span>);   
3290235 <span class="keyword">end</span>
3300236
3310237 Data = <a href="#_sub1" class="code" title="subfunction Data = sortdatabydevicelist(Data, DeviceList, DeviceListTotal)">sortdatabydevicelist</a>(Data, DeviceList, DeviceListTotal);
3320238
3330239 <span class="comment">%%----------------------------------------------------------------------</span>
3340240 <a name="_sub1" href="#_subfunctions" class="code">function Data = sortdatabydevicelist(Data, DeviceList, DeviceListTotal)</a>
3350241
3360242 <span class="comment">% Data should be equal to the number of row in DeviceListTotal or be one row</span>
3370243 <span class="keyword">if</span> size(DeviceListTotal,1) ~= size(Data,1)
3380244     <span class="keyword">if</span> size(Data,1) == 1
3390245         <span class="comment">% All the rows of output data will be the same</span>
3400246         <span class="keyword">if</span> iscell(Data)
3410247             <span class="comment">% This will make a cell matrix which we decided not a allow</span>
3420248             fprintf(<span class="string">'   When using a 1 row cell array, Instead of using a cell matrix, use a cell row.\n'</span>)
3430249             error(<span class="string">'Cell matrix error'</span>)
3440250             
3450251             <span class="comment">% Repeat the 1 row Data cell array as many times as in the rows of DeviceListTotal</span>
3460252             Data1 = Data;
3470253             Data = cell(size(DeviceList,1), size(Data1,2));
3480254             <span class="keyword">for</span> i = 1:size(Data1,2)
3490255                 Data(:,i) = Data1(1,i);
3500256             <span class="keyword">end</span>
3510257             
3520258         <span class="keyword">elseif</span> isstr(Data)
3530259             <span class="comment">% Repeat the one row string as many times as in the rows of DeviceListTotal</span>
3540260             DataStr = Data;
3550261             Data = [];
3560262             <span class="keyword">for</span> i = 1:size(DeviceList,1)
3570263                 Data = [Data; DataStr];
3580264             <span class="keyword">end</span>
3590265             
3600266         <span class="keyword">else</span>
3610267             <span class="comment">% Repeat the one row Data vector as many times as in the rows of DeviceListTotal</span>
3620268             Data = ones(size(DeviceList,1),1) * Data;
3630269         <span class="keyword">end</span>       
3640270     <span class="keyword">else</span>
3650271         error(sprintf(<span class="string">'Number of rows in AO field must be 1 or equal to the number of rows in AO{}.DeviceList.'</span>));
3660272     <span class="keyword">end</span>   
3670273     <span class="keyword">return</span>
3680274 <span class="keyword">end</span>
3690275
3700276
3710277 [DeviceIndex, iNotFound] = findrowindex(DeviceList, DeviceListTotal);
3720278 <span class="keyword">if</span> ~isempty(iNotFound)
3730279     ErrorFlag = 1;
3740280     <span class="keyword">for</span> i = 1:length(iNotFound)
3750281         fprintf(<span class="string">'   Can''t find (%d,%d) device in DeviceList.\n'</span>, DeviceList(iNotFound(i),1), DeviceList(iNotFound(i),2));
3760282     <span class="keyword">end</span>
3770283     error(sprintf(<span class="string">'%d Devices not found'</span>, length(iNotFound)));
3780284 <span class="keyword">end</span>
3790285 Data = Data(DeviceIndex,:);
3800286
3810287 <span class="comment">% % Intersect removes duplicate devices so first store index of how to unsort in j_unique</span>
3820288 <span class="comment">% DeviceListOld = DeviceList;</span>
3830289 <span class="comment">% [DeviceList, i_unique, j_unique] = unique(DeviceList, 'rows');</span>
3840290 <span class="comment">%</span>
3850291 <span class="comment">% % Find the indexes in the full device list (reorder and remove duplicates)</span>
3860292 <span class="comment">% [DeviceList, ii, DeviceIndex] = intersect(DeviceList, DeviceListTotal, 'rows');</span>
3870293 <span class="comment">% if size(DeviceList,1) ~= size(DeviceListOld,1)</span>
3880294 <span class="comment">%     % All devices must exist (duplicate devices ok)</span>
3890295 <span class="comment">%     [DeviceListNotFound, iNotFound] = setdiff(DeviceListOld, DeviceListTotal, 'rows');</span>
3900296 <span class="comment">%     if length(iNotFound) &gt; 0</span>
3910297 <span class="comment">%         % Device not found</span>
3920298 <span class="comment">%         for i = 1:length(iNotFound)</span>
3930299 <span class="comment">%             fprintf('   No devices to get for Family %s(%d,%d)\n', AO.FamilyName, DeviceListNotFound(i,1), DeviceListNotFound(i,2));</span>
3940300 <span class="comment">%         end</span>
3950301 <span class="comment">%         error(sprintf('%d Devices not found', length(iNotFound)));</span>
3960302 <span class="comment">%     end</span>
3970303 <span class="comment">% end</span>
3980304 <span class="comment">%</span>
3990305 <span class="comment">% % DataType='vector' only has one FamilyName and handle for a multiple element DeviceList</span>
4000306 <span class="comment">% % Hence, Data could have one row for a many rowed DeviceList.  To deal with this only index</span>
4010307 <span class="comment">% % by DeviceIndex if Data has more than one row.</span>
4020308 <span class="comment">% if size(Data,1) &gt; 1</span>
4030309 <span class="comment">%     Data = Data(DeviceIndex,:);     % Only data referenced to DeviceList</span>
4040310 <span class="comment">%     Data = Data(j_unique,:);        % Reorder and add multiple elements back</span>
4050311 <span class="comment">% end</span></pre></div>
406<hr><address>Generated on Mon 21-May-2007 15:29:18 by <strong><a href="http://www.artefact.tk/software/matlab/m2html/">m2html</a></strong> &copy; 2003</address>
407</body>
408</html>
Note: See TracBrowser for help on using the repository browser.