"Peel away and Guess" and Python

  • Context: Python 
  • Thread starter Thread starter Stephen Tashi
  • Start date Start date
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
3 replies · 399 views
I sent a PM to member kostoglotov suggesting he add a link to some notes containing the problem posed in his thread (https://www.physicsforums.com/threads/finding-the-closed-form-of-a-recursive-lti-system.900342/ ).

The link is:
https://ocw.mit.edu/courses/electri...tems-fall-2011/readings/MIT6_003F11_chap4.pdf

The "peel away and guess method" explained in those notes looks interesting, but it's new to me and I don't know if I'll figure it out - also I'm not a Python programmer.

I didn't post my suggestion in the thread itself because I want the thread to still show up as unanswered.
 
Physics news on Phys.org
He defines his function as [itex]y[n] = 7y[n-1]-12y[n-2]+x[n][/itex], but in the code the equivalent line is
Code:
    memo[n] = 7*f(n-1) - 12*f(n-2)
which seems to be short a term. I haven't tried to comprehend his methodology - but has he just made a typo?
 
Ibix said:
He defines his function as [itex]y[n] = 7y[n-1]-12y[n-2]+x[n][/itex], but in the code the equivalent line is
Code:
    memo[n] = 7*f(n-1) - 12*f(n-2)
which seems to be short a term. I haven't tried to comprehend his methodology - but has he just made a typo?

The ##x[n]## term is mysterious to me. In the chapter 2 of the course notes, it is treated as an input that enforces boundary conditions on the difference equation.