From: Sylvestre Ledru Date: Thu, 28 Feb 2013 15:58:41 +0000 (+0100) Subject: Add an image for the ndgrid X-Git-Tag: 5.4.1~355 X-Git-Url: http://gitweb.scilab.org/?p=scilab.git;a=commitdiff_plain;h=2553d554c0be4c13141033f273ac457a736e075f;hp=5b5fceb405f1982f57a46c167ef5d45ed11f8ec1 Add an image for the ndgrid Change-Id: I08fde7ca7f70b82f0bf794f9ad30d0b9a4264754 --- diff --git a/scilab/modules/elementary_functions/help/en_US/elementarymatrices/ndgrid.xml b/scilab/modules/elementary_functions/help/en_US/elementarymatrices/ndgrid.xml index 84b33d0..53b9c3b 100644 --- a/scilab/modules/elementary_functions/help/en_US/elementarymatrices/ndgrid.xml +++ b/scilab/modules/elementary_functions/help/en_US/elementarymatrices/ndgrid.xml @@ -136,6 +136,31 @@ clf() plot3d(XF,YF,ZF, flag=[0 6 3], leg="X@Y@Z") xtitle("A 3d grid !"); show_window() ]]> + +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 !"); + See Also diff --git a/scilab/modules/elementary_functions/help/pt_BR/elementarymatrices/ndgrid.xml b/scilab/modules/elementary_functions/help/pt_BR/elementarymatrices/ndgrid.xml index 144b4f9..c6c72c1 100644 --- a/scilab/modules/elementary_functions/help/pt_BR/elementarymatrices/ndgrid.xml +++ b/scilab/modules/elementary_functions/help/pt_BR/elementarymatrices/ndgrid.xml @@ -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() - + ]]> + +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() + + + +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() + Ver Também diff --git a/scilab/modules/elementary_functions/help/ru_RU/elementarymatrices/ndgrid.xml b/scilab/modules/elementary_functions/help/ru_RU/elementarymatrices/ndgrid.xml index 622ab67..f00ca9e 100644 --- a/scilab/modules/elementary_functions/help/ru_RU/elementarymatrices/ndgrid.xml +++ b/scilab/modules/elementary_functions/help/ru_RU/elementarymatrices/ndgrid.xml @@ -77,6 +77,16 @@ Z = f(X,Y); clf() plot3d(x,y,Z, flag=[2 6 4]); show_window() ]]> + +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() + + +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() + + Ð¡Ð¼Ð¾ÑÑÐ¸ÑÐµ ÑÐ°ÐºÐ¶Ðµ diff --git a/scilab/modules/helptools/images/ndgrid_2.png b/scilab/modules/helptools/images/ndgrid_2.png new file mode 100644 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 index 0000000..1bab679 Binary files /dev/null and b/scilab/modules/helptools/images/ndgrid_ru_RU_2.png differ