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

조회 수: 18 (최근 30일)
Ch My
Ch My 2017년 4월 23일
답변: Sabitha V 2021년 8월 19일
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
James Tursa
James Tursa 2017년 4월 23일
So, how is this indexing supposed to work? E.g., for y(1) your second equation would be:
y(1) = 2*x(-4) - 3*x(5)
What is x(-4) supposed to mean? You currently don't have a good definition of how y and x are related for the indexes involved.
Tahani Al Bulushi
Tahani Al Bulushi 2019년 10월 17일
Yo James how about you answer the question not point out that hes trying to plot negative indices and then stopping.

댓글을 달려면 로그인하십시오.

답변 (1개)

Sabitha V
Sabitha V 2021년 8월 19일
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)

카테고리

Help CenterFile Exchange에서 MATLAB에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by