hi guys. pls i need help to write a math lab code for: 3dirac(n+3)-dirac(n-2). and also n[4u(n-1)-u(n-5)]+10e.^0.2(n-3)[u(n-3)-u(n-5)] . please i am due to submit the assignment. thanks
1 view (last 30 days)
Show older comments
hi guys. Please i need help to write a math lab code for: 3dirac(n+3)-dirac(n-2). and also n[4u(n-1)-u(n-5)]+10e.^0.2(n-3)[u(n-3)-u(n-5)] . please i am due to submit the assignment. regards, thanks
0 Comments
Answers (1)
Walter Roberson
on 9 Feb 2016
hint: MATLAB needs explicit multiplication symbols. For example, 3dirac(n+3) would have to be written 3*dirac(n+3). Also, MATLAB only uses () to indicate grouping of an expression, not [] .
1 Comment
Walter Roberson
on 9 Feb 2016
u = @(N) sin(N^2+1/3);
n = linspace(-20,20);
y = n.*(4*u(n-1) - u(n-5)) + (10e.^0.2)*(u(n-3).*(u(n-3) - u(n-5));
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!