function SA = wavSegments(wnames)
% Build a struct array SA such that 
%   SA(k).data  stores the data of the wav file wnames{k}
%   SA(k).rate  stores the sampling rate of wav file wnames{k}

for k= 1:length(wnames)
   [y,rate] = wavread(wnames{k});
   SA(k)= struct('data', y, 'rate', rate);
end