image thumbnail
from MATLAB For Java Programmers by David Forstot
Demo files and presentation for live webinar recorded on 10/30/2007

importGoodWav(filename)
function  importGoodWav(filename)

% David Forstot
% Copyright 2007 The MathWorks, Inc.
% This code is provided for example only.

% call wavread to read wav file
[data, fs] = wavread(filename);

% assing data to useful names to variables 
assignin('caller', 'workingData', data);
assignin('caller', 'workingFs'  , fs  );

end

Contact us at files@mathworks.com