now i changed a bit but still it takes the value of jeep alone and performs fft .. pls suggest something...
if strcmpi(handles.current_data,'BMW')==0
filename='jeep1.wav';
elseif strcmpi(handles.current_data,'BMW')==1
filename='bmwsuv1.wav';
end
[x sr1] = wavread(filename);
J = fft(x(1:1024));
f1 = linspace(0, sr1, length(J));
plot(f1(1:end/2+1), abs(J(1:end/2+1)))
guidata(hObject, handles);
it uses the value of jeep to perform fft for bmw. so i get same graph for both the choices.