MATLAB: Plot two waveforms at the same time

plot waveforms at same time

Hi
Is there a way to plot two waveforms at the same time in a figure? Please let me know.
Thanks in advance

Best Answer

x = randn(1e2,1);
y = randn(1e2,1);
t = 1:100;
plot(t,x,t,y);
legend('x-waveform','y-waveform');
% or
plot(t,x); hold on;
plot(t,y,'r');
Related Question