Info
This question is closed. Reopen it to edit or answer.
how to show figure from the plotted graph in the GUI window?
1 view (last 30 days)
Show older comments
Hi everyone.
My question here, what is the basic code that i need. I am plotting graph. And from the graph, i want to show it to the GUI window. somehow my code does not work.
function FFTGraphDisplay_Callback(hObject, eventdata, handles)
% hObject handle to FFTGraphDisplay (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
%%FFT graph of the song
figure;
han1 = plot(f,abs(SongBefore))
axis([-8000,8000,0,max(abs(SongBefore))]);
grid on;
xlab1=xlabel('Frequency(Hz)');
ylab1=ylabel('|X[k]|');
set(han1,'LineWidth', 2);
set([xlab1, ylab1],'FontSize', 14, 'FontName', 'Times');
set(gca,'FontSize',10,'FontName','Times','Fontweight','Bold')
copygambar=getImage(han1)
axes(handles.FFTGraphDisplay);
imshow(real(copygambar));
0 Comments
Answers (0)
This question is closed.
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!