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