load ha .wav file in matlab

helow can anyone help me....i want to make gui interface.and on browse button i want to laod a.wav file into test.m file. how can i do this plz anyone help me ?

Answers (1)

You can do something like this.
h = uicontrol('Style', 'pushbutton','String','Select WAV File',...
'Position',[20 150 100 70],...
'Callback','[filename,pathname]=uigetfile(''*.wav'');');
[y,fs] = wavread([pathname filename]);
Now y is available as a variable to pass to a M-file.

Categories

Find more on MATLAB in Help Center and File Exchange

Asked:

on 19 May 2012

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!