[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Linear time-invariant time response kernel, MATLAB vs Octave Code
From: |
Lukas Reichlin |
Subject: |
Re: Linear time-invariant time response kernel, MATLAB vs Octave Code |
Date: |
Thu, 18 Sep 2014 19:15:29 +0200 |
On 18.09.2014, at 15:47, babelproofreader <address@hidden> wrote:
> I am trying to get some MATLAB scripts to run in Octave, but have a problem
> with the following line of code:
>
> x = ltitr( a, b, u, x0 ) ;
>
> which throws an error in Octave.
>
> Online research shows that the ltitr function is an internal MATLAB function
> that returns the Linear time-invariant time response kernel for the given
> inputs. This sounds as if it should be a common DSP requirement, so I feel
> that this must be implemented directly in Octave, or in the latest Control
> package from Source Forge. However, I can't seem to find an Octave
> equivalent. I've read the documentation for the latest Octave Control
> package and maybe I should be using the functions lsim.m or ss.m or dss.m
> but I'm not really sure.
>
> Can anyone enlighten me? If it's not implemented in Octave, maybe some
> online reference to code that I could use to write my own ltitr function?
You could start from something like this:
function x = ltitr (a, b, u, x0)
x = lsim (ss (a, b, [], [], -1), u, [], x0);
endfunction
Hope this helps,
Lukas