From 993556fe00ab2f1d0f8b41e3d703aff79b51e6c3 Mon Sep 17 00:00:00 2001 From: Vincent COUVERT Date: Tue, 10 Mar 2009 16:18:21 +0100 Subject: [PATCH] Bug 3643 fixed, mtlb_eig is now obsolete --- scilab/CHANGES_5.1.X | 3 +++ .../help/en_US/mtlb_eig.xml | 23 +++++++----------- .../help/fr_FR/mtlb_eig.xml | 25 +++++++------------- .../compatibility_functions/macros/mtlb_eig.sci | 5 ++-- scilab/modules/m2sci/macros/sci_files/sci_eig.sci | 6 ++--- scilab_doc/Matlab_Scilab_dictionary/eig.xml | 16 ++----------- 6 files changed, 27 insertions(+), 51 deletions(-) diff --git a/scilab/CHANGES_5.1.X b/scilab/CHANGES_5.1.X index 731624b..060a13c 100644 --- a/scilab/CHANGES_5.1.X +++ b/scilab/CHANGES_5.1.X @@ -55,6 +55,9 @@ Internal API: Bug fixes: ========== +* bug 3643 fixed - Scilab spec function is the equivalent of Matlab function + (mtlb_eig is now obsolete). + * bug 3944 fixed - ilib_mex_build() wasn't using the content of the variable tables to compile other files * bug 3945 fixed - Error with the help example of library() diff --git a/scilab/modules/compatibility_functions/help/en_US/mtlb_eig.xml b/scilab/modules/compatibility_functions/help/en_US/mtlb_eig.xml index 0a70450..796dd76 100644 --- a/scilab/modules/compatibility_functions/help/en_US/mtlb_eig.xml +++ b/scilab/modules/compatibility_functions/help/en_US/mtlb_eig.xml @@ -20,20 +20,15 @@ Description - Matlab eig and Scilab spec behave differently in some particular cases: - - - - With one input (A) and two outputs (V,D), Matlab and Scilab returned eigen values have opposite signs. - - - - - The function [V,D] = mtlb_eig(A) is used by - mfile2sci to replace >[V,D] = eig(A). - This function will determine the correct semantic at run time. There is no replacement possibility for it. - - Caution: mtlb_eig has not to be used for hand coded functions. + WARNING: This function is obsolete and will be removed in version 5.1.2, please use spec instead. + + + See Also + + + spec + + Authors diff --git a/scilab/modules/compatibility_functions/help/fr_FR/mtlb_eig.xml b/scilab/modules/compatibility_functions/help/fr_FR/mtlb_eig.xml index e4ff522..57b2e78 100644 --- a/scilab/modules/compatibility_functions/help/fr_FR/mtlb_eig.xml +++ b/scilab/modules/compatibility_functions/help/fr_FR/mtlb_eig.xml @@ -20,22 +20,15 @@ Description - Dans plusieurs cas particuliers, les fonctions eig de Matlab et spec - de Scilab se comportent différemment : - - - - Avec un argument d'entrée (A) et deux arguments de sortie (V,D), - les valeurs obtenues dans Scilab et dans Matlab sont de signe opposé. - - - - - La fonction [V,D] = mtlb_eig(A,B) est utilisée par - mfile2sci pour remplacer [V,D] = eig(A). Cette fonction va - déterminer la sémantique correcte pendant l'exécution. Elle ne peut être remplacée. - - Attention : mtlb_eig ne doit pas être utilisée pour une programmation manuelle. + ATTENTION: Cette fonction est obsolète et sera retirée dans la version 5.1.2, veuillez utiliser spec en remplacement. + + + Voir aussi + + + spec + + Auteurs diff --git a/scilab/modules/compatibility_functions/macros/mtlb_eig.sci b/scilab/modules/compatibility_functions/macros/mtlb_eig.sci index 1477542..4c7f9cf 100644 --- a/scilab/modules/compatibility_functions/macros/mtlb_eig.sci +++ b/scilab/modules/compatibility_functions/macros/mtlb_eig.sci @@ -10,6 +10,8 @@ function [vd,D]=mtlb_eig(A,B) // Emulation function for eig() Matlab function +warnobsolete("spec", "5.1.2") + [lhs,rhs]=argn() if rhs==1 then @@ -17,9 +19,6 @@ if rhs==1 then vd=spec(A) else [vd,D]=spec(A) - if isreal(vd,0) & size(vd,"*")>1 then - vd(:,1:2)=-vd(:,1:2) - end end else error(msprintf(gettext("%s: use with %d input argument(s) is not yet implemented.\n"),"mtlb_eig",2)); diff --git a/scilab/modules/m2sci/macros/sci_files/sci_eig.sci b/scilab/modules/m2sci/macros/sci_files/sci_eig.sci index b852839..1d8b60a 100644 --- a/scilab/modules/m2sci/macros/sci_files/sci_eig.sci +++ b/scilab/modules/m2sci/macros/sci_files/sci_eig.sci @@ -12,7 +12,6 @@ function [tree]=sci_eig(tree) // Conversion function for Matlab eig() // Input: tree = Matlab funcall tree // Ouput: tree = Scilab equivalent for tree -// Emulation function: mtlb_eig() // eig(A) if rhs==1 then @@ -21,15 +20,14 @@ if rhs==1 then A = convert2double(A) tree.rhs=Rhs_tlist(A) + tree.name="spec" + // d = eig(A) if lhs==1 then - tree.name="spec" tree.lhs(1).dims=list(A.dims(1),1) tree.lhs(1).type=Type(Double,Unknown) // [V,D] = eig(A) else - set_infos(msprintf(gettext("mtlb_eig() called because Scilab and Matlab value do not always match for %s."),tree.lhs(1).name),0) - tree.name="mtlb_eig" tree.lhs(1).dims=list(A.dims(1),A.dims(1)) tree.lhs(1).type=Type(Double,Unknown) tree.lhs(2).dims=list(A.dims(1),A.dims(1)) diff --git a/scilab_doc/Matlab_Scilab_dictionary/eig.xml b/scilab_doc/Matlab_Scilab_dictionary/eig.xml index a22da3f..e293976 100644 --- a/scilab_doc/Matlab_Scilab_dictionary/eig.xml +++ b/scilab_doc/Matlab_Scilab_dictionary/eig.xml @@ -47,27 +47,15 @@ bdiag Particular cases - eig(A) - - -Scilab equivalent for eig(A) is spec(A). Scilab eigen vector matrix can differ from Matlab one... - - - - eig(A,'nobalance') - -There is no Scilab equivalent for 'nobalance' option. See examples... - + There is no Scilab equivalent for 'nobalance' option. See examples... eig(A,B,flag) - -There is no Scilab equivalent for flag. - + There is no Scilab equivalent for flag. -- 1.7.9.5