Escolar Documentos
Profissional Documentos
Cultura Documentos
if nargout
[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT
% --- Outputs from this function are returned to the command line.
function varargout = bimbingan2_OutputFcn(hObject, eventdata, handles)
% varargout cell array for returning output args (see VARARGOUT);
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
handles = guidata(gcbf);
set (handles.edit2,'string',file_sound1);
save file_sound1.mat
[C,L] = wavedec(s,7,'haar');
cA7 = appcoef (C,L,'haar',7);
cD7 = detcoef (C,L,7);
cD6 = detcoef (C,L,6);
cD5 = detcoef (C,L,5);
cD4 = detcoef (C,L,4);
cD3 = detcoef (C,L,3);
cD2 = detcoef (C,L,2);
cD1 = detcoef (C,L,1);
A7 = wrcoef ('a' , C, L, 'haar' ,7);
D1 = wrcoef ('d',C,L, 'haar', 1);
D2 = wrcoef ('d',C,L, 'haar', 2);
D3 = wrcoef ('d',C,L, 'haar', 3);
D4 = wrcoef ('d',C,L, 'haar', 4);
D5 = wrcoef ('d',C,L, 'haar', 5);
D6 = wrcoef ('d',C,L, 'haar', 6);
D7 = wrcoef ('d',C,L, 'haar', 7);
figure(4)
subplot (4,2,1); plot(A7); title ('approximation a7')
subplot (4,2,2); plot (D1); title ('detail D1')
subplot (4,2,3); plot (D2); title ('detail D2')
subplot (4,2,4); plot (D3); title ('detail D3')
subplot (4,2,5); plot (D4); title ('detail D4')
subplot (4,2,6); plot (D5); title ('detail D5')
subplot (4,2,7); plot (D6); title ('detail D6')
subplot (4,2,8); plot (D7); title ('detail D7')
[C,L] = wavedec(s,7,'haar');
[C,L] = wavedec(s,7,'haar');
cA7 = appcoef (C,L,'haar',7);
cD7 = detcoef (C,L,7);
cD6 = detcoef (C,L,6);
cD5 = detcoef (C,L,5);
cD4 = detcoef (C,L,4);
cD3 = detcoef (C,L,3);
cD2 = detcoef (C,L,2);
cD1 = detcoef (C,L,1);
A7 = wrcoef ('a' , C, L, 'haar' ,7);
D1 = wrcoef ('d',C,L, 'haar', 1);
D2 = wrcoef ('d',C,L, 'haar', 2);
D3 = wrcoef ('d',C,L, 'haar', 3);
D4 = wrcoef ('d',C,L, 'haar', 4);
D5 = wrcoef ('d',C,L, 'haar', 5);
D6 = wrcoef ('d',C,L, 'haar', 6);
D7 = wrcoef ('d',C,L, 'haar', 7);
figure(4)
subplot (4,2,1); plot(A7); title ('approximation a7')
subplot (4,2,2); plot (D1); title ('detail D1')
subplot (4,2,3); plot (D2); title ('detail D2')
subplot (4,2,4); plot (D3); title ('detail D3')
subplot (4,2,5); plot (D4); title ('detail D4')
subplot (4,2,6); plot (D5); title ('detail D5')
subplot (4,2,7); plot (D6); title ('detail D6')
subplot (4,2,8); plot (D7); title ('detail D7')
handles = guidata(gcbf);
set (handles.edit3,'string',file_sound);
save file_sound.mat
% --- Executes on button press in pushbutton11.
function pushbutton11_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton11 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
load suara_piano.mat
x=suara_piano;
N=length(suara_piano);
sign_length= size(x,1);
s=0;
for i=1:(sign_length-1),
s=s+abs(sign(x(i))- sign (x(i+1)));
end
zc=1/(2*N) * s;
%zc1=1/(2) * s;
set(handles.edit5,'string',num2str(zc));
set(handles.edit7,'string',num2str(E));
for i=1:(sign_length-1),
s=s+abs(sign(x(i))- sign (x(i+1)));
end
zc=1/(2*N) * s;
%zc1=1/(2) * s;
set(handles.edit8,'string',num2str(zc));
set(handles.edit6,'string',num2str(E));
axes(handles.axes13) % MFCC
surf(t,f,rot90(rot90(rot90(m))),'EdgeColor','none') % rot90 supaya
TampilanNya dari Bawah
title('MFCC')
axis tight, colormap jet, view(0,90)
axes(handles.axes15) % MFCC
surf(t,f,rot90(rot90(rot90(m))),'EdgeColor','none') % rot90 supaya
TampilanNya dari Bawah
title('MFCC')
axis tight, colormap jet, view(0,90)