Slaven Glumac
Slaven Glumac

Reputation: 553

Difference equations in Symbolic Toolbox Matlab

Can someone please tell me is there a way to solve difference equation e.g:

y(k) = a1 * y(k-1) + a2 * y(k-2) + b0*u(k)

in Matlab using Symbolic Toolbox? I want to find explicit solution of this equation.

Upvotes: 2

Views: 1151

Answers (1)

PearsonArtPhoto
PearsonArtPhoto

Reputation: 39698

From this source, there are 2 methods:

  • Apply Z transform, solve for X(z), then find inverse Z transform look up tables if needed.

  • Write y(n)=r^n, to get the auxiliary equation, solve for homogeneous part first.

    r^n = a1*r(n-1) + a2*r^(n-2) 
    

Bottom line is, there isn't a good method to solve difference equations in Matlab now.

Upvotes: 3

Related Questions