How can I plot 3 signals one after another in on the same graph?
Show older comments
Hello,
I'm trying to generate a sinus with increasing frequency in time... I want them to appear one after another in the same graphic representation..I think that I should define a vector with the 3 signals as elements. I don't figure out how to implement this in code... Please help!
Thank you!
This is my code:
clear
clc
close all
F0=[100 200 300];
Fs=1000;
A=1;
tmax=0.5;
N=tmax*Fs;
for k=1:length(F0)
n=0:N-1
s=A*sin(2*pi*F0(k)/Fs*n)
t=n/Fs;
figure,plot(t,s)
end
Accepted Answer
More Answers (0)
Categories
Find more on Axes Appearance 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!