>> help isfield
 ISFIELD True if field is in structure array.
    F = ISFIELD(S,'field') returns true if 'field' is the name of a field
    in the structure array S.
 
    See also GETFIELD, SETFIELD, FIELDNAMES, ORDERFIELDS, RMFIELD, ISSTRUCT.

    Overloaded functions or methods (ones with the same name in other directories)
       help fighandle/isfield.m

>> help getfield
 GETFIELD Get structure field contents.
    F = GETFIELD(S,'field') returns the contents of the specified
    field.  This is equivalent to the syntax F = S.field.
    S must be a 1-by-1 structure.  
 
    F = GETFIELD(S,{i,j},'field',{k}) is equivalent to the syntax
         F = S(i,j).field(k).  
 
    In other words, F = GETFIELD(S,sub1,sub2,...)  returns the
    contents of the structure S using the subscripts or field
    references specified in sub1,sub2,etc.  Each set of subscripts in
    parentheses must be enclosed in a cell array and passed to
    GETFIELD as a separate input.  Field references are passed as
    strings.  
 
    Note that if the evaluation of the specified subscripts results
    in a comma separated list, then GETFIELD will return the value
    corresponding to the first element in the comma separated list.
 
    For improved performance, when getting the value of a simple 
    field, use <a href="matlab:helpview([docroot '/techdoc/matlab_prog/matlab_prog.map'],'dynamic_field_names')">dynamic field names</a>.
 
    See also SETFIELD, ISFIELD, FIELDNAMES, ORDERFIELDS, RMFIELD.

    Overloaded functions or methods (ones with the same name in other directories)
       help nn/getfield.m
       help nnlog/getfield.m

>> fig=figure
fig =
     1
>> addPanel("First one",1)
??? addPanel("First one",1)
             |
Error: Missing variable or function.

>> addPanel('First one',1)
??? Reference to non-existent field 'namesNoBlanks'.

