cleopatra
- 45
- 0
Homework Statement
plot this function:
cos(pi*n)*u(n)
The Attempt at a Solution
n=0:1:10;
y=(n>=0);
x(n) = cos(pi()*n)*y
figure(1)
plot(y)
The discussion revolves around plotting the function cos(pi*n)*u(n) in MATLAB, where u(n) represents the unit step function. Participants are exploring how to implement this function correctly in their code.
Some participants have shared their code attempts, while others are questioning specific aspects of the implementation, such as the role of the unit step function and its multiplication with the cosine function. There is an indication of progress as one participant mentions resolving their confusion.
There are mentions of potential misunderstandings regarding the unit step function's definition and its application in the context of the cosine function. The discussion reflects a collaborative effort to clarify these concepts.
cleopatra said:Homework Statement
plot this function:
cos(pi*n)*u(n)
The Attempt at a Solution
n=0:1:10;
y=(n>=0);
x(n) = cos(pi()*n)*y
figure(1)
plot(y)