* Bug #8431: eval3d() set obsolete 47/18347/3
Samuel GOUGEON [Sun, 3 Jul 2016 00:58:31 +0000 (02:58 +0200)]
Change-Id: I6cc23184dd01d4f6eb3bcfd0bdabb924edd92baa

22 files changed:
scilab/CHANGES.md
scilab/modules/elementary_functions/help/en_US/elementarymatrices/ndgrid.xml
scilab/modules/elementary_functions/help/fr_FR/elementarymatrices/ndgrid.xml
scilab/modules/elementary_functions/help/ja_JP/elementarymatrices/ndgrid.xml
scilab/modules/elementary_functions/help/pt_BR/elementarymatrices/ndgrid.xml
scilab/modules/elementary_functions/help/ru_RU/elementarymatrices/ndgrid.xml
scilab/modules/graphics/demos/basic_functions/basic_functions_9.dem.sce
scilab/modules/graphics/help/en_US/3d_plot/eval3d.xml
scilab/modules/graphics/help/fr_FR/3d_plot/eval3d.xml [deleted file]
scilab/modules/graphics/help/ja_JP/3d_plot/eval3d.xml [deleted file]
scilab/modules/graphics/help/pt_BR/3d_plot/eval3d.xml [deleted file]
scilab/modules/graphics/macros/contour.sci
scilab/modules/graphics/macros/eval3d.sci
scilab/modules/graphics/macros/eval3dp.sci
scilab/modules/graphics/tests/nonreg_tests/bug_2983.dia.ref
scilab/modules/graphics/tests/nonreg_tests/bug_2983.tst
scilab/modules/graphics/tests/nonreg_tests/bug_4658.tst
scilab/modules/helptools/etc/images_md5.txt
scilab/modules/signal_processing/help/en_US/transforms/dct.xml
scilab/modules/signal_processing/help/fr_FR/transforms/dct.xml
scilab/modules/signal_processing/help/ja_JP/transforms/dct.xml
scilab/modules/slint/src/cpp/DeprecatedChecker.cpp

index 3f1fb76..36472a2 100644 (file)
@@ -194,6 +194,7 @@ Obsolete functions or features
 
 * `maxfiles` is now obsolete.
 * `isoview(xmin,xmax,ymin,ymax)` is deprecated. Please use `isoview("on"), replot(..)` instead.
+* `eval3d` will be removed from Scilab 6.1. Please use `ndgrid` instead.
 
 Removed Functions
 -----------------
index 1753859..8846049 100644 (file)
@@ -202,9 +202,6 @@ c1+c2
                 <link linkend="feval">feval</link>
             </member>
             <member>
-                <link linkend="eval3d">eval3d</link>
-            </member>
-            <member>
                 <link linkend="nf3d">nf3d</link>
             </member>
         </simplelist>
index a8da8da..a4196c8 100644 (file)
@@ -421,12 +421,6 @@ c1+c2
         
         <member>
             
-            <link linkend="eval3d">eval3d</link>
-            
-        </member>
-        
-        <member>
-            
             <link linkend="nf3d">nf3d</link>
             
         </member>
index 1d5fc05..5519a48 100644 (file)
@@ -372,12 +372,6 @@ c1+c2
         
         <member>
             
-            <link linkend="eval3d">eval3d</link>
-            
-        </member>
-        
-        <member>
-            
             <link linkend="nf3d">nf3d</link>
             
         </member>
index 5fa06e8..b7e7883 100644 (file)
@@ -385,12 +385,6 @@ c1+c2
         
         <member>
             
-            <link linkend="eval3d">eval3d</link>
-            
-        </member>
-        
-        <member>
-            
             <link linkend="nf3d">nf3d</link>
             
         </member>
index e2d089d..9d3bfda 100644 (file)
@@ -378,12 +378,6 @@ c1+c2
             
             <member>
                 
-                <link linkend="eval3d">eval3d</link>
-                
-            </member>
-            
-            <member>
-                
                 <link linkend="nf3d">nf3d</link>
                 
             </member>
index 97b4e93..a9d92d0 100644 (file)
@@ -19,7 +19,8 @@ function demo_basic_functions9()
 
     x = -2:0.1:2;
     y = x;
