i need a Matlab function to generate a sinusoidal sequence,

<pre>

15 commentaires

Read about sin. What exactly is your question?
x[n] = Asin(w0n + phi) The function should accept the desired length N, amplitude A, angular frequency W0, and phase phi, where 0 ≤ W0 ≤ pi and 0 < phi ≤ pi.
this is my question. I hope someone can answer
Read about Sin.it is a striaght forward attempt.
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
Aash le 16 Oct 2017
Modifié(e) : Walter Roberson le 16 Oct 2017
this is what i want. x = A* sin(w0 n +phi).
The function should accept the desired length n, amplitude A, angular frequency W0, and phase phi, where 0 ≤ W0 ≤ pi and 0 < phi ≤ pi.
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??
x[n] = A* (w0 * n + phi)
yes there is a multiplication between them
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??
n is the time index in x axis of graph. attached is the graph I need to create
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

(a) Write a Matlab function to generate a sinusoidal sequence, x[n] = A sin(w0 * n+ phi) . The function should accept the desired length N, amplitude A, angular frequency w0, and phase phi, where 0 <

This is the whole question
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.)

Connectez-vous pour commenter.

Catégories

En savoir plus sur Loops and Conditional Statements dans Centre d'aide et File Exchange

Question posée :

le 16 Oct 2017

Commenté :

le 16 Oct 2017

Community Treasure Hunt

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

Start Hunting!

Translated by