* Bug 16290: %sn() set obsolete 93/21193/5
Samuel GOUGEON [Sun, 29 Dec 2019 03:35:48 +0000 (04:35 +0100)]
  http://bugzilla.scilab.org/16290

  Requirement: https://codereview.scilab.org/21192 introduces ellipj()

Change-Id: I65cbb936479f27b805726eed7540caa254fba5d8

19 files changed:
scilab/CHANGES.md
scilab/modules/signal_processing/help/en_US/filters/ell1mag.xml
scilab/modules/signal_processing/help/ja_JP/filters/ell1mag.xml
scilab/modules/signal_processing/macros/%sn.sci
scilab/modules/signal_processing/macros/ell1mag.sci
scilab/modules/signal_processing/macros/zpell.sci
scilab/modules/slint/src/cpp/DeprecatedChecker.cpp
scilab/modules/special_functions/help/en_US/amell.xml
scilab/modules/special_functions/help/en_US/delip.xml
scilab/modules/special_functions/help/en_US/percentsn.xml
scilab/modules/special_functions/help/fr_FR/amell.xml
scilab/modules/special_functions/help/fr_FR/delip.xml
scilab/modules/special_functions/help/ja_JP/amell.xml
scilab/modules/special_functions/help/ja_JP/delip.xml
scilab/modules/special_functions/help/ja_JP/percentsn.xml
scilab/modules/special_functions/help/pt_BR/amell.xml
scilab/modules/special_functions/help/pt_BR/delip.xml
scilab/modules/special_functions/help/ru_RU/amell.xml
scilab/modules/special_functions/help/ru_RU/delip.xml

index 4e153b3..b91f9e6 100644 (file)
@@ -157,6 +157,7 @@ Obsolete functions or features
 * `frexp` becomes an internal. Please use `[m,e]=log2(x)` instead.
 * `champ1()` is obsolete. Please use `champ.colored` instead.
 * `setPreferencesValue` will be removed from Scilab 6.1.x. Please use `xmlSetValues` instead.
+* `%sn()` is obsolete. Please use `ellipj()` instead.
 
 
 Removed Functions
