Plotting the same signal with a different scanning
Show older comments
Hello,
One time i measure a signal for 30 seconds with 50 Hertz and the second time i measure the same signal 30 seconds now with 600 Hertz. So i get 2 arrays (x*2 double) with a different size. Now i want to plot this 2 signals in one diagram. Is this possible?
Accepted Answer
More Answers (1)
Asmit Singh
on 27 May 2021
If I understood correctly, you are trying to plot 2 signals in a single graph. This documentation should be helpful. You can plot 2 signals in a single graphs using 'hold on'.
x = linspace(-pi,pi);
y1 = sin(x);
plot(x,y1)
hold on
y2 = cos(x);
plot(x,y2)
hold off
1 Comment
EmirBeg
on 27 May 2021
can't do it if the arrays aren't the same size.
Categories
Find more on Multirate Signal Processing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!