Generate and plot y(n) = 2*x(n-5) - 3*x(n+4)

45 views (last 30 days)
Ch My
Ch My on 23 Apr 2017
Answered: Sabitha V on 19 Aug 2021
Hi,i tried a lot of ways but i cant seem to set the sequence into the equation. I kept getting the error 'Subscript indices must either be real positive integers or logicals.' . How do i code this? Thank you.
plot the given random sequence.
n = -2:10
x(n)=(1,2,3,4,5,6,7,6,5,4,3,2,1)
y(n)= 2*x(n-5) - 3*x(n+4)
  2 Comments
Tahani Al Bulushi
Tahani Al Bulushi on 17 Oct 2019
Yo James how about you answer the question not point out that hes trying to plot negative indices and then stopping.

Sign in to comment.

Answers (1)

Sabitha V
Sabitha V on 19 Aug 2021
syms x n x(n)={1,2,3,4,5,6,7,6,5,4,3,2,1} x1(n)=5*x(n-5)-3*x(n+4) x2(n)=x(3-n)+x(n).*x(n-2)

Tags

Community Treasure Hunt

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

Start Hunting!