Error in ==> addPanel at 22
  newPanel.button = uicontrol('Style','pushbutton',...

>> addPanel('First one',1)
??? Error using ==> uipanel
Bad value for uipanel property: 'Visible'.

Error in ==> addPanel at 29
  newPanel.panel = uipanel('Units','character',...

>> addPanel('First one','off')
ans = 
            name: 'First one'
    nameNoBlanks: 'Firstone'
          button: 1.0012
           panel: 2.0012
>> addPanel('Second one','on')
ans = 
1x2 struct array with fields:
    name
    nameNoBlanks
    button
    panel
>> u=get(gcf,'UserData')
u = 
    panelList: [1x2 struct]
>> u.panelList
ans = 
1x2 struct array with fields:
    name
    nameNoBlanks
    button
    panel
>> u.panelList(1)
ans = 
            name: 'First one'
    nameNoBlanks: 'Firstone'
          button: 1.0012
           panel: 2.0012
>> u.panelList(2)
ans = 
            name: 'Second one'
    nameNoBlanks: 'Secondone'
          button: 3.0012
           panel: 4.0012
>> ??? Input argument "visible" is undefined.

Error in ==> addPanel at 44
  set(newPanel.panel,'Tag',['Panel' newPanel.nameNoBlanks],'Visible',visible);

??? Error while evaluating uicontrol Callback.

??? Input argument "visible" is undefined.

Error in ==> addPanel at 44
  set(newPanel.panel,'Tag',['Panel' newPanel.nameNoBlanks],'Visible',visible);

??? Error while evaluating uicontrol Callback.

??? Input argument "visible" is undefined.

Error in ==> addPanel at 44
  set(newPanel.panel,'Tag',['Panel' newPanel.nameNoBlanks],'Visible',visible);

??? Error while evaluating uicontrol Callback.

??? Input argument "visible" is undefined.

Error in ==> addPanel at 44
  set(newPanel.panel,'Tag',['Panel' newPanel.nameNoBlanks],'Visible',visible);

??? Error while evaluating uicontrol Callback.

??? Input argument "visible" is undefined.

Error in ==> addPanel at 44
  set(newPanel.panel,'Tag',['Panel' newPanel.nameNoBlanks],'Visible',visible);

??? Error while evaluating uicontrol Callback.

??? Input argument "visible" is undefined.

Error in ==> addPanel at 44
  set(newPanel.panel,'Tag',['Panel' newPanel.nameNoBlanks],'Visible',visible);

??? Error while evaluating uicontrol Callback.

??? Input argument "visible" is undefined.

Error in ==> addPanel at 44
  set(newPanel.panel,'Tag',['Panel' newPanel.nameNoBlanks],'Visible',visible);

??? Error while evaluating uicontrol Callback.


>> get(gcf)
	Alphamap = [ (1 by 64) double array]
	BackingStore = on
	CloseRequestFcn = closereq
	Color = [0.8 0.8 0.8]
	Colormap = [ (64 by 3) double array]
	CurrentAxes = []
	CurrentCharacter = 
	CurrentObject = [1.00122]
	CurrentPoint = [0 0]
	DockControls = off
	DoubleBuffer = on
	FileName = 
	FixedColors = [ (12 by 3) double array]
	IntegerHandle = on
	InvertHardcopy = on
	KeyPressFcn = 
	MenuBar = figure
	MinColormap = [64]
	Name = 
	NextPlot = add
	NumberTitle = on
	PaperUnits = inches
	PaperOrientation = portrait
	PaperPosition = [0.25 2.5 8 6]
	PaperPositionMode = manual
	PaperSize = [8.5 11]
	PaperType = usletter
	Pointer = arrow
	PointerShapeCData = [ (16 by 16) double array]
	PointerShapeHotSpot = [1 1]
	Position = [119 516 560 420]
	Renderer = painters
	RendererMode = auto
	Resize = on
	ResizeFcn = 
	SelectionType = normal
	ShareColors = on
	ToolBar = auto
	Units = pixels
	WindowButtonDownFcn = 
	WindowButtonMotionFcn = 
	WindowButtonUpFcn = 
	WindowStyle = normal
	XDisplay = localhost:13.0
	XVisual = 0x28 (TrueColor, depth 24, RGB mask 0x00ff 0xff00 0xff0000)
	XVisualMode = auto

	BeingDeleted = off
	ButtonDownFcn = 
	Children = [ (19 by 1) double array]
	Clipping = on
	CreateFcn = 
	DeleteFcn = 
	BusyAction = queue
	HandleVisibility = on
	HitTest = on
	Interruptible = on
	Parent = [0]
	Selected = off
	SelectionHighlight = on
	Tag = 
	Type = figure
	UIContextMenu = []
	UserData = [ (1 by 1) struct array]
	Visible = on

>> get(gcf)
	Alphamap = [ (1 by 64) double array]
	BackingStore = on
	CloseRequestFcn = closereq
	Color = [0.8 0.8 0.8]
	Colormap = [ (64 by 3) double array]
	CurrentAxes = []
	CurrentCharacter = 
	CurrentObject = [1.00122]
	CurrentPoint = [0 0]
	DockControls = off
	DoubleBuffer = on
	FileName = 
	FixedColors = [ (12 by 3) double array]
	IntegerHandle = on
	InvertHardcopy = on
	KeyPressFcn = 
	MenuBar = figure
	MinColormap = [64]
	Name = 
	NextPlot = add
	NumberTitle = on
	PaperUnits = inches
	PaperOrientation = portrait
	PaperPosition = [0.25 2.5 8 6]
	PaperPositionMode = manual
	PaperSize = [8.5 11]
	PaperType = usletter
	Pointer = arrow
	PointerShapeCData = [ (16 by 16) double array]
	PointerShapeHotSpot = [1 1]
	Position = [119 516 560 420]
	Renderer = painters
	RendererMode = auto
	Resize = on
	ResizeFcn = 
	SelectionType = normal
	ShareColors = on
	ToolBar = auto
	Units = pixels
	WindowButtonDownFcn = 
	WindowButtonMotionFcn = 
	WindowButtonUpFcn = 
	WindowStyle = normal
	XDisplay = localhost:13.0
	XVisual = 0x28 (TrueColor, depth 24, RGB mask 0x00ff 0xff00 0xff0000)
	XVisualMode = auto

	BeingDeleted = off
	ButtonDownFcn = 
	Children = [ (19 by 1) double array]
	Clipping = on
	CreateFcn = 
	DeleteFcn = 
	BusyAction = queue
	HandleVisibility = on
	HitTest = on
	Interruptible = on
	Parent = [0]
	Selected = off
	SelectionHighlight = on
	Tag = 
	Type = figure
	UIContextMenu = []
	UserData = [ (1 by 1) struct array]
	Visible = on

>> 
>> set(gcf,'Units','characters')
>> get(gcf,'Position')
ans =
   19.6667   30.2941   93.3333   24.7059
>> close all
>> fig\figure
ans =
     1
>> 
>> close all
>> fig=figure
fig =
     1
>> addPanel('First one','off')
ans = 
            name: 'First one'
    nameNoBlanks: 'Firstone'
          button: 152.0012
           panel: 1.0018
>> addPanel('Second one','off')
ans = 
1x2 struct array with fields:
    name
    nameNoBlanks
    button
    panel
>> ??? Input argument "visible" is undefined.

Error in ==> addPanel at 48
  set(newPanel.panel,'Tag',['Panel' newPanel.nameNoBlanks],'Visible',visible);

??? Error while evaluating uicontrol Callback.

??? Input argument "visible" is undefined.

Error in ==> addPanel at 48
  set(newPanel.panel,'Tag',['Panel' newPanel.nameNoBlanks],'Visible',visible);

??? Error while evaluating uicontrol Callback.

close all
>> addPanel('First one','off')
ans = 
            name: 'First one'
    nameNoBlanks: 'Firstone'
          button: 152.0013
           panel: 1.0022
>> addPanel('Second one','off')
ans = 
1x2 struct array with fields:
    name
    nameNoBlanks
    button
    panel
>> panel = 
            name: 'First one'
    nameNoBlanks: 'Firstone'
          button: 152.0013
           panel: 1.0022
??? Attempt to reference field of non-structure array.

Error in ==> addPanel>expose at 96
set(panel.button,'BackgroundColor',[1 1 1]);

Error in ==> addPanel at 15
  expose(panel);

??? Error while evaluating uicontrol Callback.


>> dbstop if error
>> panel = 
            name: 'First one'
    nameNoBlanks: 'Firstone'
          button: 152.0013
           panel: 1.0022
??? Attempt to reference field of non-structure array.

Error in ==> addPanel>expose at 96
set(panel.button,'BackgroundColor',[1 1 1]);

96  set(panel.button,'BackgroundColor',[1 1 1]);
K>> panel
panel =
     []
K>> dbquit

>> close all
>> addPanel('First one','off')
ans = 
            name: 'First one'
    nameNoBlanks: 'Firstone'
          button: 152.0015
           panel: 1.0026
>> addPanel('Second one','off')
ans = 
1x2 struct array with fields:
    name
    nameNoBlanks
    button
    panel
>> p = 
            name: 'First one'
    nameNoBlanks: 'Firstone'
          button: 152.0015
           panel: 1.0026
obj =
  152.0015
panel = 
            name: 'First one'
    nameNoBlanks: 'Firstone'
          button: 152.0015
           panel: 1.0026
p = 
            name: 'Second one'
    nameNoBlanks: 'Secondone'
          button: 2.0023
           panel: 3.0022
obj =
  152.0015
??? Attempt to reference field of non-structure array.

Error in ==> addPanel>expose at 98
set(panel.button,'BackgroundColor',[1 1 1]);

98  set(panel.button,'BackgroundColor',[1 1 1]);
K>> dbquit

>> close all
>> addPanel('First one','off')
ans = 
            name: 'First one'
    nameNoBlanks: 'Firstone'
          button: 152.0016
           panel: 1.0029
>> addPanel('Second one','off')
ans = 
1x2 struct array with fields:
    name
    nameNoBlanks
    button
    panel
>> panel = 
            name: 'First one'
    nameNoBlanks: 'Firstone'
          button: 152.0016
           panel: 1.0029
??? Undefined variable "p" or class "p.panel".

Error in ==> addPanel>expose at 98
set(p.panel,'Visible','on');

98  set(p.panel,'Visible','on');
K>> dbquit

>> close all
>> addPanel('First one','off')
ans = 
            name: 'First one'
    nameNoBlanks: 'Firstone'
          button: 152.0017
           panel: 1.0033
>> addPanel('Second one','off')
ans = 
1x2 struct array with fields:
    name
    nameNoBlanks
    button
    panel
>> panel = 
            name: 'First one'
    nameNoBlanks: 'Firstone'
          button: 152.0017
           panel: 1.0033
panel = 
            name: 'Second one'
    nameNoBlanks: 'Secondone'
          button: 2.0028
           panel: 3.0027
panel = 
            name: 'First one'
    nameNoBlanks: 'Firstone'
          button: 152.0017
           panel: 1.0033
panel = 
            name: 'Second one'
    nameNoBlanks: 'Secondone'
          button: 2.0028
           panel: 3.0027
addPanel('thre','off')
ans = 
1x3 struct array with fields:
    name
    nameNoBlanks
    button
    panel
>> panel = 
            name: 'thre'
    nameNoBlanks: 'thre'
          button: 4.0023
           panel: 5.0023
panel = 
            name: 'Second one'
    nameNoBlanks: 'Secondone'
          button: 2.0028
           panel: 3.0027
panel = 
            name: 'First one'
    nameNoBlanks: 'Firstone'
          button: 152.0017
           panel: 1.0033

>> help isstring

isstring.m not found.

>> help ischar
 ISCHAR  True for character array (string).
    ISCHAR(S) returns 1 if S is a character array and 0 otherwise.
 
    See also CHAR, ISNUMERIC, ISLOGICAL, ISOBJECT, ISJAVA.

>> panel
??? Undefined function or variable 'panel'.

>> p=getUserData('panelList')
p = 
1x3 struct array with fields:
    name
    nameNoBlanks
    button
    panel
>> p(1).button
ans =
  152.0017
>> isnumeric(p(1).button)
ans =
     1
>> close all
>> addPanel('First one','off')
ans = 
            name: 'First one'
    nameNoBlanks: 'Firstone'
          button: 152.0018
           panel: 1.0037
>> addPanel('thre','off')
ans = 
1x2 struct array with fields:
    name
    nameNoBlanks
    button
    panel
>> ??? Error: File: /s/parsons/e/fac/anderson/res/eeg/Mindset/panels/pluggablePanels/makePanelVisible.m Line: 18 Column: 45
Missing variable or function.

??? Error while evaluating uicontrol Callback.


>> panel = 
            name: 'First one'
    nameNoBlanks: 'Firstone'
          button: 152.0018
           panel: 1.0037
??? Attempt to reference field of non-structure array.

Error in ==> makePanelVisible>expose at 35
set(panel.button,'BackgroundColor',[1 1 1]);

35  set(panel.button,'BackgroundColor',[1 1 1]);
K>> panel
panel =
     []
K>> dbquit

>> panel = 
            name: 'First one'
    nameNoBlanks: 'Firstone'
          button: 152.0018
           panel: 1.0037
panel = 
            name: 'thre'
    nameNoBlanks: 'thre'
          button: 2.0031
           panel: 3.0029
panel = 
            name: 'First one'
    nameNoBlanks: 'Firstone'
          button: 152.0018
           panel: 1.0037

>> quit
