MasterScan
Lab_Matlab_control Master Branch
|
Superclass for all of the fundamental Tower of Psych classes.
The topsFoundation superclass provides a common interface for Tower of Psych classes. This includes naming, cell array manipulation, and generating graphical interfaces.
Properties and Events | |
Property | name = '' |
a string name to indentify the object | |
Property | clockFunction =@topsClock |
clock function, to standardize | |
Methods | |
self | topsFoundation (name) |
Constuct with name optional. More... | |
fig | gui (self) |
Open a GUI to view object details. More... | |
p | guiPanel (self, varargin) |
Make a topsDetailPanel with details about this object. More... | |
Static Methods | |
static c index | cellAdd (c, item, index) |
Add an item to a cell array. More... | |
static selector | cellContains (c, item) |
Does a cell array conatin an item? More... | |
static c | cellRemoveItem (c, item) |
Remove an item from a cell array. More... | |
static c | cellRemoveElement (c, index) |
Remove indexed elements from a cell array. More... | |
static index selector | findStructName (s, name) |
Where is the given name in the given struct array? More... | |
self topsFoundation | ( | name | ) |
Constuct with name optional.
name | optional name for this object |
If name is provided, assigns name to this object.
fig gui | ( | self | ) |
Open a GUI to view object details.
Opens a new GUI with components suitable for viewing objects of this class. Returns a topsFigure object which contains the GUI.
p guiPanel | ( | self | , |
varargin | |||
) |
Make a topsDetailPanel with details about this object.
parentGUI | a topsGUI to contain the new panel |
position | optional normalized [x y w h] where to locate the new panel within parentGUI |
Subclasses may overrride to return a specific topsDetailPanel subclass, or let topsFoundataion generate a generic topsValuePanel.
|
static |
Add an item to a cell array.
c | a cell array |
item | any item to add to the cell array c |
index | optional index where to insert item |
add() inserts item into c at the given index. If no index is given, add() appends item to the end of c.
Returns the modified cell array c. May also return the index into c where item was inserted.
|
static |
Does a cell array conatin an item?
c | a cell array |
item | any item that might be in c |
Returns a logical array the same size as c, which is true where elements of c are equal to item.
cellContains() compares items for equality using Matlab's built-in eq() when it can, or else isequal().
|
static |
Remove an item from a cell array.
c | a cell array |
item | an item to remove from c |
Removes all elements of c that are equal to the given item.
Returns the modified cell array, c.
|
static |
Remove indexed elements from a cell array.
c | a cell array |
index | index of the element or elements to remove |
Removes the indexed element or elements of c.
Returns the modified cell array, c.
|
static |
Where is the given name in the given struct array?
s | a struct array with a "name" field |
a | "name" value that might be in the struct array |
Assumes that s is a struct array with a "name" field. Searches the elements of s for the given name. Returns the index of the first occurence of name. If name was not found, returns numel(s) plus 1. Returns as a second output a logical selector for the elements of s, set to true where name was found.