figure(1);
plot(waveform.XData,waveform.YData);
set(gca,'XTick',(min(waveform.XData):waveform.SecPerDiv:max(waveform.XData)))
xlabel('Time (s)');
ylabel('Volts (V)');
title(Raw_signal_in_time);
grid on;
legend(['Sampled data (Average)'],'Location','northeast','Orientation','horizontal');
figure(2);
plot(H,AllFFT_mean,'DisplayName','Oscilloscope Measured Signal'); hold on;
stem(X2,triH,':^m','BaseValue',-140); hold on;
stem(X2,sqrH,':sr','BaseValue',-140); hold on;
grid minor;
a1 = [1:40]';
b1 = num2str(AllPeaks2);
c1 = cellstr(b1);
text(X1, AllPeaks2, c1,'FontSize', 10, 'Rotation', 60,'HorizontalAlignment','left','VerticalAlignment','baseline');
title(FFT_Response_Compare)
xlabel('Frequency (Hz)');
ylabel('Voltage gain (dB)');
xlim([0 2020]);
hold off;
legend([ ]);