summaryrefslogtreecommitdiffstats
path: root/scilab/modules/elementary_functions
diff options
context:
space:
mode:
authorAllan CORNET <allan.cornet@scilab.org>2010-02-08 09:35:14 +0100
committerAllan CORNET <allan.cornet@scilab.org>2010-02-08 09:35:14 +0100
commit84a1563e352a07abaa744039c0fcd82df1c75986 (patch)
treee4bc9087965f7ba73469ea6cbc50954bd789cf20 /scilab/modules/elementary_functions
parent868779d1838afd10ccea0b9dc2dfc6cb227222a1 (diff)
downloadscilab-84a1563e352a07abaa744039c0fcd82df1c75986.zip
scilab-84a1563e352a07abaa744039c0fcd82df1c75986.tar.gz
remove obsolete function xbasc
Diffstat (limited to 'scilab/modules/elementary_functions')
-rw-r--r--scilab/modules/elementary_functions/help/pt_BR/binomial.xml4
-rw-r--r--scilab/modules/elementary_functions/help/pt_BR/dsearch.xml6
-rw-r--r--scilab/modules/elementary_functions/help/pt_BR/ndgrid.xml4
-rw-r--r--scilab/modules/elementary_functions/src/c/sci_tools.c2
4 files changed, 8 insertions, 8 deletions
diff --git a/scilab/modules/elementary_functions/help/pt_BR/binomial.xml b/scilab/modules/elementary_functions/help/pt_BR/binomial.xml
index 7789b80..bc8f8d0 100644
--- a/scilab/modules/elementary_functions/help/pt_BR/binomial.xml
+++ b/scilab/modules/elementary_functions/help/pt_BR/binomial.xml
@@ -86,13 +86,13 @@
86 86
87 <programlisting role="example"><![CDATA[ 87 <programlisting role="example"><![CDATA[
88// primeiro exemplo 88// primeiro exemplo
89n=10;p=0.3; xbasc(); plot2d3(0:n,binomial(p,n)); 89n=10;p=0.3; clf(); plot2d3(0:n,binomial(p,n));
90 90
91// segundo exemplo 91// segundo exemplo
92n=50;p=0.4; 92n=50;p=0.4;
93mea=n*p; sigma=sqrt(n*p*(1-p)); 93mea=n*p; sigma=sqrt(n*p*(1-p));
94x=( (0:n)-mea )/sigma; 94x=( (0:n)-mea )/sigma;
95xbasc() 95clf()
96plot2d(x, sigma*binomial(p,n)); 96plot2d(x, sigma*binomial(p,n));
97deff('y=Gauss(x)','y=1/sqrt(2*%pi)*exp(-(x.^2)/2)') 97deff('y=Gauss(x)','y=1/sqrt(2*%pi)*exp(-(x.^2)/2)')
98plot2d(x, Gauss(x), style=2); 98plot2d(x, Gauss(x), style=2);
diff --git a/scilab/modules/elementary_functions/help/pt_BR/dsearch.xml b/scilab/modules/elementary_functions/help/pt_BR/dsearch.xml
index dc4000d..354cf24 100644
--- a/scilab/modules/elementary_functions/help/pt_BR/dsearch.xml
+++ b/scilab/modules/elementary_functions/help/pt_BR/dsearch.xml
@@ -169,14 +169,14 @@ m = 50000 ; n = 10;
169X = grand(m,1,"def"); 169X = grand(m,1,"def");
170val = linspace(0,1,n+1)'; 170val = linspace(0,1,n+1)';
171[ind, occ] = dsearch(X, val); 171[ind, occ] = dsearch(X, val);
172xbasc() ; plot2d2(val, [occ/m;0]) // sem normalização: y deve ser próximo de 1/n 172clf() ; plot2d2(val, [occ/m;0]) // sem normalização: y deve ser próximo de 1/n
173 173
174// exemplo #2 (estatística elementar para B(N,p)) 174// exemplo #2 (estatística elementar para B(N,p))
175N = 8 ; p = 0.5; m = 50000; 175N = 8 ; p = 0.5; m = 50000;
176X = grand(m,1,"bin",N,p); val = (0:N)'; 176X = grand(m,1,"bin",N,p); val = (0:N)';
177[ind, occ] = dsearch(X, val, "d"); 177[ind, occ] = dsearch(X, val, "d");
178Pexp = occ/m; Pexa = binomial(p,N); 178Pexp = occ/m; Pexa = binomial(p,N);
179xbasc() ; hm = 1.1*max(max(Pexa),max(Pexp)); 179clf() ; hm = 1.1*max(max(Pexa),max(Pexp));
180plot2d3([val val+0.1], [Pexa' Pexp],[1 2],"111", ... 180plot2d3([val val+0.1], [Pexa' Pexp],[1 2],"111", ...
181 "Pexact@Pexp", [-1 0 N+1 hm],[0 N+2 0 6]) 181 "Pexact@Pexp", [-1 0 N+1 hm],[0 N+2 0 6])
182xtitle( "Distribuição binomial B("+string(N)+","+string(p)+") :" ... 182xtitle( "Distribuição binomial B("+string(N)+","+string(p)+") :" ...
@@ -197,7 +197,7 @@ deff("y=Kl(t,k,x)","y=(t-x(k)).*Ll(t,k,x).^2")
197deff("y=Kr(t,k,x)","y=(t-x(k+1)).*Lr(t,k,x).^2") 197deff("y=Kr(t,k,x)","y=(t-x(k+1)).*Lr(t,k,x).^2")
198// plotando a curva 198// plotando a curva
199Y = y(ind).*Hl(X,ind) + y(ind+1).*Hr(X,ind) + d(ind).*Kl(X,ind) + d(ind+1).*Kr(X,ind); 199Y = y(ind).*Hl(X,ind) + y(ind+1).*Hr(X,ind) + d(ind).*Kl(X,ind) + d(ind+1).*Kr(X,ind);
200xbasc(); plot2d(X,Y,2) ; plot2d(x,y,-9,"000") 200clf(); plot2d(X,Y,2) ; plot2d(x,y,-9,"000")
201xtitle("Um polinômio seccionado de hermite") 201xtitle("Um polinômio seccionado de hermite")
202// NOTE : a verificação pode ser feita adicionando-se : 202// NOTE : a verificação pode ser feita adicionando-se :
203// YY = interp(X,x,y,d); plot2d(X,YY,3,"000") 203// YY = interp(X,x,y,d); plot2d(X,YY,3,"000")
diff --git a/scilab/modules/elementary_functions/help/pt_BR/ndgrid.xml b/scilab/modules/elementary_functions/help/pt_BR/ndgrid.xml
index 5fdf370..09d6cc0 100644
--- a/scilab/modules/elementary_functions/help/pt_BR/ndgrid.xml
+++ b/scilab/modules/elementary_functions/help/pt_BR/ndgrid.xml
@@ -106,7 +106,7 @@ y = linspace(-1,1,ny);
106//deff("z=f(x,y)","z=128*x.^2 .*(1-x).^2 .*y.^2 .*(1-y).^2"); 106//deff("z=f(x,y)","z=128*x.^2 .*(1-x).^2 .*y.^2 .*(1-y).^2");
107deff("z=f(x,y)","z=x.^2 + y.^3") 107deff("z=f(x,y)","z=x.^2 + y.^3")
108Z = f(X,Y); 108Z = f(X,Y);
109xbasc() 109clf()
110plot3d(x,y,Z, flag=[2 6 4]); xselect() 110plot3d(x,y,Z, flag=[2 6 4]); xselect()
111 111
112// criando um grid 3d simples 112// criando um grid 3d simples
@@ -127,7 +127,7 @@ for j=1:ny
127 matrix(Z(:,j,:),[nx,nz])); 127 matrix(Z(:,j,:),[nx,nz]));
128 XF = [XF xf]; YF = [YF yf]; ZF = [ZF zf]; 128 XF = [XF xf]; YF = [YF yf]; ZF = [ZF zf];
129end 129end
130xbasc() 130clf()
131plot3d(XF,YF,ZF, flag=[0 6 3], leg="X@Y@Z") 131plot3d(XF,YF,ZF, flag=[0 6 3], leg="X@Y@Z")
132xtitle("A 3d grid !"); xselect() 132xtitle("A 3d grid !"); xselect()
133 ]]></programlisting> 133 ]]></programlisting>
diff --git a/scilab/modules/elementary_functions/src/c/sci_tools.c b/scilab/modules/elementary_functions/src/c/sci_tools.c
index c0e496c..25ec1fb 100644
--- a/scilab/modules/elementary_functions/src/c/sci_tools.c
+++ b/scilab/modules/elementary_functions/src/c/sci_tools.c
@@ -30,7 +30,7 @@
30 use HeapAlloc and VirtualAlloc (for scilab stack) 30 use HeapAlloc and VirtualAlloc (for scilab stack)
31 Correction Bug 1576 31 Correction Bug 1576
32 n=10000 32 n=10000
33 xbasc(); 33 clf();
34 plot2d([0,1],[0,n],0) 34 plot2d([0,1],[0,n],0)
35 xpols=[zeros(1,n); ones(2,n); zeros(1,n)]; 35 xpols=[zeros(1,n); ones(2,n); zeros(1,n)];
36 ypols=[2:n+1; 2:n+1; 1:n; 1:n]; 36 ypols=[2:n+1; 2:n+1; 1:n; 1:n];