![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/345702/image.png)
how can i vary the frequency of the signal
7 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Shubhangi Singh
le 13 Août 2020
Réponse apportée : David Hill
le 13 Août 2020
i want to have a signal with variable frequency but i don't know how to do that. the code is
A=240;
d=6;
C=55*pi;
x=[0:1/100:10];
s=x.^3;
a=-(s.*d);
c=x.*C;
b=cos(c);
t=b.*(x.*(A*exp(a))); %the signal
0 commentaires
Réponse acceptée
hosein Javan
le 13 Août 2020
A=240;
d=6;
x=0:1e-4:1;
s=x.^3;
a=-(s.*d);
minfreq = 10; % minimum frequency(Hz)
maxfreq = 200; % maximum frequency(Hz)
w = 2*pi*(linspace(minfreq,maxfreq,length(x))); % array of linear-spaced frequency data vs x
b=cos(w.*x);
t=b.*(x.*(A*exp(a))); %the signal
plot(x,t)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/345702/image.png)
0 commentaires
Plus de réponses (1)
David Hill
le 13 Août 2020
A=240;
d=6;
x=[0:1/100:10];
s=x.^3;
a=-(s.*d);
t=@(f)cos(f*x).*(x.*(A*exp(a))); %the signal
plot(x,t(55*pi));
0 commentaires
Voir également
Catégories
En savoir plus sur Signal Generation and Preprocessing 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!