0
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 1 % PARAMVALUE object class constructor.
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 3 %
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 4 % DESCRIPTION: Parameter value object class constructor.
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 5 % Create a parameter value object.
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 6 %
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 7 % SUPERCLASSES: ltpda_nuo < ltpda_obj
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 8 %
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 9 % CONSTRUCTORS:
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 10 %
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 11 % p = paramValue(); - creates an empty parameter value
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 12 % p = paramVAlue(pl) - creates a parameter value from a
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 13 % parameter list with the keys:
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 14 % 'valIndex', 'options' and 'selection'
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 15 % p = paramValue(valIdx, ...
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 16 % options) - creates a parameter value from
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 17 % value index and the options
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 18 % p = paramValue(valIdx, ...
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 19 % options, ...
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 20 % selectionMode) - creates a parameter value from
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 21 % value index, options and
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 22 % selection mode.
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 23 %
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 24 % VERSION: $Id: paramValue.m,v 1.29 2011/04/07 11:01:28 ingo Exp $
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 25 %
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 26 % SEE ALSO: ltpda_obj, ltpda_nuo, param, plist
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 27 %
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 28 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 29
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 30 classdef (Sealed = true, Hidden = true) paramValue < ltpda_nuo
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 31
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 32 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 33 % Property definition %
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 34 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 35
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 36 %---------- Public (read/write) Properties ----------
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 37 properties
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 38 end
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 39
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 40 %---------- Protected read-only Properties ----------
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 41 properties (SetAccess = protected)
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 42 valIndex = -1; % Index to the value inside 'options'
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 43 options = {}; % Possible values for 'val' if they exist
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 44 selection = 0; % Selection mode for the 'options'
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 45 property = struct([]); % A list which contains all additional infromation about the value like: min, max, ...
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 46 end
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 47
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 48 %---------- Protected Properties ----------
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 49 properties (SetAccess = protected)
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 50 end
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 51
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 52 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 53 % Check property setting %
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 54 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 55
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 56 methods
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 57 function set.valIndex(obj, val)
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 58 if isnumeric(val)
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 59 obj.valIndex = val;
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 60 else
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 61 error('### The value for the property ''valIndex'' must be a index (Interger) to the options. The value is from the class %s', class(val));
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 62 end
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 63 end
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 64 function set.options(obj, val)
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 65 if iscell(val)
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 66 obj.options = val;
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 67 else
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 68 error('### The value for the property ''options'' must be a cell with all possible values. The value is from the class %s', class(val));
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 69 end
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 70 end
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 71 function set.selection(obj, val)
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 72 if isnumeric(val)
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 73 obj.selection = val;
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 74 else
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 75 error('### The value for the property ''selection'' must be a Interger. The value is from the class %s', class(val));
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 76 end
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 77 end
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 78 end
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 79
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 80 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 81 % Constructor %
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 82 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 83
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 84 methods
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 85 function obj = paramValue(varargin)
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 86
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 87 switch nargin
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 88 case 0
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 89 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 90 %%%%%%%%%%%%%%%%%%%%%%%%%%% no input %%%%%%%%%%%%%%%%%%%%%%%%%%%%
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 91 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 92
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 93 % Do nothing
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 94
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 95 case 1
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 96 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 97 %%%%%%%%%%%%%%%%%%%%%%%%%%% one input %%%%%%%%%%%%%%%%%%%%%%%%%%%
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 98 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 99
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 100 if isa(varargin{1}, 'paramValue')
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 101 %%%%%%%%%% obj = paramValue(paramValue) %%%%%%%%%%
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 102 obj = copy(varargin{1}, 1);
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 103
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 104 elseif isa(varargin{1}, 'plist')
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 105 %%%%%%%%%% obj = paramValue(plist) %%%%%%%%%%
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 106
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 107 if nparams(varargin{1}) == 0
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 108 %%%%%%%%%% obj = paramValue(plist()) %%%%%%%%%%
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 109 %%% is the plist is empty then return an empty paramValue object
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 110
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 111 else
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 112 %%%%%%%%%% pl = plist('valIndex', 1, 'OPTIONS', {'a', 'b'}, 'SELECTION', 0) %%%%%%%%%%
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 113 %%%%%%%%%% obj = paramValue(pl) %%%%%%%%%%
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 114 pl = varargin{1};
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 115 pl_valIndex = pl.find('valIndex');
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 116 pl_options = pl.find('options');
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 117 pl_selection = pl.find('selection');
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 118
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 119 % Set the value index to 1 if there is only one option.
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 120 if isempty(pl_valIndex) && numel(pl_options) == 1
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 121 pl_valIndex = 1;
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 122 end
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 123
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 124 if isempty(pl_valIndex)
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 125 error('### building a parameter from a plist requires one value index in the plist is called ''valIndex''');
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 126 end
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 127 if isempty(pl_options)
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 128 error('### building a parameter from a plist requires at least one option in the plist is calles ''options''');
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 129 end
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 130
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 131 obj.valIndex = pl_valIndex;
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 132 obj.options = pl_options;
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 133 if ~isempty(pl_selection)
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 134 obj.selection = pl_selection;
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 135 end
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 136 end
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 137
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 138 elseif isstruct(varargin{1})
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 139 %%%%%%%%%% obj = paramValue(struct) %%%%%%%%%%
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 140 obj = fromStruct(obj, varargin{1});
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 141
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 142 else
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 143 error('### Unknown single input paramValue constructor');
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 144 end
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 145
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 146 case 2
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 147 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 148 %%%%%%%%%%%%%%%%%%%%%%%%%%% two inputs %%%%%%%%%%%%%%%%%%%%%%%%%%
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 149 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 150
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 151 %%%%%%%%%% obj = paramValue(valIndex, {options}) %%%%%%%%%%
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 152 obj.valIndex = varargin{1};
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 153 obj.options = varargin{2};
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 154
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 155 case 3;
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 156 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 157 %%%%%%%%%%%%%%%%%%%%%%%%%% three inputs %%%%%%%%%%%%%%%%%%%%%%%%%
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 158 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 159
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 160 %%%%%%%% obj = paramValue(valIndex, {options}, selection) %%%%%%%%
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 161 obj.valIndex = varargin{1};
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 162 obj.options = varargin{2};
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 163 if varargin{3} ~= obj.selection
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 164 obj.selection = varargin{3};
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 165 end
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 166 otherwise
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 167 error('### Unknown number of arguments.');
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 168 end
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 169
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 170 % Plausibility check.
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 171 if ~(obj.valIndex <= numel(obj.options))
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 172 error('### The valIndex must point to one element inside the ''options''. But valIndex is %d and the length of ''options'' is %d', obj.valIndex, numel(obj.options));
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 173 end
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 174
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 175 end
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 176 end
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 177
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 178
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 179 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 180 % Methods (public) %
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 181 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 182
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 183 methods
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 184 %%% Define Abstract methods
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 185 varargout = char(varargin)
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 186 varargout = copy(varargin)
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 187 varargout = display(varargin)
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 188
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 189 varargout = getVal(varargin)
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 190 varargout = getOptions(varargin)
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 191
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 192 varargout = setValIndex(varargin)
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 193 varargout = setValIndexAndOptions(varargin)
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 194 varargout = setOptions(varargin)
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 195 varargout = setSelection(varargin)
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 196
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 197 varargout = setProperty(varargin)
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 198 varargout = getProperty(varargin)
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 199 end
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 200
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 201 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 202 % Methods (protected) %
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 203 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 204
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 205 methods (Access = protected)
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 206 varargout = fromStruct(varargin)
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 207 end
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 208
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 209 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 210 % Methods (private) %
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 211 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 212
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 213 methods (Access = private)
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 214 end
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 215
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 216 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 217 % Methods (Static, Public) %
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 218 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 219
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 220 methods (Static = true)
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 221
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 222
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 223 % Param Value types
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 224 function out = EMPTY_STRING
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 225 out = '';
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 226 end
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 227 function out = EMPTY_DOUBLE
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 228 out = [];
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 229 end
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 230 function out = EMPTY_CELL
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 231 out = {};
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 232 end
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 233
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 234 function out = YES_NO
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 235 out = {1, {'yes', 'no'}, paramValue.SINGLE};
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 236 end
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 237 function out = NO_YES
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 238 out = {1, {'no', 'yes'}, paramValue.SINGLE};
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 239 end
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 240
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 241 function out = DATA_TYPES
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 242 out = {4,{'tsdata', 'fsdata', 'xydata', 'cdata'}, paramValue.SINGLE};
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 243 end
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 244
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 245 function out = WINDOW
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 246 prefs = getappdata(0, 'LTPDApreferences');
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 247 dwin = find(strcmpi(char(prefs.getMiscPrefs.getDefaultWindow), specwin.getTypes));
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 248 out = {dwin, specwin.getTypes, paramValue.SINGLE};
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 249 end
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 250
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 251 function out = STRING_VALUE(s)
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 252 out = {1, {s}, paramValue.OPTIONAL};
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 253 end
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 254
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 255 function out = DOUBLE_VALUE(v)
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 256 out = {1, {v}, paramValue.OPTIONAL};
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 257 end
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 258
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 259 function out = DETREND_ORDER
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 260 out = {1, {-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9}, paramValue.SINGLE};
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 261 end
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 262
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 263 function out = TRUE_FALSE
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 264 out = {1, {true, false}, paramValue.SINGLE};
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 265 end
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 266
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 267 function out = FALSE_TRUE
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 268 out = {1, {false, true}, paramValue.SINGLE};
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 269 end
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 270
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 271 function out = TIMEFORMAT
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 272 prefs = getappdata(0, 'LTPDApreferences');
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 273 tf = {...
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 274 'dd-mm-yyyy HH:MM:SS', ...
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 275 'yyyy-mm-dd HH:MM:SS', ...
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 276 'dd-mm-yyyy HH:MM:SS.FFF', ...
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 277 'yyyy-mm-dd HH:MM:SS.FFF', ...
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 278 'HH:MM:SS dd-mm-yyyy', ...
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 279 'HH:MM:SS yyyy-mm-dd', ...
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 280 'HH:MM:SS.FFF dd-mm-yyyy', ...
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 281 'HH:MM:SS.FFF yyyy-mm-dd', ...
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 282 'dd.mm.yyyy HH:MM:SS', ...
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 283 'yyyy.mm.dd HH:MM:SS', ...
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 284 'dd.mm.yyyy HH:MM:SS.FFF', ...
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 285 'yyyy.mm.dd HH:MM:SS.FFF', ...
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 286 'HH:MM:SS dd.mm.yyyy', ...
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 287 'HH:MM:SS yyyy.mm.dd', ...
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 288 'HH:MM:SS.FFF dd.mm.yyyy', ...
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 289 'HH:MM:SS.FFF yyyy.mm.dd', ...
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 290 'MM:SS', ...
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 291 'MM:SS.FFF'};
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 292
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 293 idx = find(strcmp(char(prefs.getTimePrefs.getTimestringFormat), tf));
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 294 if isempty(idx)
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 295 tf = [{char(prefs.getTimePrefs.getTimestringFormat)} tf];
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 296 idx = 1;
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 297 end
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 298 out = {idx, tf, paramValue.OPTIONAL};
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 299 end
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 300
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 301 function out = TIMEZONE
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 302 prefs = getappdata(0, 'LTPDApreferences');
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 303 tz = utils.timetools.getTimezone;
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 304
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 305 idx = find(strcmp(prefs.getTimePrefs.getTimeTimezone(), tz));
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 306 out = {idx, tz, paramValue.SINGLE};
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 307 end
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 308
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 309 function res = OPTIONAL(); res = 0; end
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 310 function res = SINGLE(); res = 1; end
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 311 function res = MULTI(); res = 2; end
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 312 function str = getSelectionMode(val)
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 313 switch val
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 314 case 0
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 315 str = 'OPTIONAL';
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 316 case 1
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 317 str = 'SINGLE';
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 318 case 2
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 319 str = 'MULTI';
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 320 otherwise
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 321 str = '''selection'' is not valid!';
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 322 end
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 323 end
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 324
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 325 varargout = update_struct(varargin);
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 326
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 327 function out = VEROUT()
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 328 out = '$Id: paramValue.m,v 1.29 2011/04/07 11:01:28 ingo Exp $';
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 329 end
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 330
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 331 function ii = getInfo(varargin)
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 332 ii = utils.helper.generic_getInfo(varargin{:}, 'paramValue');
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 333 end
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 334
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 335 function out = SETS()
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 336 out = {'Default'};
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 337 end
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 338
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 339 function out = getDefaultPlist(set)
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 340 switch lower(set)
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 341 case 'default'
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 342 out = plist();
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 343 otherwise
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 344 error('### Unknown set [%s]', set');
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 345 end
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 346 end
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 347
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 348 function obj = initObjectWithSize(n,m)
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 349 obj = paramValue.newarray([n m]);
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 350 end
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 351
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 352 end
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 353
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 354 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 355 % Methods (Static, Private) %
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 356 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 357
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 358 methods (Static = true, Access = private)
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 359 end
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 360
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 361 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 362 % Methods (static, hidden) %
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 363 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 364
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 365 methods (Static = true, Hidden = true)
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 366 varargout = loadobj(varargin)
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 367 end
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 368
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 369 end
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
+ − 370