help format: (fr) added
[scilab.git] / scilab / modules / linear_algebra / macros / gschur.sci
1 // Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
2 // Copyright (C) ????-2008 - INRIA
3 //
4 // Copyright (C) 2012 - 2016 - Scilab Enterprises
5 //
6 // This file is hereby licensed under the terms of the GNU GPL v2.0,
7 // pursuant to article 5.3.4 of the CeCILL v.2.1.
8 // This file was originally licensed under the terms of the CeCILL v2.1,
9 // and continues to be available under such terms.
10 // For more information, see the COPYING file which you should have received
11 // along with this program.
12
13 function [As,Es,Z,dim]= gschur(A,E,extern)
14
15     if argn(2)<=2 then
16         warning("Obsolete function. Please use schur instead.")
17         if argn(1)==2 then
18             [As,Es]= schur(A,E)
19         else
20             [As,Es,Q,Z]= schur(A,E);Q=Q'
21         end
22     elseif type(extern)==10 then
23         if convstr(extern)=="c"|convstr(extern)=="d" then
24             warning(msprintf(gettext("%s: Obsolete function. Please replace ''%s'' by ''%s''."),"gschur","gschur","schur"));
25             if argn(1)==4 then
26                 [As,Es,Z,dim]= schur(A,E,extern)
27             elseif argn(1)==2 then
28                 [As,Es,Z,dim]= schur(A,E,extern)
29                 Es=dim;As=Z;
30             end
31         else // hard coded
32             warning(msprintf(gettext("%s: Obsolete function. Former external functions cannot be used anymore."),"gschur"));
33             //impossible to redefine
34         end
35     else //coded by a scilab function
36         //---- old------------------
37         //flag=extern(x)
38         //x(1) ==1 ==> x(2:3)=[al,be]
39         //x(1) ==2 ==> x(2:3)=[s,p]
40         warning(msprintf(gettext("%s: Obsolete function. Please replace ''%s'' by ''%s''."),"gschur","gschur","schur"));
41         deff("t=%_rule(Alpha,Beta)",["if imag(Alpha)==0 then"
42         "  t=extern([1,real(Alpha),Beta])==1"
43         "else"
44         "  c=Alpha/Beta"
45         "  t=extern([2,real(c+c''),real(c*c'')])==1"
46         "end;"])
47         [As,Es,Z,dim]= schur(A,E,%_rule)
48     end
49 endfunction
50