[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
ROOKIE Q: Using ltitr() + possible bug
From: |
Iñaky Pérez González |
Subject: |
ROOKIE Q: Using ltitr() + possible bug |
Date: |
Tue, 21 Oct 1997 23:40:53 +0200 |
Hi
I'm new to Octave, as I have started this year with a class
which uses matlab, and I'm trying to do it with Octave. Yaw ... love
free software, you know.
Well, everything went fine until I tried to use a function
which came along with the control package of Matlab, that we need to
use. I pretended to use the impulse() function to feed the input of a
lineal control system, but it was requesting a function, ltitr() which
octave, AFAIK, doesn't have, and MatLab has it built-in as an in-core
one, so no source available (even in the front package, which was said
to have more stuff).
So, following a tip for =D3scar M=E1rquez, I implemented the
function using this:
function _x =3D ltitr (_a, _b, _u, _x0)
_n =3D length (_u);
_U =3D _u';
for _i=3D1:_n
_x(:,_i) =3D _x0;
_x0 =3D _a * _x0 + _b * _U(:, _i);
end
_x =3D _x.';
(shameless copy from MatLab's help).
Then everything seemed to be fine until I had to use the
ss2tf() function from the MatLab control package. It gives far away
the results it gives in MatLab. Haven't seen a possible cause ???
I attach the file which causes the problem. Look at the
ss2tf() function call. It returns two matrixs, num_chk and
den_chk. They should be equal to num and den, and they do not. Anybody
could tell me if it is a bug or a feature? and if it is a feature,
what am I doing wrong?
--
Linux-USB! http://peloncho.fis.ucm.es/~inaky/USB.html -
-
Inaky Perez Gonzalez -- PGP pubkey fingerprint -
address@hidden -- 8E 34 3A 62 64 99 E2 44 -
http://peloncho.fis.ucm.es/~inaky -- AD 7B 30 D9 DD FF 3E 4C -
--------------------------------- -- ----------------------- -
The loneliness of the long distance runner .....
- ROOKIE Q: Using ltitr() + possible bug,
Iñaky Pérez González <=