tomwalters@0: % support file for 'aim-mat' tomwalters@0: % tomwalters@0: % This external file is included as part of the 'aim-mat' distribution package bleeck@3: % (c) 2011, University of Southampton bleeck@3: % Maintained by Stefan Bleeck (bleeck@gmail.com) bleeck@3: % download of current version is on the soundsoftware site: bleeck@3: % http://code.soundsoftware.ac.uk/projects/aimmat bleeck@3: % documentation and everything is on http://www.acousticscale.org bleeck@3: tomwalters@0: tomwalters@0: function doubles=cell2double(cell,name) tomwalters@0: % usage: doubles=cell2double(cell,name) tomwalters@0: % returns a array of doubles, if the cell is a string of numbers tomwalters@0: % the cell must have the filds name tomwalters@0: tomwalters@0: nr=length(cell); tomwalters@0: doubles=zeros(nr,1); tomwalters@0: tomwalters@0: for i=1:nr tomwalters@0: eval(sprintf('doubles(i)=cell{i}.%s;',name)); tomwalters@0: end