tomwalters@0: % procedure for 'aim-mat' tomwalters@0: % tomwalters@0: % INPUT VALUES: tomwalters@0: % tomwalters@0: % RETURN VALUE: tomwalters@0: % tomwalters@0: % tomwalters@0: % (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 tomwalters@0: tomwalters@0: tomwalters@0: function [frm,options]=newsai_loadfile(name) tomwalters@0: % load the nap and its options tomwalters@0: tomwalters@0: tomwalters@0: load(name); tomwalters@0: tomwalters@0: whodir=who; tomwalters@0: for i=1:length(whodir) tomwalters@0: if ~strcmp(whodir(i),'name') tomwalters@0: eval(sprintf('classstruct=%s.data;',whodir{i})); tomwalters@0: eval(sprintf('options=%s.options;',whodir{i})); tomwalters@0: if strcmp(whodir(i),'strobestruct') tomwalters@0: frm=classstruct; tomwalters@0: else tomwalters@0: % construct the frame from whatever (sometimes the object is not recognised tomwalters@0: % as object due to the version ??) tomwalters@0: if isobject(classstruct) tomwalters@0: frm=classstruct; tomwalters@0: else tomwalters@0: nr=length(classstruct); tomwalters@0: if nr==1 tomwalters@0: frm=frame(classstruct); tomwalters@0: else tomwalters@0: for i=1:nr tomwalters@0: frm{i}=frame(classstruct{i}); tomwalters@0: end tomwalters@0: end tomwalters@0: end tomwalters@0: end tomwalters@0: end tomwalters@0: end tomwalters@0: tomwalters@0: tomwalters@0: