annotate toolboxes/MIRtoolbox1.3.2/MIRToolbox/@mirspectrum/get.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 val = get(a, propName)
wolffd@0 2 % GET Get properties from the MIRspectrum object
wolffd@0 3 % and return the value
wolffd@0 4
wolffd@0 5 switch propName
wolffd@0 6 case 'Magnitude'
wolffd@0 7 val = get(mirdata(a),'Data');
wolffd@0 8 case 'Frequency'
wolffd@0 9 val = get(mirdata(a),'Pos');
wolffd@0 10 case 'Phase'
wolffd@0 11 val = a.phase;
wolffd@0 12 case 'log'
wolffd@0 13 val = a.log;
wolffd@0 14 case 'XScale'
wolffd@0 15 val = a.xscale;
wolffd@0 16 case 'Power'
wolffd@0 17 val = a.pow;
wolffd@0 18 otherwise
wolffd@0 19 val = get(mirdata(a),propName);
wolffd@0 20 end