-    z = eval3d(__milk_drop, x, y);
+    [X,Y] = ndgrid(x,y);
+    z = __milk_drop(X,Y);
     plot3d(x, y, z);
     e = gce();
     e.color_flag = 1;
index fc77ced..a0ccc91 100644 (file)
@@ -2,7 +2,7 @@
 <!--
  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
  * Copyright (C) INRIA - Serge Steer
- * 
+ *
  * Copyright (C) 2012 - 2016 - Scilab Enterprises
  *
  * This file is hereby licensed under the terms of the GNU GPL v2.0,
@@ -16,7 +16,7 @@
 <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="eval3d">
     <refnamediv>
         <refname>eval3d</refname>
-        <refpurpose>values of a function on a grid</refpurpose>
+        <refpurpose>values of a function on a grid  => <emphasis role="bold">this function is obsolete</emphasis></refpurpose>
     </refnamediv>
     <refsynopsisdiv>
         <title>Syntax</title>
     </refsection>
     <refsection>
         <title>Description</title>
+        <warning>
+            <emphasis role="bold">This function is obsolete</emphasis> and will be removed in Scilab 6.1.
+        </warning>
+        <para>If <literal>fun(x,y)</literal> can process <literal>x</literal>
+            and <literal>y</literal> matrices, please use the following replacements:
+            <itemizedlist>
+                <listitem>
+                    <para>
+                        <emphasis role="bold">z = eval3d(fun,x)</emphasis> => <literal>X=ndgrid(x,x); z=fun(X,X')</literal>
+                    </para>
+                </listitem>
+                <listitem>
+                    <para>
+                        <emphasis role="bold">z = eval3d(fun,x,y)</emphasis> => <literal>[X,Y]=ndgrid(x,y); z=fun(X,Y)</literal>
+                    </para>
+                </listitem>
+            </itemizedlist>
+        </para>
         <para>
-            This function returns a matrix <literal>z(n1,n2)</literal>. <literal>z(i,j)=fun(x(i),y(j))</literal>. 
-            If the function <literal>fun</literal> does not accept arguments of type vector use the
-            primitive <literal>feval</literal>.
+            Otherwise, if <literal>fun(x,y)</literal> accepts only scalars
+            <literal>x</literal> and <literal>y</literal>, please use
+            <link linkend="feval">feval</link> as usual:
+            <literal>z=feval(x,fun)</literal> or <literal>z=feval(x,y,fun)</literal>.
         </para>
     </refsection>
-    <refsection>
-        <title>Examples</title>
-        <programlisting role="example"><![CDATA[ 
-x=-5:5;y=x;
-deff('[z]=f(x,y)',['z= x.*y']);
-z=eval3d(f,x,y);
-plot3d(x,y,z);
-
-deff('[z]=f(x,y)',['z= x*y']);
-z=feval(x,y,f);
-plot3d(x,y,z);
- ]]></programlisting>
-        <scilab:image>x=-5:5;y=x;
-            deff('[z]=f(x,y)',['z= x.*y']);
-            z=eval3d(f,x,y);
-            plot3d(x,y,z);
-        </scilab:image>
-        
-    </refsection>
-    <refsection role="see also">
-        <title>See also</title>
-        <simplelist type="inline">
-            <member>
-                <link linkend="feval">feval</link>
-            </member>
-        </simplelist>
-    </refsection>
 </refentry>
diff --git a/scilab/modules/graphics/help/fr_FR/3d_plot/eval3d.xml b/scilab/modules/graphics/help/fr_FR/3d_plot/eval3d.xml
deleted file mode 100644 (file)
index a9f7f08..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<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="fr" xml:id="eval3d">
-    <refnamediv>
-        <refname>eval3d</refname>
-        <refpurpose>valeurs d'une fonction sur une grille  </refpurpose>
-    </refnamediv>
-    <refsynopsisdiv>
-        <title>Séquence d'appel</title>
-        <synopsis>[z]=eval3d(fun,x,[y])</synopsis>
-    </refsynopsisdiv>
-    <refsection>
-        <title>Paramètres</title>
-        <variablelist>
-            <varlistentry>
-                <term>fun  </term>
-                <listitem>
-                    <para>fonction acceptant des arguments vectoriels
-                    </para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>x,y  </term>
-                <listitem>
-                    <para>
-                        2 vecteurs de tailles (1,n1) et (1,n2) (par défaut <literal>y=x</literal>).
-                    </para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>z  </term>
-                <listitem>
-                    <para>matrice de taille (n1,n2).
-                    </para>
-                </listitem>
-            </varlistentry>
-        </variablelist>
-    </refsection>
-    <refsection>
-        <title>Description</title>
-        <para>
-            Cette fonction renvoie une matrice <literal>z(n1,n2)</literal> où <literal>z(i,j)=fun(x(i),y(j))</literal>. 
-            Si la fonction <literal>fun</literal> n'accepte pas d'arguments vectoriels utiliser
-            la primitive <literal>feval</literal>.
-        </para>
-    </refsection>
-    <refsection>
-        <title>Exemples</title>
-        <programlisting role="example"><![CDATA[ 
-x=-5:5;y=x;
-deff('[z]=f(x,y)',['z= x.*y']);
-z=eval3d(f,x,y);
-plot3d(x,y,z);
-
-deff('[z]=f(x,y)',['z= x*y']);
-z=feval(x,y,f);
-plot3d(x,y,z);
- ]]></programlisting>
-        <scilab:image>x=-5:5;y=x;
-            deff('[z]=f(x,y)',['z= x.*y']);
-            z=eval3d(f,x,y);
-            plot3d(x,y,z);
-        </scilab:image>
-        
-    </refsection>
-    <refsection role="see also">
-        <title>Voir aussi</title>
-        <simplelist type="inline">
-            <member>
-                <link linkend="feval">feval</link>
-            </member>
-        </simplelist>
-    </refsection>
-</refentry>
diff --git a/scilab/modules/graphics/help/ja_JP/3d_plot/eval3d.xml b/scilab/modules/graphics/help/ja_JP/3d_plot/eval3d.xml
deleted file mode 100644 (file)
index 3da2bd7..0000000
+++ /dev/null
@@ -1,164 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-
- * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
-
- * Copyright (C) INRIA - Serge Steer
-
- * 
-
-
- * Copyright (C) 2012 - 2016 - Scilab Enterprises
- *
- * This file is hereby licensed under the terms of the GNU GPL v2.0,
- * pursuant to article 5.3.4 of the CeCILL v.2.1.
- * This file was originally licensed under the terms of the CeCILL v2.1,
- * and continues to be available under such terms.
- * For more information, see the COPYING file which you should have received
- * along with this program.
-
- *
-
- -->
-
-<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="eval3d">
-    
-    <refnamediv>
-        
-        <refname>eval3d</refname>
-        
-        <refpurpose>グリッド上の関数の値</refpurpose>
-        
-    </refnamediv>
-    
-    <refsynopsisdiv>
-        
-        <title>呼び出し手順</title>
-        
-        <synopsis>[z]=eval3d(fun,x,[y])</synopsis>
-        
-    </refsynopsisdiv>
-    
-    <refsection>
-        
-        <title>パラメータ</title>
-        
-        <variablelist>
-            
-            <varlistentry>
-                
-                <term>fun</term>
-                
-                <listitem>
-                    
-                    <para>引数にベクトルをとる関数.</para>
-                    
-                </listitem>
-                
-            </varlistentry>
-            
-            <varlistentry>
-                
-                <term>x,y</term>
-                
-                <listitem>
-                    
-                    <para>
-                        
-                        大きさ (1,n1) および (1,n2)のベクトル. ( <literal>y</literal> のデフォルト値: <literal>y=x</literal>).
-                        
-                    </para>
-                    
-                </listitem>
-                
-            </varlistentry>
-            
-            <varlistentry>
-                
-                <term>z</term>
-                
-                <listitem>
-                    
-                    <para>大きさ (n1,n2)の行列.</para>
-                    
-                </listitem>
-                
-            </varlistentry>
-            
-        </variablelist>
-        
-    </refsection>
-    
-    <refsection>
-        
-        <title>説明</title>
-        
-        <para>
-            
-            この関数は行列<literal>z(n1,n2)</literal>を返します. <literal>z(i,j)=fun(x(i),y(j))</literal>. 
-            
-            関数 <literal>fun</literal> がベクトル型の引数を受け付けない場合は,
-            
-            プリミティブ<literal>feval</literal>を使用してください.
-            
-        </para>
-        
-    </refsection>
-    
-    <refsection>
-        
-        <title>例</title>
-        
-        <programlisting role="example"><![CDATA[ 
-
-x=-5:5;y=x;
-
-deff('[z]=f(x,y)',['z= x.*y']);
-
-z=eval3d(f,x,y);
-
-plot3d(x,y,z);
-
-
-
-deff('[z]=f(x,y)',['z= x*y']);
-
-z=feval(x,y,f);
-
-plot3d(x,y,z);
-
- ]]></programlisting>
-        
-        <scilab:image>x=-5:5;y=x;
-            
-            deff('[z]=f(x,y)',['z= x.*y']);
-            
-            z=eval3d(f,x,y);
-            
-            plot3d(x,y,z);
-            
-        </scilab:image>
-        
-        
-        
-    </refsection>
-    
-    <refsection role="see also">
-        
-        <title>参照</title>
-        
-        <simplelist type="inline">
-            
-            <member>
-                
-                <link linkend="feval">feval</link>
-                
-            </member>
-            
-        </simplelist>
-        
-    </refsection>
-    
-</refentry>
-
diff --git a/scilab/modules/graphics/help/pt_BR/3d_plot/eval3d.xml b/scilab/modules/graphics/help/pt_BR/3d_plot/eval3d.xml
deleted file mode 100644 (file)
index 0f0b603..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--
- * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
- * Copyright (C) INRIA - Serge Steer
- * 
- * Copyright (C) 2012 - 2016 - Scilab Enterprises
- *
- * This file is hereby licensed under the terms of the GNU GPL v2.0,
- * pursuant to article 5.3.4 of the CeCILL v.2.1.
- * This file was originally licensed under the terms of the CeCILL v2.1,
- * and continues to be available under such terms.
- * For more information, see the COPYING file which you should have received
- * along with this program.
- *
- -->
-<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="eval3d" xml:lang="pt">
-    <refnamediv>
-        <refname>eval3d</refname>
-        <refpurpose>valores de uma função em um grid</refpurpose>
-    </refnamediv>
-    <refsynopsisdiv>
-        <title>Seqüência de Chamamento</title>
-        <synopsis>[z]=eval3d(fun,x,[y])</synopsis>
-    </refsynopsisdiv>
-    <refsection>
-        <title>Parâmetros</title>
-        <variablelist>
-            <varlistentry>
-                <term>fun</term>
-                <listitem>
-                    <para>função que aceita vetores como argumentos </para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>x,y</term>
-                <listitem>
-                    <para>2 vetores de tamanhos (1,n1) e (1,n2). (valor padrão para
-                        <literal>y</literal> : <literal>y=x</literal>).
-                    </para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>z</term>
-                <listitem>
-                    <para>matriz de tamanho (n1,n2).</para>
-                </listitem>
-            </varlistentry>
-        </variablelist>
-    </refsection>
-    <refsection>
-        <title>Descrição</title>
-        <para>
-            Esta função retorna uma matriz <literal>z(n1,n2)</literal>.
-            <literal>z(i,j)=fun(x(i),y(j))</literal>. Se a função
-            <literal>fun</literal> não aceitar argumentos do tipo vetor, use a
-            primitiva <literal>feval</literal>.
-        </para>
-    </refsection>
-    <refsection>
-        <title>Exemplos</title>
-        <programlisting role="example"><![CDATA[ 
-x=-5:5;y=x;
-deff('[z]=f(x,y)',['z= x.*y']);
-z=eval3d(f,x,y);
-plot3d(x,y,z);
-
-deff('[z]=f(x,y)',['z= x*y']);
-z=feval(x,y,f);
-plot3d(x,y,z);
- ]]></programlisting>
-    </refsection>
-    <refsection role="see also">
-        <title>Ver Também</title>
-        <simplelist type="inline">
-            <member>
-                <link linkend="feval">feval</link>
-            </member>
-        </simplelist>
-    </refsection>
-</refentry>
index 7f8cb8a..c22b9c1 100644 (file)
@@ -24,7 +24,8 @@ function contour(x, y, z, nz, theta, alpha, leg, flag, ebox, zlev)
 
         x = -1:0.1:1;
         y = x;
-        z = eval3d(Surf2, x, y)
+        [X,Y] = ndgrid(x,y);
+        z = Surf2(X,Y)
 
         //scf();
         subplot(211);
index cab15a2..6d7409f 100644 (file)
@@ -18,6 +18,7 @@ function [z]=eval3d(fun,x,y)
     //  feval(x,y,fun)
     //Si y n'est pas fourni il est suppose identique a x
     //!
+    warnobsolete("ndgrid", "6.1")
     [lhs,rhs]=argn(0)
     if rhs==3 then
         nx=prod(size(x));ny=prod(size(y))
index a7a4424..8d6449c 100644 (file)
@@ -10,7 +10,7 @@
 // along with this program.
 
 function [x,y,z]=eval3dp(fun,p1,p2)
-    // eval3d - retourne une representation par facettes d'une fonction z=f(u,v)
+    // eval3dp - retourne une representation par facettes d'une fonction z=f(u,v)
     //%Syntaxe
     //  [x,y,z]=eval3dp(fun,p1,p2)
     //%Parametres
@@ -37,7 +37,7 @@ function [x,y,z]=eval3dp(fun,p1,p2)
     //  [x,y,z]=eval3dp(scp,0:0.3:2*%pi,-%pi:0.3:%pi);
     //  fac3d(x,y,z,35,45,'x@y@z')
     //%Voir aussi
-    // plot3d eval3d fac3d
+    // plot3d fac3d
     //!
 
     [lhs,rhs]=argn(0)
index b00b7b4..dd9c825 100644 (file)
@@ -17,15 +17,16 @@ function [z]=__milk_drop(x,y)
     sq=x.^2+y.^2;
     z= exp( exp(-sq).*(exp(cos(sq).^20)+8*sin(sq).^20+2*sin(2*(sq)).^8) );
 endfunction
-x=-2:0.1:2; y=x;
-z=eval3d(__milk_drop,x,y);
-plot3d(x,y,z)
-a=gca();
+x = -2:0.1:2;
+X = ndgrid(x,x);
+z = __milk_drop(X,X');
+plot3d(x,x,z)
+a = gca();
 a.children(1).hiddencolor
  ans  =
  
     4.  
-a.children(1).hiddencolor=5;
+a.children(1).hiddencolor = 5;
 // check that no hidden facets appears.
 // Might be updated when image processing will be integrated in Scilab.
 // Export and check that no hidden color appears on the image
index bf7b4a0..1d58b26 100644 (file)
@@ -21,14 +21,14 @@ function [z]=__milk_drop(x,y)
     z= exp( exp(-sq).*(exp(cos(sq).^20)+8*sin(sq).^20+2*sin(2*(sq)).^8) );
 endfunction
 
-x=-2:0.1:2; y=x;
-z=eval3d(__milk_drop,x,y);
-plot3d(x,y,z)
+x = -2:0.1:2;
+X = ndgrid(x,x);
+z = __milk_drop(X,X');
+plot3d(x,x,z)
 
-
-a=gca();
+a = gca();
 a.children(1).hiddencolor
-a.children(1).hiddencolor=5;
+a.children(1).hiddencolor = 5;
 
 // check that no hidden facets appears.
 // Might be updated when image processing will be integrated in Scilab.
index 1e07359..f14824f 100644 (file)
@@ -828,7 +828,6 @@ ell1mag_1.png=640c2b3e2643588f62860bcd7add7ef5
 eqfir_1.png=ccaf8d9b3be54b01b15910cd2935ed94
 erfinv_1.png=a9c079e2216ea843f529d8fa1af6a38d
 errbar_1.png=f0db95118951d4c04c3bde7c93e2fa2e
-eval3d_1.png=c3bafa99c9b71a2faa45239efed7e09b
 eval3dp_1.png=2e80dc6ec334a5caf5b2c918e68bad3
 eval_cshep2d_1.png=5af907b540319286ce844b966cf742e6
 evans_en_US_1.png=41e97afd94ab96301b1c5d1661b56f63
index 8bf2cc6..3b02336 100644 (file)
         
         <para>2-D dct</para>
         <programlisting role="example"><![CDATA[
-  function [z]=__milk_drop(x,y)
-      sq=x.^2+y.^2;
-      z= exp( exp(-sq).*(exp(cos(sq).^20)+8*sin(sq).^20+2*sin(2*(sq)).^8) );
+  function z = __milk_drop(x,y)
+      sq = x.^2+y.^2;
+      z = exp( exp(-sq).*(exp(cos(sq).^20)+8*sin(sq).^20+2*sin(2*(sq)).^8) );
   endfunction
-  x=-2:0.1:2;
-  A=eval3d(__milk_drop,x,x);
-  d=dct(A);
+  x = -2:0.1:2;
+  [X,Y] = ndgrid(x,x);
+  A = __milk_drop(X,Y);
+  d = dct(A);
   d(abs(d)<1)=0;
   size(find(d<>0),'*')
-  A1=dct(d,1);
-  clf();fig=gcf();fig.color_map=graycolormap(128);
-  subplot(121),grayplot(x,x,A)
-  subplot(122),grayplot(x,x,A1)
+  A1 = dct(d,1);
+  clf
+  gcf().color_map = graycolormap(128);
+  subplot(121), grayplot(x,x,A)
+  subplot(122), grayplot(x,x,A1)
   ]]></programlisting>
         
         
index a9f77bc..1a73254 100644 (file)
         
         <para>2-D dct</para>
         <programlisting role="example"><![CDATA[
-  function [z]=__milk_drop(x,y)
-      sq=x.^2+y.^2;
-      z= exp( exp(-sq).*(exp(cos(sq).^20)+8*sin(sq).^20+2*sin(2*(sq)).^8) );
+  function z = __milk_drop(x,y)
+      sq = x.^2+y.^2;
+      z = exp( exp(-sq).*(exp(cos(sq).^20)+8*sin(sq).^20+2*sin(2*(sq)).^8) );
   endfunction
-  x=-2:0.1:2;
-  A=eval3d(__milk_drop,x,x);
-  d=dct(A);
+  x = -2:0.1:2;
+  [X,Y] = ndgrid(x,x);
+  A = __milk_drop(X,Y);
+  d = dct(A);
   d(abs(d)<1)=0;
   size(find(d<>0),'*')
-  A1=dct(d,1);
-  clf();fig=gcf();fig.color_map=graycolormap(128);
-  subplot(121),grayplot(x,x,A)
-  subplot(122),grayplot(x,x,A1)
+  A1 = dct(d,1);
+  clf
+  gcf().color_map = graycolormap(128);
+  subplot(121), grayplot(x,x,A)
+  subplot(122), grayplot(x,x,A1)
   ]]></programlisting>
         
         
index 237a6ba..74e298c 100644 (file)
   ]]></programlisting>
         <para>2次元 dct</para>
         <programlisting role="example"><![CDATA[
-  //----------------------------------
-  function [z]=__milk_drop(x,y)
-      sq=x.^2+y.^2;
-      z= exp( exp(-sq).*(exp(cos(sq).^20)+8*sin(sq).^20+2*sin(2*(sq)).^8) );
+  function z = __milk_drop(x,y)
+      sq = x.^2+y.^2;
+      z = exp( exp(-sq).*(exp(cos(sq).^20)+8*sin(sq).^20+2*sin(2*(sq)).^8) );
   endfunction
-  x=-2:0.1:2;
-  A=eval3d(__milk_drop,x,x);
-  d=dct(A);
+  x = -2:0.1:2;
+  [X,Y] = ndgrid(x,x);
+  A = __milk_drop(X,Y);
+  d = dct(A);
   d(abs(d)<1)=0;
-  size(find(d1<>0),'*')
-  A1=dct(d,1);
-  clf();fig=gcf();fig.color_map=graycolormap(128);
-  subplot(121),grayplot(x,x,A)
-  subplot(122),grayplot(x,x,A1)
+  size(find(d<>0),'*')
+  A1 = dct(d,1);
+  clf
+  gcf().color_map = graycolormap(128);
+  subplot(121), grayplot(x,x,A)
+  subplot(122), grayplot(x,x,A1)
   ]]></programlisting>
     </refsection>
     <refsection role="see also">
index 499d981..b5f2e58 100644 (file)
@@ -110,6 +110,7 @@ std::unordered_map<std::wstring, std::wstring> DeprecatedChecker::initDep()
     map.emplace(L"fcontour2d", L"contour2d");
     map.emplace(L"fcontour", L"contour");
     map.emplace(L"fac3d", L"plot3d");
+    map.emplace(L"eval3d", L"ndgrid");
     map.emplace(L"str2code", L"");
     map.emplace(L"code2str", L"");
     map.emplace(L"perl", L"");