Add an image for the ndgrid 41/10641/2
Sylvestre Ledru [Thu, 28 Feb 2013 15:58:41 +0000 (16:58 +0100)]
Change-Id: I08fde7ca7f70b82f0bf794f9ad30d0b9a4264754

scilab/modules/elementary_functions/help/en_US/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/helptools/images/ndgrid_2.png [new file with mode: 0644]
scilab/modules/helptools/images/ndgrid_ru_RU_2.png [new file with mode: 0644]

index 84b33d0..53b9c3b 100644 (file)
@@ -136,6 +136,31 @@ clf()
 plot3d(XF,YF,ZF, flag=[0 6 3], leg="X@Y@Z")
 xtitle("A 3d grid !"); show_window()
  ]]></programlisting>
+        <scilab:image>
+nx = 10; ny = 6; nz = 4;
+x = linspace(0,2,nx);
+y = linspace(0,1,ny);
+z = linspace(0,0.5,nz);
+[X,Y,Z] = ndgrid(x,y,z);
+
+XF=[]; YF=[]; ZF=[];
+
+for k=1:nz
+   [xf,yf,zf] = nf3d(X(:,:,k),Y(:,:,k),Z(:,:,k));
+   XF = [XF xf]; YF = [YF yf]; ZF = [ZF zf];
+end
+
+for j=1:ny
+   [xf,yf,zf] = nf3d(matrix(X(:,j,:),[nx,nz]),...
+                     matrix(Y(:,j,:),[nx,nz]),...
+                     matrix(Z(:,j,:),[nx,nz]));
+   XF = [XF xf]; YF = [YF yf]; ZF = [ZF zf];
+end
+
+clf()
+plot3d(XF,YF,ZF, flag=[0 6 3], leg="X@Y@Z")
+xtitle("A 3d grid !"); 
+        </scilab:image>
     </refsection>
     <refsection role="see also">
         <title>See Also</title>
index 144b4f9..c6c72c1 100644 (file)
@@ -92,7 +92,18 @@ deff("z=f(x,y)","z=x.^2 + y.^3")
 Z = f(X,Y);
 clf()
 plot3d(x,y,Z, flag=[2 6 4]); show_window()
-
+ ]]></programlisting>
+        <scilab:image>
+nx = 40; ny = 40;
+x = linspace(-1,1,nx);
+y = linspace(-1,1,ny);
+[X,Y] = ndgrid(x,y);
+//deff("z=f(x,y)","z=128*x.^2 .*(1-x).^2 .*y.^2 .*(1-y).^2");
+deff("z=f(x,y)","z=x.^2 + y.^3")
+Z = f(X,Y);
+plot3d(x,y,Z, flag=[2 6 4]); show_window()
+        </scilab:image>
+        <programlisting role="example"><![CDATA[ 
 // criando um grid 3d simples
 nx = 10; ny = 6; nz = 4;
 x = linspace(0,2,nx);
@@ -115,6 +126,28 @@ clf()
 plot3d(XF,YF,ZF, flag=[0 6 3], leg="X@Y@Z")
 xtitle("A 3d grid !"); show_window()
  ]]></programlisting>
+        <scilab:image>
+nx = 10; ny = 6; nz = 4;
+x = linspace(0,2,nx);
+y = linspace(0,1,ny);
+z = linspace(0,0.5,nz);
+[X,Y,Z] = ndgrid(x,y,z);
+// tente exibir este grid 3d...
+XF=[]; YF=[]; ZF=[];
+for k=1:nz
+   [xf,yf,zf] = nf3d(X(:,:,k),Y(:,:,k),Z(:,:,k));
+   XF = [XF xf]; YF = [YF yf]; ZF = [ZF zf];
+end
+for j=1:ny
+   [xf,yf,zf] = nf3d(matrix(X(:,j,:),[nx,nz]),...
+                     matrix(Y(:,j,:),[nx,nz]),...
+                     matrix(Z(:,j,:),[nx,nz]));
+   XF = [XF xf]; YF = [YF yf]; ZF = [ZF zf];
+end
+clf()
+plot3d(XF,YF,ZF, flag=[0 6 3], leg="X@Y@Z")
+xtitle("A 3d grid !"); show_window()
+        </scilab:image>
     </refsection>
     <refsection role="see also">
         <title>Ver Também</title>
index 622ab67..f00ca9e 100644 (file)
@@ -77,6 +77,16 @@ Z = f(X,Y);
 clf()
 plot3d(x,y,Z, flag=[2 6 4]); show_window()
  ]]></programlisting>
+    <scilab:image>
+nx = 40; ny = 40;
+x = linspace(-1,1,nx);
+y = linspace(-1,1,ny);
+[X,Y] = ndgrid(x,y);
+
+deff("z=f(x,y)","z=x.^2 + y.^3")
+Z = f(X,Y);
+plot3d(x,y,Z, flag=[2 6 4]); show_window()
+    </scilab:image>
         <programlisting role="example"><![CDATA[  
 // создание простой трёхмерной координатной сетки
 nx = 10; ny = 6; nz = 4;
@@ -104,6 +114,32 @@ clf()
 plot3d(XF,YF,ZF, flag=[0 6 3], leg="X@Y@Z")
 xtitle("Трёхмерная сетка!"); show_window()
  ]]></programlisting>
+    <scilab:image localized="true">
+nx = 10; ny = 6; nz = 4;
+x = linspace(0,2,nx);
+y = linspace(0,1,ny);
+z = linspace(0,0.5,nz);
+[X,Y,Z] = ndgrid(x,y,z);
+XF=[]; YF=[]; ZF=[];
+for k=1:nz
+   [xf,yf,zf] = nf3d(X(:,:,k), Y(:,:,k), Z(:,:,k));
+   XF = [XF xf]; YF = [YF yf]; ZF = [ZF zf];
+end
+for j=1:ny
+   [xf,yf,zf] = nf3d(matrix(X(:,j,:),[nx,nz]),..
+                     matrix(Y(:,j,:),[nx,nz]),..
+                     matrix(Z(:,j,:),[nx,nz]));
+   XF = [XF xf]; YF = [YF yf]; ZF = [ZF zf];
+end
+clf()
+plot3d(XF,YF,ZF, flag=[0 6 3], leg="X@Y@Z")
+xtitle("Трёхмерная сетка!"); show_window()
+
+    </scilab:image>
     </refsection>
     <refsection role="see also">
         <title>Смотрите также</title>
diff --git a/scilab/modules/helptools/images/ndgrid_2.png b/scilab/modules/helptools/images/ndgrid_2.png
new file mode 100644 (file)
index 0000000..aec9de0
Binary files /dev/null and b/scilab/modules/helptools/images/ndgrid_2.png differ
diff --git a/scilab/modules/helptools/images/ndgrid_ru_RU_2.png b/scilab/modules/helptools/images/ndgrid_ru_RU_2.png
new file mode 100644 (file)
index 0000000..1bab679
Binary files /dev/null and b/scilab/modules/helptools/images/ndgrid_ru_RU_2.png differ