i need a Matlab function to generate a sinusoidal sequence,
显示 更早的评论
<pre>
15 个评论
Aash
2017-10-16
KSSV
2017-10-16
Read about sin. What exactly is your question?
Aash
2017-10-16
Aash
2017-10-16
KSSV
2017-10-16
Read about Sin.it is a striaght forward attempt.
Walter Roberson
2017-10-16
Do you mean
x = A * sin(W0 + phi)
But what is the length N affecting? You kind of imply that it is affecting the length of the angular frequency, but you also say that angular frequency is given. Is it a starting angular frequency? If so then how far apart should the other angular frequencies be?
Aash
2017-10-16
编辑:Walter Roberson
2017-10-16
Walter Roberson
2017-10-16
Is that an implied multiplication between the w0 and the n?
A * sin(w0 * n + phi)
? If so then how is the n there intended to relate to "the desired length n" ?
What is supposed to be length n? n is the number of full cycles to show? n is to be the number of samples? n is to be the length in centimeters of the display on the graph??
Aash
2017-10-16
Walter Roberson
2017-10-16
What is supposed to be length n? n is the number of full cycles to show? n is to be the number of samples? n is to be the length in centimeters of the display on the graph??
Aash
2017-10-16
Walter Roberson
2017-10-16
That example plot violates the constraints given in the equation. In the equation, 0 < W0 < pi, but the example plot has W0 = 1.2 * pi
Aash
2017-10-16
Aash
2017-10-16
Walter Roberson
2017-10-16
I am not sure what you need me to do about this. Do you need me to call the person who set the assignment for you and point out to them that the question is wrong, that it clearly requires that w0 be less than pi, but also requires that w0 be 1.2 pi? If so then I will need to know their name and phone number and the times I can expect to reach them (and the time zone.) (Also, if I will need an interpreter, I will need to know that.)
回答(1 个)
Walter Roberson
2017-10-16
stem(0:40,sqrt(3)*sin(1.2*pi*(0:40)+.3))
类别
在 帮助中心 和 File Exchange 中查找有关 Loops and Conditional Statements 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!