wolffd@0
|
1 function varargout = get(a,varargin)
|
wolffd@0
|
2 % GET Get properties from the MIRdesign object and return the value
|
wolffd@0
|
3
|
wolffd@0
|
4 if ischar(varargin{1})
|
wolffd@0
|
5 switch varargin{1}
|
wolffd@0
|
6 case 'Method'
|
wolffd@0
|
7 varargout = {a.method};
|
wolffd@0
|
8 return
|
wolffd@0
|
9 case 'File'
|
wolffd@0
|
10 varargout = {a.file};
|
wolffd@0
|
11 return
|
wolffd@0
|
12 case 'FrameLength'
|
wolffd@0
|
13 if isstruct(a.frame)
|
wolffd@0
|
14 varargout = {a.frame.length.val};
|
wolffd@0
|
15 else
|
wolffd@0
|
16 varargout = {[]};
|
wolffd@0
|
17 end
|
wolffd@0
|
18 return
|
wolffd@0
|
19 case 'FrameHop'
|
wolffd@0
|
20 if isstruct(a.frame)
|
wolffd@0
|
21 varargout = {a.frame.hop.val};
|
wolffd@0
|
22 else
|
wolffd@0
|
23 varargout = {[]};
|
wolffd@0
|
24 end
|
wolffd@0
|
25 return
|
wolffd@0
|
26 case 'FrameLengthUnit'
|
wolffd@0
|
27 if isstruct(a.frame)
|
wolffd@0
|
28 varargout = {a.frame.length.unit};
|
wolffd@0
|
29 else
|
wolffd@0
|
30 varargout = {[]};
|
wolffd@0
|
31 end
|
wolffd@0
|
32 return
|
wolffd@0
|
33 case 'FrameHopUnit'
|
wolffd@0
|
34 if isstruct(a.frame)
|
wolffd@0
|
35 varargout = {a.frame.hop.unit};
|
wolffd@0
|
36 else
|
wolffd@0
|
37 varargout = {[]};
|
wolffd@0
|
38 end
|
wolffd@0
|
39 return
|
wolffd@0
|
40 case 'FrameDontChunk'
|
wolffd@0
|
41 if isstruct(a.frame)
|
wolffd@0
|
42 varargout = {a.frame.dontchunk};
|
wolffd@0
|
43 else
|
wolffd@0
|
44 varargout = {[]};
|
wolffd@0
|
45 end
|
wolffd@0
|
46 return
|
wolffd@0
|
47 case 'Segment'
|
wolffd@0
|
48 varargout = {a.segment};
|
wolffd@0
|
49 return
|
wolffd@0
|
50 case 'ChunkDecomposed'
|
wolffd@0
|
51 varargout = {a.chunkdecomposed};
|
wolffd@0
|
52 return
|
wolffd@0
|
53 case 'Size'
|
wolffd@0
|
54 varargout = {a.size};
|
wolffd@0
|
55 return
|
wolffd@0
|
56 case 'Type'
|
wolffd@0
|
57 varargout = {a.type};
|
wolffd@0
|
58 return
|
wolffd@0
|
59 case 'Chunk'
|
wolffd@0
|
60 varargout = {a.chunk};
|
wolffd@0
|
61 return
|
wolffd@0
|
62 case 'Eval'
|
wolffd@0
|
63 varargout = {a.eval};
|
wolffd@0
|
64 return
|
wolffd@0
|
65 case 'Argin'
|
wolffd@0
|
66 varargout = {a.argin};
|
wolffd@0
|
67 return
|
wolffd@0
|
68 case 'VarArgin'
|
wolffd@0
|
69 varargout = {a.varargin};
|
wolffd@0
|
70 return
|
wolffd@0
|
71 case 'Specif'
|
wolffd@0
|
72 varargout = {a.specif};
|
wolffd@0
|
73 return
|
wolffd@0
|
74 case 'InterChunk'
|
wolffd@0
|
75 varargout = {a.interchunk};
|
wolffd@0
|
76 return
|
wolffd@0
|
77 case 'AcrossChunks'
|
wolffd@0
|
78 varargout = {a.acrosschunks};
|
wolffd@0
|
79 return
|
wolffd@0
|
80 case 'Option'
|
wolffd@0
|
81 varargout = {a.option};
|
wolffd@0
|
82 return
|
wolffd@0
|
83 case 'PostOption'
|
wolffd@0
|
84 varargout = {a.postoption};
|
wolffd@0
|
85 return
|
wolffd@0
|
86 case 'NoChunk'
|
wolffd@0
|
87 varargout = {a.nochunk};
|
wolffd@0
|
88 return
|
wolffd@0
|
89 case 'Ready'
|
wolffd@0
|
90 varargout = {a.ready};
|
wolffd@0
|
91 return
|
wolffd@0
|
92 case 'Struct'
|
wolffd@0
|
93 varargout = {a.struct};
|
wolffd@0
|
94 return
|
wolffd@0
|
95 case 'Stored'
|
wolffd@0
|
96 varargout = {a.stored};
|
wolffd@0
|
97 return
|
wolffd@0
|
98 case 'Index'
|
wolffd@0
|
99 varargout = {a.index};
|
wolffd@0
|
100 return
|
wolffd@0
|
101 case 'TmpFile'
|
wolffd@0
|
102 varargout = {a.tmpfile};
|
wolffd@0
|
103 return
|
wolffd@0
|
104 case 'TmpOf'
|
wolffd@0
|
105 varargout = {a.tmpof};
|
wolffd@0
|
106 return
|
wolffd@0
|
107 case 'Ascending'
|
wolffd@0
|
108 varargout = {a.ascending};
|
wolffd@0
|
109 return
|
wolffd@0
|
110 case 'SeparateChannels'
|
wolffd@0
|
111 varargout = {a.separate};
|
wolffd@0
|
112 return
|
wolffd@0
|
113 case 'Channel'
|
wolffd@0
|
114 varargout = {a.channel};
|
wolffd@0
|
115 return
|
wolffd@0
|
116 end
|
wolffd@0
|
117 end
|
wolffd@0
|
118
|
wolffd@0
|
119 prop.type = 'String';
|
wolffd@0
|
120 prop.position = 2;
|
wolffd@0
|
121 prop.default = '';
|
wolffd@0
|
122 option.prop = prop;
|
wolffd@0
|
123 specif.option = option;
|
wolffd@0
|
124 varargout = mirfunction(@get,a,varargin,nargout,specif,@init,@main);
|
wolffd@0
|
125
|
wolffd@0
|
126 function [x type] = init(x,option)
|
wolffd@0
|
127 type = '';
|
wolffd@0
|
128
|
wolffd@0
|
129 function val = main(a,option,postoption)
|
wolffd@0
|
130 val = get(a,option.prop); |