annotate toolboxes/MIRtoolbox1.3.2/MIRToolbox/@mirscalar/mirscalar.m @ 0:e9a9cd732c1e tip

first hg version after svn
author wolffd
date Tue, 10 Feb 2015 15:05:51 +0000
parents
children
rev   line source
wolffd@0 1 function s = mirscalar(orig,varargin)
wolffd@0 2 % s = mirscalar(x,n) creates a scalar object
wolffd@0 3
wolffd@0 4 if nargin == 0
wolffd@0 5 orig = [];
wolffd@0 6 end
wolffd@0 7 if iscell(orig)
wolffd@0 8 orig = orig{1};
wolffd@0 9 end
wolffd@0 10 if isa(orig,'mirscalar')
wolffd@0 11 s.mode = orig.mode;
wolffd@0 12 s.legend = orig.legend;
wolffd@0 13 s.parameter = orig.parameter;
wolffd@0 14 else
wolffd@0 15 s.mode = [];
wolffd@0 16 s.legend = '';
wolffd@0 17 s.parameter = struct;
wolffd@0 18 end
wolffd@0 19 s = class(s,'mirscalar',mirdata(orig));
wolffd@0 20 s = purgedata(s);
wolffd@0 21 s = set(s,'Pos',{},'Abs','Temporal position of frames','Ord','Value',varargin{:});