X-Git-Url: http://gitweb.scilab.org/?p=scilab.git;a=blobdiff_plain;f=scilab%2Fmodules%2Felementary_functions%2Fhelp%2Fru_RU%2Felementarymatrices%2Fndgrid.xml;h=f00ca9eb9a056395ea8c5b457621500107b19b54;hp=622ab67c7f87df413414b29d46eb7d652c4b7e65;hb=2553d554c0be4c13141033f273ac457a736e075f;hpb=5b5fceb405f1982f57a46c167ef5d45ed11f8ec1 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() + + Ð¡Ð¼Ð¾ÑÑÐ¸ÑÐµ ÑÐ°ÐºÐ¶Ðµ