# How to generate a sine signal in which initially frequency increases linearly, then remains constant for some time and again decreases linearly.

1 vue (au cours des 30 derniers jours)
Vincent Dsouza le 24 Juil 2018
Commenté : Vincent Dsouza le 27 Juil 2018
How to generate a sine signal in which initially frequency increases linearly then remains constant for some time and again decreases linearly i.e, for 1st segment its frequency increases linearly from 0HZ – 100 HZ for t1=10 sec. Then the frequency remains constant in the 2nd segment for at 100 Hz at t2=50 sec and for the 3rd segment the frequency decreases linearly from 100Hz to 0 Hz for t3=10 sec.
##### 0 commentairesAfficher -2 commentaires plus anciensMasquer -2 commentaires plus anciens

Connectez-vous pour commenter.

### Réponse acceptée

Pawel Jastrzebski le 24 Juil 2018
Modifié(e) : Pawel Jastrzebski le 24 Juil 2018
Would it look like this:
% y = sine(2*pi*f*t)
t1 = linspace(0,10,500);
t2 = linspace(10,50,500);
t3 = linspace(50,60,500);
f1 = linspace(0,100,500);
f2 = repmat(100, [1 numel(t2)]);
f3 = fliplr(f1)
t = [t1 t2 t3];
f = [f1 f2 f3];
figure
subplot(2,1,1)
plot(t,2*pi*f.*t)
title('2*pi*f.*t')
xlabel('t');
ylabel('2*pi*f.*t')
subplot(2,1,2)
plot(t,sin(2*pi*f.*t));
title('sin(2*pi*f.*t)')
xlabel('t');
ylabel('sin(2*pi*f.*t)')
##### 1 commentaireAfficher -1 commentaires plus anciensMasquer -1 commentaires plus anciens
Vincent Dsouza le 27 Juil 2018
I need continuously increasing frequency signal.

Connectez-vous pour commenter.

### Catégories

En savoir plus sur Annotations dans Help Center et File Exchange

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by