How concatenate several signals
14 次查看(过去 30 天)
显示 更早的评论
Hello, I am currently trying to concatenate 2 signals (or more). My first signal is a chirp I am generating with the chirp function. I would like my signal to be a succession of a chirp, then a silence. Or, I would like to repeat my chirp several time.
fs = 200e6
t=0:1/fs:2e-3;
f0=1;
f1=2e6;
t1 = 1e-3;
x = chirp(t,f0,t1,f1);
plot(t,x);
title(['Chirp Signal']);
xlabel('Time(s)');
ylabel('Amplitude');
Can someone explain me how to do that ? If I do x = [x ; x ], I can only see one chirp, and not a sine which frequency is increasing, then decreasing, then increasing again. Thank you
0 个评论
回答(2 个)
Christoph F.
2017-9-19
> If I do x = [x ; x ],
x is a row vector. To concatenate row vectors, use
x=[x x]
[x; x] creates a 2-by-lenght(x) matrix instead.
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!