@@ -293,4 +294,3 @@ Bug Fixes
 * [#16293](http://bugzilla.scilab.org/show_bug.cgi?id=16293): Some demos run in step-by-step console mode(4) did not focus user's attention to the console to proceed.
 * [#16299](http://bugzilla.scilab.org/show_bug.cgi?id=16299): After `graypolarplot()`, `colorbar()` displayed an empty ungraduated color bar.
 * [#16303](http://bugzilla.scilab.org/show_bug.cgi?id=16303): log10(x) had wrong dimensions when x is an hypermatrix.
-*
\ No newline at end of file
index 9b38148..9725bfe 100644 (file)
@@ -46,7 +46,7 @@
         <para>
             Function used for squared magnitude of an elliptic filter.
             Usually <literal>m1=eps*eps/(a*a-1)</literal>. Returns
-            <literal>v=real(ones(z)./(ones(z)+eps*eps*s.*s))</literal> for <literal>s=%sn(z,m1)</literal>.
+            <literal>v=real(ones(z)./(ones(z)+eps*eps*s.*s))</literal> for <literal>s=ellipj(z,m1)</literal>.
         </para>
     </refsection>
     <refsection>
index a6da271..53ffbd2 100644 (file)
@@ -46,7 +46,7 @@
         <para>
             楕円フィルタの二乗振幅を得る際に使用される関数.
             通常は,<literal>m1=eps*eps/(a*a-1)</literal>です.
-            <literal>s=%sn(z,m1)</literal>として,
+            <literal>s=ellipj(z,m1)</literal>として,
             <literal>v=real(ones(z)./(ones(z)+eps*eps*s.*s))</literal>を返します.
         </para>
     </refsection>
index 272f644..46db386 100644 (file)
@@ -10,7 +10,7 @@
 // For more information, see the COPYING file which you should have received
 // along with this program.
 
-function [y]=%sn(x,m)
+function y = %sn(x, m)
     //Jacobi 's elliptic function with parameter m
     //which computes the inverse of the elliptic
     //integral for the parameter m.
@@ -24,6 +24,8 @@ function [y]=%sn(x,m)
     //
     //!
 
+    warnobsolete("ellipj()", "6.1.x")
+
     [n1,n2]=size(x);
     n=n1*n2;
     a=amell(real(x),sqrt(m));
@@ -36,4 +38,5 @@ function [y]=%sn(x,m)
     c1=cos(a1);
     d1=sqrt(ones(n1,n2)-m1*s1.*s1);
     y=(s.*d1+%i*c.*d.*s1.*c1)./(c1.*c1+m*s.*s.*s1.*s1);
+
 endfunction
index bb0dc51..ee3fa3c 100644 (file)
@@ -10,7 +10,7 @@
 // For more information, see the COPYING file which you should have received
 // along with this program.
 
-function [v]=ell1mag(eps,m1,z)
+function v = ell1mag(eps, m1, z)
     //Function used for squared magnitude of an elliptic filter
     //Usually m1=eps*eps/(a*a-1);
     //  eps     :Passband ripple=1/(1+eps**2)
@@ -19,8 +19,9 @@ function [v]=ell1mag(eps,m1,z)
     //  v       :Elliptic filter values at sample points
     //
     //!
-    s=%sn(z,m1);un=ones(z);
-    v=real(un./(un+eps*eps*s.*s))
+    s = ellipj(z,m1);
+    un = ones(z);
+    v = real(un ./ (un+eps*eps*s.*s))
 
 
 endfunction
index 1bce563..e688f03 100644 (file)
@@ -44,12 +44,12 @@ function [ze,po,gain]=zpell(epsilon,A,omegac,omegar)
     un=ones(1:max(size(v)));
     zlambda=-un*Kt+%i*v;
     plambda= u0*un+%i*v;
-    ze=%i*imag(%i*omegac*%sn(-%i*zlambda,m));
+    ze=%i*imag(%i*omegac*ellipj(-%i*zlambda,m));
     ze=[ze,conj(ze)];
-    po=%i*omegac*%sn(-%i*plambda,m);
+    po=%i*omegac*ellipj(-%i*plambda,m);
     po=[po,conj(po)];
     if order<>even then,
-        po=[po,%i*omegac*%sn(-%i*u0,m)];
+        po=[po,%i*omegac*ellipj(-%i*u0,m)];
     end,
     gain=abs(real(prod(po))/real(prod(ze)));
     if order==even then,
index 72f853b..6051648 100644 (file)
@@ -98,6 +98,7 @@ std::unordered_map<std::wstring, std::wstring> DeprecatedChecker::initDep()
 
     // Scilab 6.0.x => 6.1.0
     map.emplace(L"champ1", L"champ.colored");
+    map.emplace(L"%sn", L"ellipj");
     map.emplace(L"dirname", L"fileparts");
     map.emplace(L"_d", L"_");
     map.emplace(L"dgettext", L"gettext");
index 1d28e44..7021d8b 100644 (file)
@@ -51,7 +51,7 @@
             Computes Jacobi's elliptic function <literal>am(u,k)</literal>
             where <literal>k</literal> is the parameter and <literal>u</literal> is the argument. If <literal>u</literal>
             is a vector <literal>sn</literal> is the vector of the (element wise) computed values.
-            Used in function <literal>%sn</literal>.
+            Used in function <literal>ellipj()</literal>.
         </para>
     </refsection>
     <refsection role="see also">
@@ -64,7 +64,7 @@
                 <link linkend="ellipj">ellipj</link>
             </member>
             <member>
-                <link linkend="percentsn">%sn</link>
+                <link linkend="percentk">%k</link>
             </member>
         </simplelist>
     </refsection>
index 3a13be4..61a78b6 100644 (file)
@@ -146,7 +146,7 @@ intg(0,1,f)    //OK since real solution!
                 <link linkend="ellipj">ellipj</link>
             </member>
             <member>
-                <link linkend="percentsn">%sn</link>
+                <link linkend="percentk">%k</link>
             </member>
         </simplelist>
     </refsection>
index 06a67de..d6a9432 100644 (file)
@@ -2,11 +2,11 @@
 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:lang="en" xml:id="percentsn">
     <refnamediv>
         <refname>%sn</refname>
-        <refpurpose>Jacobi's elliptic function</refpurpose>
+        <refpurpose>Jacobi's elliptic function <emphasis role="bold">(obsolete)</emphasis></refpurpose>
     </refnamediv>
     <refsynopsisdiv>
         <title>Syntax</title>
-        <synopsis>[y]=%sn(x,m)</synopsis>
+        <synopsis>y = %sn(x, m)</synopsis>
     </refsynopsisdiv>
     <refsection>
         <title>Arguments</title>
     </refsection>
     <refsection>
         <title>Description</title>
+        <warning>
+            <para>
+                %sn() is obsolete and will be removed from Scilab 6.1.x. Please use ellipj() instead.
+            </para>
+        </warning>
         <para>
             Jacobi 's sn elliptic function with parameter <literal>m</literal>: the inverse
             of the elliptic integral for the parameter <literal>m</literal>.
@@ -90,6 +95,9 @@ xgrid(3)
         <title>See also</title>
         <simplelist type="inline">
             <member>
+                <link linkend="ellipj">ellipj</link>
+            </member>
+            <member>
                 <link linkend="delip">delip</link>
             </member>
             <member>
@@ -97,4 +105,15 @@ xgrid(3)
             </member>
         </simplelist>
     </refsection>
+    <refsection role="history">
+        <title>History</title>
+        <revhistory>
+            <revision>
+                <revnumber>6.1.0</revnumber>
+                <revdescription>
+                    %sn() is declared obsolete. ellipj() must be used instead.
+                </revdescription>
+            </revision>
+        </revhistory>
+    </refsection>
 </refentry>
index 5d8fdc9..4ff08ef 100644 (file)
@@ -40,7 +40,7 @@
             Calcule la fonction elliptique de Jacobi <literal>am(u,k)</literal>
             où <literal>k</literal> est le paramètre et <literal>u</literal> l'argument. Si <literal>u</literal>
             est un vecteur <literal>sn</literal> est le vecteur des valeurs calculées (élément par élément).
-            Utilisé dans la fonction <literal>%sn</literal>.
+            Utilisé dans la fonction <literal>ellipj()</literal>.
         </para>
     </refsection>
     <refsection role="see also">
@@ -53,7 +53,7 @@
                 <link linkend="ellipj">ellipj</link>
             </member>
             <member>
-                <link linkend="percentsn">%sn</link>
+                <link linkend="percentk">%k</link>
             </member>
         </simplelist>
     </refsection>
index f1fadc4..36856d8 100644 (file)
@@ -131,7 +131,7 @@ intg(0,1,f)    // OK puisque la solution est réelle !
                 <link linkend="ellipj">ellipj</link>
             </member>
             <member>
-                <link linkend="percentsn">%sn</link>
+                <link linkend="percentk">%k</link>
             </member>
         </simplelist>
     </refsection>
index 43ff203..d2d6ce4 100644 (file)
@@ -52,7 +52,7 @@
             ただし,
             <literal>k</literal> はパラメータ, <literal>u</literal> は引数です. <literal>u</literal>
             はベクトル, <literal>sn</literal> は(要素毎の)計算値のベクトルです.
-            関数<literal>%sn</literal>で使用されます.
+            関数<literal>ellipj()</literal>で使用されます.
         </para>
     </refsection>
     <refsection role="see also">
@@ -65,7 +65,7 @@
                 <link linkend="ellipj">ellipj</link>
             </member>
             <member>
-                <link linkend="percentsn">%sn</link>
+                <link linkend="percentk">%k</link>
             </member>
         </simplelist>
     </refsection>
index 6984b1c..9de7922 100644 (file)
@@ -147,7 +147,7 @@ intg(0,1,f)    //OK since real solution!
                 <link linkend="ellipj">ellipj</link>
             </member>
             <member>
-                <link linkend="percentsn">%sn</link>
+                <link linkend="percentk">%k</link>
             </member>
         </simplelist>
     </refsection>
index dd6ea8c..3d35bd6 100644 (file)
@@ -2,11 +2,11 @@
 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:lang="ja" xml:id="percentsn">
     <refnamediv>
         <refname>%sn</refname>
-        <refpurpose>ヤコビ楕円関数</refpurpose>
+        <refpurpose>ヤコビ楕円関数 <emphasis role="bold">(obsolete)</emphasis></refpurpose>
     </refnamediv>
     <refsynopsisdiv>
         <title>呼び出し手順</title>
-        <synopsis>[y]=%sn(x,m)</synopsis>
+        <synopsis>y = %sn(x, m)</synopsis>
     </refsynopsisdiv>
     <refsection>
         <title>パラメータ</title>
     </refsection>
     <refsection>
         <title>説明</title>
+        <warning>
+            <para>
+                %sn() is obsolete and will be removed from Scilab 6.1.x. Please use ellipj() instead.
+            </para>
+        </warning>
         <para>
             パラメータ<literal>m</literal>を指定した
             ヤコビの楕円関数:
@@ -70,6 +75,9 @@ xgrid(3)
         <title>参照</title>
         <simplelist type="inline">
             <member>
+                <link linkend="ellipj">ellipj</link>
+            </member>
+            <member>
                 <link linkend="delip">delip</link>
             </member>
             <member>
@@ -77,4 +85,15 @@ xgrid(3)
             </member>
         </simplelist>
     </refsection>
+    <refsection role="history">
+        <title>履歴</title>
+        <revhistory>
+            <revision>
+                <revnumber>6.1.0</revnumber>
+                <revdescription>
+                    %sn() is declared obsolete. ellipj() must be used instead.
+                </revdescription>
+            </revision>
+        </revhistory>
+    </refsection>
 </refentry>
index 5176502..f4f1e60 100644 (file)
@@ -52,7 +52,7 @@
             <literal>k</literal> é o parâmetro e <literal>u</literal> é o argumento.
             Se <literal>u</literal> é um vetor <literal>sn</literal> é o vetor dos
             valores computados (elemento a elemento) . Usado na função
-            <literal>%sn</literal>.
+            <literal>ellipj()</literal>.
         </para>
     </refsection>
     <refsection role="see also">
@@ -65,7 +65,7 @@
                 <link linkend="ellipj">ellipj</link>
             </member>
             <member>
-                <link linkend="percentsn">%sn</link>
+                <link linkend="percentk">%k</link>
             </member>
         </simplelist>
     </refsection>
index 085b9ce..3de9bd3 100644 (file)
@@ -143,7 +143,7 @@ intg(0,1,f)    //OK, desde que a solução seja real!
                 <link linkend="ellipj">ellipj</link>
             </member>
             <member>
-                <link linkend="percentsn">%sn</link>
+                <link linkend="percentk">%k</link>
             </member>
         </simplelist>
     </refsection>
index cf107db..f1ddc22 100644 (file)
@@ -51,7 +51,7 @@
             Вычисляет эллиптическую функцию <literal>am(u,k)</literal> Якоби, где
             <literal>k</literal> - параметр, а <literal>u</literal> - аргумент. Если
             <literal>u</literal> является вектором, то <literal>sn</literal> является вектором
-            вычисленных (поэлементно) значений. Используется в функции <literal>%sn</literal>.
+            вычисленных (поэлементно) значений. Используется в функции <literal>ellipj()</literal>.
         </para>
     </refsection>
     <refsection role="see also">
@@ -64,7 +64,7 @@
                 <link linkend="ellipj">ellipj</link>
             </member>
             <member>
-                <link linkend="percentsn">%sn</link>
+                <link linkend="percentk">%k</link>
             </member>
         </simplelist>
     </refsection>
index 4163019..aac7a82 100644 (file)
@@ -146,7 +146,7 @@ intg(0,1,f)    //OK так как решение вещественное!
                 <link linkend="ellipj">ellipj</link>
             </member>
             <member>
-                <link linkend="percentsn">%sn</link>
+                <link linkend="percentk">%k</link>
             </member>
         </simplelist>
     </refsection>