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

initial commit to HG from Changeset: 646 (e263d8a21543) added further path and more save "camirversion.m"
author Daniel Wolff
date Fri, 19 Aug 2016 13:07:06 +0200
parents
children
rev   line source
Daniel@0 1 function s = mirscalar(orig,varargin)
Daniel@0 2 % s = mirscalar(x,n) creates a scalar object
Daniel@0 3
Daniel@0 4 if nargin == 0
Daniel@0 5 orig = [];
Daniel@0 6 end
Daniel@0 7 if iscell(orig)
Daniel@0 8 orig = orig{1};
Daniel@0 9 end
Daniel@0 10 if isa(orig,'mirscalar')
Daniel@0 11 s.mode = orig.mode;
Daniel@0 12 s.legend = orig.legend;
Daniel@0 13 s.parameter = orig.parameter;
Daniel@0 14 else
Daniel@0 15 s.mode = [];
Daniel@0 16 s.legend = '';
Daniel@0 17 s.parameter = struct;
Daniel@0 18 end
Daniel@0 19 s = class(s,'mirscalar',mirdata(orig));
Daniel@0 20 s = purgedata(s);
Daniel@0 21 s = set(s,'Pos',{},'Abs','Temporal position of frames','Ord','Value',varargin{:});