MATLAB Answers

Signal sine wave ??

1 view (last 30 days)
Zerdani Mohammed
Zerdani Mohammed on 29 Jul 2019
Commented: Fangjun Jiang on 30 Jul 2019
Hi
how can i generate the signal sine wave with a variable frerquency, i need to use the function matlab with Clock for the time. ??
Thnks

  1 Comment

Sign in to comment.

Answers (1)

Fangjun Jiang
Fangjun Jiang on 29 Jul 2019
If there is no constrain, you could multiple the Clock with 2*pi*f, where f is your frequency and then feed it to an "Interpreted MATLAB Fcn" block where you specify it as "sin" or "sin(u)". You could implement "f" as a constant, or a parameter or an Inport.

  2 Comments

Zerdani Mohammed
Zerdani Mohammed on 30 Jul 2019
but i need to take the frequence as an random variable between 50 and 250 Hz ??
Fangjun Jiang
Fangjun Jiang on 30 Jul 2019
then multiply the Clock with 2*pi and the Random Number block.

Sign in to comment.

Sign in to answer this question.

Tags

Products


Release

R2014a