Info

This question is closed. Reopen it to edit or answer.

Hi, I have a problem dealing with two axes on the same gui , I want one axes to plot graphs using sub-plot and another one to plot image. on the same axes it was working ok but when I add another gui for image my plots shift to the second one

1 view (last 30 days)
axes(handles.axes1);
% subplot(1,2,1,'Parent',handles.xyz);
t = 0:1/fstr{ch2}:(length(str{ch2}) - 1)/fstr{ch2};
% axes(handles.axes1);
subplot(221);
% axes(handles.axes1);
plot(t, str{ch2}), axis([0, (length(str{ch2}) - 1)/fstr{ch2} -0.4 0.5]);
% subplot(121);
st=sprintf('Plot of signal s%d.wav',ch2);
title(st);
xlabel('Time [s]');
ylabel('Amplitude (normalized)')
% axes(handles.axes1);
M = 100;
N = 256;
frames = blockFrames(str{ch2}, fstr{ch2}, M, N);
t = N / 2;
tm = length(str{ch2}) / fstr{ch2};
% axes(handles.axes1);
subplot(222);
imagesc([0 tm], [0 fstr{ch2}/2], 20 * log10(abs(frames(1:t, :)).^2)), axis xy;
% subplot(122);
title('Logarithmic Power Spectrum (M = 100, N = 256)');
xlabel('Time [s]');
ylabel('Frequency [Hz]');
colorbar;
% axes(handles.axes1);
% clc
% axes(handles.axes1);
subplot(223);
plot(linspace(0, (fstr{ch2}/2), 129), (melfb(20, 256, fstr{ch2})));
% subplot(223);
title('Mel-Spaced Filterbank');
xlabel('Frequency [Hz]');

Answers (0)

Community Treasure Hunt

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

Start Hunting!