annotate toolboxes/MIRtoolbox1.3.2/MIRToolbox/@mirdata/mirdata.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 d = mirdata(orig,varargin)
wolffd@0 2 % d = mirdata(x) creates a MIR object.
wolffd@0 3
wolffd@0 4 if nargin > 0 && isa(orig,'mirdata')
wolffd@0 5 d.pos = orig.pos;
wolffd@0 6 d.data = orig.data;
wolffd@0 7 d.unit = orig.unit;
wolffd@0 8 d.framepos = orig.framepos;
wolffd@0 9 d.framed = orig.framed;
wolffd@0 10 d.sr = orig.sr;
wolffd@0 11 d.nbits = orig.nbits;
wolffd@0 12 d.name = orig.name;
wolffd@0 13 d.name2 = orig.name2;
wolffd@0 14 d.label = orig.label;
wolffd@0 15 d.channels = orig.channels;
wolffd@0 16 d.clusters = orig.clusters;
wolffd@0 17 d.multidata = orig.multidata;
wolffd@0 18 d.peak = orig.peak;
wolffd@0 19 d.attack = orig.attack;
wolffd@0 20 d.release = orig.release;
wolffd@0 21 d.track = orig.track;
wolffd@0 22 d.title = orig.title;
wolffd@0 23 d.abs = orig.abs;
wolffd@0 24 d.ord = orig.ord;
wolffd@0 25 d.interchunk = orig.interchunk;
wolffd@0 26 d.tmpidx = orig.tmpidx;
wolffd@0 27 d.acrosschunks = orig.acrosschunks;
wolffd@0 28 d.interpolable = orig.interpolable;
wolffd@0 29 d.tmpfile = orig.tmpfile;
wolffd@0 30 d.index = orig.index;
wolffd@0 31 else
wolffd@0 32 d.pos = {};
wolffd@0 33 d.data = {};
wolffd@0 34 d.unit = '';
wolffd@0 35 d.framepos = {};
wolffd@0 36 d.framed = 0;
wolffd@0 37 d.sr = {};
wolffd@0 38 d.nbits = {};
wolffd@0 39 d.name = {};
wolffd@0 40 d.name2 = {};
wolffd@0 41 d.label = {};
wolffd@0 42 d.channels = [];
wolffd@0 43 d.clusters = {};
wolffd@0 44 d.multidata = [];
wolffd@0 45 d.peak.pos = {};
wolffd@0 46 d.peak.val = {};
wolffd@0 47 d.peak.precisepos = {};
wolffd@0 48 d.peak.preciseval = {};
wolffd@0 49 d.peak.mode = {};
wolffd@0 50 d.attack = {};
wolffd@0 51 d.release = {};
wolffd@0 52 d.track = {};
wolffd@0 53 d.title = 'Unspecified data';
wolffd@0 54 d.abs = 'Unspecified abscissa';
wolffd@0 55 d.ord = 'Unspecified ordinate';
wolffd@0 56 d.interchunk = [];
wolffd@0 57 d.tmpidx = 0;
wolffd@0 58 d.acrosschunks = [];
wolffd@0 59 d.interpolable = 1; % If the abscissae axis is non-numeric (0),
wolffd@0 60 % then peak picking has to be done without interpolation.
wolffd@0 61 d.tmpfile = [];
wolffd@0 62 d.index = NaN;
wolffd@0 63 end
wolffd@0 64 d = class(d,'mirdata');
wolffd@0 65 d = set(d,varargin{:});