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');% orplot(t,x); hold on;plot(t,y,'r'); Related SolutionsMATLAB: Multiple scatter plots with different sizes Use the hold functionality and plot them as you will do normally for a plot.example:x = linspace(0,3*pi,200);rng(0,'twister');y = cos(x)+ rand(1,200);figurescatter(x,y)hold onscatter(x,2*y,'r')x(length(x)/2:end)=[];y(length(y)/2:end)=[];scatter(x,y/2,'g') MATLAB: Frequency of combined waveform There is no way to define a single frequency for this waveform. The waveform is the superposition of 2 frequencies, 0.08416 cycles\second (sample) and 0.1111 cycles\second (sample). Related QuestionHow to plot this figure?Plotting 2 graphs on the same axes
Best Answer