On 18.09.2014, at 15:47, babelproofreader <

[hidden email]> 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

_______________________________________________

Help-octave mailing list

[hidden email]https://lists.gnu.org/mailman/listinfo/help-octave