Hi.

I'm referring to the svn version (of yesterday) of the control toolbox.

Please add this xtest to gram function in the control toolbox.

%!xtest
%! a = [-1 0 0; 1/2 -1 0; 1/2 0 -1];
%! b = [1 0; 0 -1; 0 1];
%! m = gram (a, b);
%! assert (a * m + m * a' + b *b', zeros (size (a)))

This xtest shows that gram(a,b) doesn't behave as documented in
texinfo (texinfo is correct).


In the short term, a fix could be to modify gram invoking lyap with
the right arguments.
In fact it seems that who wrote gram relied on lyap behaving as the
MATLAB counterpart.

In the mid/long term, a fix could be to leave gram untouched and
instead modify lyap to behave as the MATLAB counterpart.


I prefer the second solution (i.e. modify lyap to behave as the MATLAB
counterpart).
Both Octave's and Scilab's lyap(a,b) behave the same (i.e. solving a'
x + x a + b = 0), and the strange approach is that of MATLAB's
lyap(a,b) (that instead solves a x + x a' + b = 0); but I think that
it is better to target MATLAB compatibility.
Do you think this could be done for Octave-Forge >= 3.1?


I'm not attaching a patch to solve the problem because I think that
the problem is not to write the patch but to decide one solution.
If you have not spare time to write the patch, please let me know the
decision and I'l try to post a patch by a week.



Cheers,
Luca Favatella

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Octave-dev mailing list
Octave-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/octave-dev

Reply via email to