function display_car_trajectory(state)
bigL=1
- set figure_style new;clf();xselect()
+ set figure_style new;xbasc();xselect()
a=gca()
drawlater()
a.isoview="on"
xtitle('PLANT and CONTROLLER')
-// xset("window",0);clf();xselect();
+// xset("window",0);xbasc();xselect();
// plot2d(xx,yy,ones(1,16),'022');
// xstring(28,30,'K');xstring(56,30,'Plant');xstring(12,28.80,'-');
// xtitle('PLANT and CONTROLLER')
[Slqg,Rlqg,Tlqg]=sensi(P22,Klqg); //Sensitivity functions
frq=logspace(-3,3); //10^-3 to 10^3
y=svplot(Slqg); //Computes singular values;
-clf();xset("window",0);gainplot(frq,y) //Plot sing. values
+xbasc();xset("window",0);gainplot(frq,y) //Plot sing. values
w1=1/(s+1);
w2=100;
[Ptmp,r]=augment(P22,'SR'); //"S/KS" problem
y=svplot(Sinf); //Computes singular values;
xset("window",1);xselect();gainplot(frq,y) //Plot sing. values
-clf();t=0:0.01:30;u=sin(t);
+xbasc();t=0:0.01:30;u=sin(t);
plot2d([t',t'],[u',(flts(u,dscr(Tlqg,0.1))')])
clear s n Plant P22 ny nu nx Qx Qu bigQ Rx Ry bigR bigQ Plqg r
xx=[xmin,xmin,x([1 2 2 7 4 6 3 4 5 6 3 3 5 5]);xmax,xmax,x([3,2,7,7,5,8,3,4,5,6,4,4,6,6])];
yy=[ymin,ymax,y([3,1,1,1,3,3,2,2,2,2,2,4,2,4]);ymin,ymax,y([3,3,1,3,3,3,4,4,4,4,2,4,2,4])];
-xset("window",0);clf();xselect();
+xset("window",0);xbasc();xselect();
plot2d(xx,yy,ones(1,16),'022');
xstring(28,30,'K');xstring(56,30,'Plant');xstring(12,28.80,'-');
xtitle('PLANT and CONTROLLER')
xx=[xmin,xmin,x([1 2 2 7 4 6 3 4 5 6 3 3 5 5]);xmax,xmax,x([3,2,7,7,5,8,3,4,5,6,4,4,6,6])];
yy=[ymin,ymax,y([3,1,1,1,3,3,2,2,2,2,2,4,2,4]);ymin,ymax,y([3,3,1,3,3,3,4,4,4,4,2,4,2,4])];
-xset("window",0);clf();xselect();
+xset("window",0);xbasc();xselect();
plot2d(xx,yy,ones(1,16),'022');
xstring(28,30,'K');xstring(56,30,'Plant');xstring(12,28.80,'-');
xtitle('PLANT and CONTROLLER')
break
case 1
mode(1)
- clf(1);xset("window",1);xselect();bode(Tpid);
+ xbasc(1);xset("window",1);xselect();bode(Tpid);
mode(-1)
case 2
if Plant(4)=='c' then
warning('Demo stops!');return;
end
if n1==1 then
- clf(1);xset("window",1);xselect();
+ xbasc(1);xset("window",1);xselect();
plot2d([t',t'],[(csim('step',t,Tpid))',ones(t')])
end
if n1==2 then
- clf(1);xset("window",1);xselect();
+ xbasc(1);xset("window",1);xselect();
plot2d([t',t'],[(csim('impul',t,Tpid))',0*t'])
end
mode(-1)
case 1 then
mode(1)
u=ones(1,Tmax);u(1)=0;
- clf(1);xset("window",1);xselect();
+ xbasc(1);xset("window",1);xselect();
plot2d([(1:Tmax)',(1:Tmax)'],[(dsimul(Tpid,u))',(ones(1:Tmax)')])
mode(-1)
case 2 then
mode(1)
u=zeros(1,Tmax);u(1)=1;
- clf(1);xset("window",1);xselect();
+ xbasc(1);xset("window",1);xselect();
plot2d((1:Tmax)',(dsimul(Tpid,u))')
mode(-1)
end
<programlisting role="example"><![CDATA[
v=ones(1,20);
-clf();
+xbasc();
plot2d1('enn',0,[v';zeros(80,1)],2,'051',' ',[1,-0.5,100,1.5])
[d,n,e]=arl2(v,poly(1,'z','c'),1)
s=poly(0,'s');rand('seed',0);w=ssrand(1,1,3);w('A')=w('A')-2*eye();
t=0:0.05:5;
//impulse(w) = step (s * w)
-clf(0);xset("window",0);xselect();
+xbasc(0);xset("window",0);xselect();
plot2d([t',t'],[(csim('step',t,tf2ss(s)*w))',0*t'])
-clf(1);xset("window",1);xselect();
+xbasc(1);xset("window",1);xselect();
plot2d([t',t'],[(csim('impulse',t,w))',0*t'])
//step(w) = impulse (s^-1 * w)
-clf(3);xset("window",3);xselect();
+xbasc(3);xset("window",3);xselect();
plot2d([t',t'],[(csim('step',t,w))',0*t'])
-clf(4);xset("window",4);xselect();
+xbasc(4);xset("window",4);xselect();
plot2d([t',t'],[(csim('impulse',t,tf2ss(1/s)*w))',0*t'])
//input defined by a time function
deff('u=input(t)','u=abs(sin(t))')
-clf();plot2d([t',t'],[(csim(input,t,w))',0*t'])
+xbasc();plot2d([t',t'],[(csim(input,t,w))',0*t'])
]]></programlisting>
SYS1.X0 = inistate(SYS1,Y',U');
Y1=flts(U,SYS1);
-clf();plot2d((1:nsmp)',[Y',Y1'])
+xbasc();plot2d((1:nsmp)',[Y',Y1'])
]]></programlisting>
SYS1=syslin(1,A,B,C,D,X0);
Y1=flts(U,SYS1);
-clf();plot2d((1:nsmp)',[Y',Y1'])
+xbasc();plot2d((1:nsmp)',[Y',Y1'])
]]></programlisting>
</refsection>
SYS1.X0 = inistate(SYS1,Y',U');
Y1=flts(U,SYS1);
-clf();plot2d((1:nsmp)',[Y',Y1'])
+xbasc();plot2d((1:nsmp)',[Y',Y1'])
]]></programlisting>
</refsection>
Y1=flts(U,SYS1);
-clf();plot2d((1:nsmp)',[Y',Y1'])
+xbasc();plot2d((1:nsmp)',[Y',Y1'])
]]></programlisting>
</refsection>
[frq,rep]=repfreq(Sys,frq); //Frequency response of Sys
[Sys2,err]=frep2tf(frq,rep,10);Sys2=clean(Sys2)//Sys2 obtained from freq. resp of Sys
[frq,rep2]=repfreq(Sys2,frq); //Frequency response of Sys2
-clf();bode(frq,[rep;rep2]) //Responses of Sys and Sys2
+xbasc();bode(frq,[rep;rep2]) //Responses of Sys and Sys2
[sort(spec(Sys('A'))),sort(roots(Sys2('den')))] //poles
dom=1/1000; // Sampling time
frq=(0:0.01:0.5)/dom;repf=repfreq(h,frq);
[Sys2,err]=frep2tf(frq,repf,3,dom);
[frq,rep2]=repfreq(Sys2,frq); //Frequency response of Sys2
-clf();plot2d1("onn",frq',abs([repf;rep2])');
+xbasc();plot2d1("onn",frq',abs([repf;rep2])');
]]></programlisting>
s=poly(0,'s');
h=syslin('c',(s-1)/(1+5*s+s^2+s^3))
-clf();evans(h)
+xbasc();evans(h)
K=kpure(h)
hf=h/.K(1)
roots(denom(hf))
<programlisting role="example"><![CDATA[
h=syslin('c',352*poly(-5,'s')/poly([0,0,2000,200,25,1],'s','c'));
-clf();evans(h,100)
+xbasc();evans(h,100)
g=krac2(h)
hf1=h/.g(1);roots(denom(hf1))
hf2=h/.g(2);roots(denom(hf2))
nyquist(h,0.01,100,'(s^2+2*0.9*10*s+100)/(s^2+2*0.3*10.1*s+102.01)')
m_circle();
//Example 2:
- clf();
+ xbasc();
h1=h*syslin('c',(s^2+2*0.1*15.1*s+228.01)/(s^2+2*0.9*15*s+225))
nyquist([h1;h],0.01,100,['h1';'h'])
m_circle([-8 -6 -4]);
SYS1.X0 = inistate(SYS1,Y',U');
Y1=flts(U,SYS1);
-clf();plot2d((1:nsmp)',[Y',Y1'])
+xbasc();plot2d((1:nsmp)',[Y',Y1'])
SYS1.X0 = inistate(SYS1,Y',U');
Y1=flts(U,SYS1);
-clf();plot2d((1:nsmp)',[Y',Y1'])
+xbasc();plot2d((1:nsmp)',[Y',Y1'])
]]></programlisting>
</refsection>
x=logspace(-3,3);
y=svplot(ssrand(2,2,4),x);
-clf();plot2d1("oln",x',20*log(y')/log(10));
+xbasc();plot2d1("oln",x',20*log(y')/log(10));
xgrid(12)
xtitle("Singular values plot","(Rd/sec)", "Db");
y1=csim(u,instants,sl);plot2d(instants',y1');
clear u;
// Impulse response;
-yi=csim('imp',instants,sl);clf();plot2d(instants',yi');
+yi=csim('imp',instants,sl);xbasc();plot2d(instants',yi');
yi1=csim('step',instants,s*sl);plot2d(instants',yi1');
// Discretization
//5+7 by C function
call('foo',5,1,'d',7,2,'d','out',[1,1],3,'d')
-end
+end
\ No newline at end of file
<title>Examples</title>
<programlisting role="example"><![CDATA[
demolist=[
- 'Simulation of a binomial random variable','set figure_style new;clf();BinomialT();';
- 'Simulation of a discrete random variable','set figure_style new;clf();RndDiscT();';
- 'Simulation of a geometric random variable','set figure_style new;clf();GeomT(1000);';
- 'Simulation of a Poisson random variable','set figure_style new;clf();PoissonT() ;';
- 'Simulation of an exponential random variable','set figure_style new;clf();ExpT();';
- 'Simulation of a Weibull random variable','set figure_style new;clf();WeibullT();';
- 'Simulation of an hyper geometric random variable','set figure_style new;clf();HyperGeomT();';
- 'Simulation of an Erlang random variable','set figure_style new;clf();ErlangT();'];
+ 'Simulation of a binomial random variable','set figure_style new;xbasc();BinomialT();';
+ 'Simulation of a discrete random variable','set figure_style new;xbasc();RndDiscT();';
+ 'Simulation of a geometric random variable','set figure_style new;xbasc();GeomT(1000);';
+ 'Simulation of a Poisson random variable','set figure_style new;xbasc();PoissonT() ;';
+ 'Simulation of an exponential random variable','set figure_style new;xbasc();ExpT();';
+ 'Simulation of a Weibull random variable','set figure_style new;xbasc();WeibullT();';
+ 'Simulation of an hyper geometric random variable','set figure_style new;xbasc();HyperGeomT();';
+ 'Simulation of an Erlang random variable','set figure_style new;xbasc();ErlangT();'];
demo_function_choice();
]]></programlisting>
<title>Exemples</title>
<programlisting role="example"><![CDATA[
demolist=[
- 'Simulation of a binomial random variable','set figure_style new;clf();BinomialT();';
- 'Simulation of a discrete random variable','set figure_style new;clf();RndDiscT();';
- 'Simulation of a geometric random variable','set figure_style new;clf();GeomT(1000);';
- 'Simulation of a Poisson random variable','set figure_style new;clf();PoissonT() ;';
- 'Simulation of an exponential random variable','set figure_style new;clf();ExpT();';
- 'Simulation of a Weibull random variable','set figure_style new;clf();WeibullT();';
- 'Simulation of an hyper geometric random variable','set figure_style new;clf();HyperGeomT();';
- 'Simulation of an Erlang random variable','set figure_style new;clf();ErlangT();'];
+ 'Simulation of a binomial random variable','set figure_style new;xbasc();BinomialT();';
+ 'Simulation of a discrete random variable','set figure_style new;xbasc();RndDiscT();';
+ 'Simulation of a geometric random variable','set figure_style new;xbasc();GeomT(1000);';
+ 'Simulation of a Poisson random variable','set figure_style new;xbasc();PoissonT() ;';
+ 'Simulation of an exponential random variable','set figure_style new;xbasc();ExpT();';
+ 'Simulation of a Weibull random variable','set figure_style new;xbasc();WeibullT();';
+ 'Simulation of an hyper geometric random variable','set figure_style new;xbasc();HyperGeomT();';
+ 'Simulation of an Erlang random variable','set figure_style new;xbasc();ErlangT();'];
demo_function_choice();
]]></programlisting>
else
set('figure_style','old');
xdel();
- clf();
+ xbasc();
demoexc(num);
end
end
return
else
xdel(0);
- clf();
+ xbasc();
demoex(num);
end
end
<programlisting role="example">
// first example
-n=10;p=0.3; clf(); plot2d3(0:n,binomial(p,n));
+n=10;p=0.3; xbasc(); plot2d3(0:n,binomial(p,n));
// second example
n=50;p=0.4;
mea=n*p; sigma=sqrt(n*p*(1-p));
x=( (0:n)-mea )/sigma;
-clf()
+xbasc()
plot2d(x, sigma*binomial(p,n));
deff('y=Gauss(x)','y=1/sqrt(2*%pi)*exp(-(x.^2)/2)')
plot2d(x, Gauss(x), style=2);
X = grand(m,1,"def");
val = linspace(0,1,n+1)';
[ind, occ] = dsearch(X, val);
-clf() ; plot2d2(val, [occ/m;0]) // no normalisation : y must be near 1/n
+xbasc() ; plot2d2(val, [occ/m;0]) // no normalisation : y must be near 1/n
// example #2 (elementary stat for B(N,p))
X = grand(m,1,"bin",N,p); val = (0:N)';
[ind, occ] = dsearch(X, val, "d");
Pexp = occ/m; Pexa = binomial(p,N);
-clf() ; hm = 1.1*max(max(Pexa),max(Pexp));
+xbasc() ; hm = 1.1*max(max(Pexa),max(Pexp));
plot2d3([val val+0.1], [Pexa' Pexp],[1 2],"111", ...
"Pexact@Pexp", [-1 0 N+1 hm],[0 N+2 0 6])
xtitle( "binomial distribution B("+string(N)+","+string(p)+") :" ...
// plot the curve
Y = y(ind).*Hl(X,ind) + y(ind+1).*Hr(X,ind) + d(ind).*Kl(X,ind) + d(ind+1).*Kr(X,ind);
-clf(); plot2d(X,Y,2) ; plot2d(x,y,-9,"000")
+xbasc(); plot2d(X,Y,2) ; plot2d(x,y,-9,"000")
xtitle("an Hermite piecewise polynomial")
// NOTE : you can verify by adding these ones :
// YY = interp(X,x,y,d); plot2d(X,YY,3,"000")
zz2 = interp2d(XX,YY, x, y, C, "by_zero");
zz3 = interp2d(XX,YY, x, y, C, "periodic");
zz4 = interp2d(XX,YY, x, y, C, "natural");
-clf()
+xbasc()
subplot(2,2,1)
plot3d(xx, yy, zz1, flag=[2 6 4])
xtitle("extrapolation with the C0 outmode")
//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);
-clf()
+xbasc()
plot3d(x,y,Z, flag=[2 6 4]); xselect()
// create a simple 3d grid
XF = [XF xf]; YF = [YF yf]; ZF = [ZF zf];
end
-clf()
+xbasc()
plot3d(XF,YF,ZF, flag=[0 6 3], leg="X@Y@Z")
xtitle("A 3d grid !"); xselect()
</programlisting>
[XX,YY] = ndgrid(xx,yy);
zz = interp2d(XX,YY, x, y, C);
emax = max(abs(zz - cos(xx')*cos(yy)));
-clf()
+xbasc()
plot3d(xx, yy, zz, flag=[2 4 4])
[X,Y] = ndgrid(x,y);
param3d1(X,Y,list(z,-9*ones(1,n)), flag=[0 0])
ZP3 = interp2d(XP, YP, x, y, splin2d(x, y, z, "natural"));
ZP4 = interp2d(XP, YP, x, y, splin2d(x, y, z, "monotone"));
xset("colormap", jetcolormap(64))
-clf()
+xbasc()
subplot(2,2,1)
plot3d1(xp, yp, ZP1, flag=[2 2 4])
xtitle("not_a_knot")
zp1 = interp2d(XP, YP, x, x, splin2d(x,x,z));
zp2 = interp2d(XP, YP, x, x, splin2d(x,x,z,"monotone"));
// plot
-clf()
+xbasc()
xset("colormap",jetcolormap(128))
subplot(1,2,1)
plot3d1(xp, xp, zp1, flag=[-2 6 4])
<para>
This function is used to select a graphics driver, or with no arguments
to get the current graphics driver name.
+ Most of the time, a user can ignore this function and change the driver
+ by calling high level functions such as <literal>xbasc</literal>.
The selected driver can be one of the followings:
</para>
<variablelist>
]]></programlisting>
</refsection>
<refsection>
+ <title>See Also</title>
+ <simplelist type="inline">
+ <member>
+ <link linkend="xbasc">xbasc</link>
+ </member>
+ </simplelist>
+ </refsection>
+ <refsection>
<title>Authors</title>
<para>J.Ph.C. </para>
</refsection>
x=1:.5:100;
y=2:200;
xset("window",0);
-clf();
+xbasc();
// l,r,t,b
xsetech(arect=[.01,.01,.01,.01]);
plot2d(x,y,frameflag=8,axesflag=1);
x=1:.5:100;
y=2:200;
xset("window",0);
-clf();
+xbasc();
// l,r,t,b
xsetech(arect=[.01,.01,.01,.01]);
plot2d(x,y,frameflag=8,axesflag=1);
//
function[]=bike()
-clf();xselect()
+xbasc();xselect()
rect=[0,0,10,10];
-clf();
+xbasc();
isoview(0,11,0,7)
//plot2d([],[],[1],"010"," ",rect);
h = [r g b];
xset('colormap',h);
xset('fpf',' ');
-clf();
+xbasc();
contourf([],[],z,[-6:-1,-logspace(-5,0,10),logspace(-5,0,10),1:8],0*ones(1,m))
xset('fpf','');
halt()
-clf();
+xbasc();
contourf([],[],z,[-6:-1,-logspace(-5,0,10),logspace(-5,0,10),1:8]);
mode(0)
path=get_absolute_file_path('fec.ex1');
getf(path+'fec_demo.sci');
-clf();
+xbasc();
xset("colormap",jetcolormap(128));
new_style = get("figure_style")=="new";
messagebox('click to continue',"modal");
-clf();
+xbasc();
drawlater();
emc2C(1,6,path+'MESH.VAL',[-2,-2,2,2]);
emc2V(2,3,6,20,path+'MESH.VAL',[-2,-2,2,2]);
//
mode(-1);
-clf();
+xbasc();
drawlater();
mode(1);
ncolor=228;
en=ene1(t,pe1,pe2);
//
-clf()
+xbasc()
plot2d([t;t]',yt')
xtitle(['main intensity';'resistor'],...
'time','intensity');
//
cw=xget("window");c_c=cw;if cw>=1 then;cw=cw-1;else cw=cw+1;end
-xset("window",cw); clf(cw);
+xset("window",cw); xbasc(cw);
plot2d2("gnn",t',en',[1,-1],"111",...
"en",[mini(t),mini(en)-0.5,maxi(t),maxi(en)+0.5])
xset("window",c_c);
//
// save('oscil.sa');
halt();
-clf(0:1);
+xbasc(0:1);
omeg=exp(log(10)*(-3:0.05:3));
rep_freq=exp(-tr*omeg*%i*2*%pi).*repfreq(h,omeg);
bode(omeg,rep_freq);halt()
- halt();clf();
+ halt();xbasc();
black(omeg,rep_freq);
halt()
//
// -------------------------------
e=100.d-6*ones(1,400);
[tetae,x]=ddls_sim(ad,bd,c,tr,td,e);
- clf();
+ xbasc();
plot2d1("onn",(1:400)'*td,[e;tetae]');
xtitle(['step 100mrd';'response']);
halt()
// ---------------------------------------------
s1=1.d-5*sin(200*%pi*(1:600)*td);
[tetas1,x]=ddls_sim(ad,bd,c,tr,td,s1);
- clf();
+ xbasc();
plot2d1("onn",(1:600)'*td,[s1;tetas1]');
xtitle(['sinusoidale input 10mrd 100hz';'response']);
halt()
// ---------------------------------------------
s2=3.d-5*sin(600*%pi*(1:600)*td);
[tetas2,x]=ddls_sim(ad,bd,c,tr,td,s2);
- clf();
+ xbasc();
plot2d1("onn",(1:600)'*td,[s2;tetas2]');
xtitle(['sinus input 3mrd 300hz';'response']);
//
// demo of macros portrait & fchamp
// limit circle
-clf();
+xbasc();
part1()
// phase portrait : dimension 2
portrait(cycllim,'default',[-2,-2,2,2],[500,0.1],'f',[0,1;0.5,2]);
-demolist=['Surface with holes 1','clf();showinstr(hole3d);hole3d();';
- 'Surface with holes 2','clf();showinstr(hole3d1);hole3d1();';
- 'Sphere','clf();showinstr(sphere);sphere();';
- 'Shell','clf();showinstr(shell);shell();';
- 'Spiral','clf();showinstr(spiral);spiral();';
- 'Rings','clf();showinstr(rings);rings();';
- 'Torus','clf();showinstr(torus);torus();';
- 'Torus 1','clf();showinstr(torus1);torus1();';
- 'Moebius','clf();showinstr(moebius);moebius();';
- 'Tube','clf();showinstr(tube);tube(50);';
- 'Black Hole','clf();showinstr(bh);bh(50);';
- 'Riemann surface (n=2)','clf();showinstr(cplxroot);cplxroot(2,20,130,45);']
+demolist=['Surface with holes 1','xbasc();showinstr(hole3d);hole3d();';
+ 'Surface with holes 2','xbasc();showinstr(hole3d1);hole3d1();';
+ 'Sphere','xbasc();showinstr(sphere);sphere();';
+ 'Shell','xbasc();showinstr(shell);shell();';
+ 'Spiral','xbasc();showinstr(spiral);spiral();';
+ 'Rings','xbasc();showinstr(rings);rings();';
+ 'Torus','xbasc();showinstr(torus);torus();';
+ 'Torus 1','xbasc();showinstr(torus1);torus1();';
+ 'Moebius','xbasc();showinstr(moebius);moebius();';
+ 'Tube','xbasc();showinstr(tube);tube(50);';
+ 'Black Hole','xbasc();showinstr(bh);bh(50);';
+ 'Riemann surface (n=2)','xbasc();showinstr(cplxroot);cplxroot(2,20,130,45);']
getf(path+'Macros.sci');
getf(path+'surfaces.sci');
//
mode(-1)
-clf() ;
+xbasc() ;
xset('color',2)
function z=surf2(x,y), z=x^2-y^2, endfunction
function z=surf3(x,y), z=x^3+y^2, endfunction
function z=surf4(x,y), z=x^2+y^2, endfunction
-clf()
+xbasc()
xset("colormap",[jetcolormap(64);hotcolormap(64)])
x = linspace(-1,1,60);
y = linspace(-1,1,60);
// example #2: plot surf3 and add some contour lines
function z=surf3(x,y), z=x^3+y^2, endfunction
-clf()
+xbasc()
x = linspace(-1,1,60);
y = linspace(-1,1,60);
xset("colormap",hotcolormap(128))
// example #3: plot surf3 and use zminmax and colout optional arguments
// to restrict the plot for -0.5<= z <= 1
function z=surf3(x,y), z=x^3+y^2, endfunction
-clf()
+xbasc()
x = linspace(-1,1,60);
y = linspace(-1,1,60);
xset("colormap",jetcolormap(128))
x = linspace(0,1,81);
z = cos(2*%pi*x)'*sin(2*%pi*x);
zm = min(z); zM = max(z);
-clf()
+xbasc()
xset("colormap",jetcolormap(64))
colorbar(zm,zM)
Sgrayplot(x,x,z)
zm = min(z); zM = max(z);
zz = abs(0.5*cos(2*%pi*x)'*cos(2*%pi*x));
zzm = min(zz); zzM = max(zz);
-clf();
+xbasc();
xset("colormap",jetcolormap(64))
drawlater() ;
zzm = min(zz); zzM = max(zz);
[xf,yf,zf]=genfac3d(x,x,zz);
nb_col = 64;
-clf()
+xbasc()
xset("colormap",hotcolormap(nb_col))
drawlater() ;
colorbar(zzm,zzM,fmt="%.1f")
contour(t,t,my_surface,10)
// changing the format of the printing of the levels
xset("fpf","%.1f")
-clf()
+xbasc()
contour(t,t,my_surface,10)
// 3D
-clf()
+xbasc()
z=feval(t,t,my_surface);
plot3d(t,t,z);contour(t,t,z+0.2*abs(z),20,flag=[0 2 4]);
//
h = [r g b];
xset('colormap',h);
xset('fpf',' ');
-clf();
+xbasc();
contourf([],[],z,[-6:-1,-logspace(-5,0,10),logspace(-5,0,10),1:8],0*ones(1,m))
xset('fpf','');
-clf();
+xbasc();
contourf([],[],z,[-6:-1,-logspace(-5,0,10),logspace(-5,0,10),1:8]);
<para>J.Ph.C.</para>
</refsection>
-</refentry>
+</refentry>
\ No newline at end of file
T = [1 1 2 3 1;
2 3 4 1 1];
z = [0 1 0 -1]; // values of the func at each vertices
-clf()
+xbasc()
xset("colormap",jetcolormap(64))
subplot(1,2,1)
colorbar(-1,1)
// this example shows the effect of zminmax and uses the
// previous example datas (you have to execute the it before)
-clf()
+xbasc()
xset("colormap",jetcolormap(64))
colorbar(-0.5,0.5) // be careful colorbar must be set by hands !
fec(x,y,T,z,strf="040", zminmax=[-0.5 0.5], mesh=%t)
// this example shows the effect of zminmax and colout. It uses
// also the datas of the first example (you have to execute the it before)
-clf()
+xbasc()
xset("colormap",jetcolormap(64))
subplot(2,2,1)
colorbar(-0.5,0.5)
// this example shows a feature from colminmax:
// playing with 2 colormaps for 2 subplots. It
// uses also the data of the first example.
-clf()
+xbasc()
xset("colormap",[hotcolormap(64);jetcolormap(64)])
subplot(1,2,1)
colorbar(-1,1,[1 64])
<programlisting role="example"><![CDATA[
y=(0:0.33:145.78)';
- clf();plot2d1('enn',0,y)
+ xbasc();plot2d1('enn',0,y)
[ymn,ymx,np]=graduate(mini(y),maxi(y))
rect=[1,ymn,prod(size(y)),ymx];
- clf();plot2d1('enn',0,y,1,'011',' ',rect,[10,3,10,np])
+ xbasc();plot2d1('enn',0,y,1,'011',' ',rect,[10,3,10,np])
]]></programlisting>
</refsection>
h.data_mapping="direct";
// A 2D ploting of a matrix using colors
- clf()
+ xbasc()
a=get("current_axes");
a.data_bounds= [0,0;4,4];
// example #2: histogram of a binomial (B(6,0.5)) random sample
d = grand(1000,1,"bin", 6, 0.5);
c = linspace(-0.5,6.5,8);
-clf()
+xbasc()
subplot(2,1,1)
histplot(c, d, style=2)
xtitle("normalized histogram")
lambda = 2;
X = grand(100000,1,"exp", 1/lambda);
Xmax = max(X);
-clf()
+xbasc()
histplot(40, X, style=2)
x = linspace(0,max(Xmax),100)';
plot2d(x,lambda*exp(-lambda*x),strf="000",style=5)
t=[0:0.1:2*%pi]';
plot2d(sin(t),cos(t))
-clf()
+xbasc()
isoview(-1,1,-1,1)
plot2d(sin(t),cos(t),1,"001")
xset("default")
// simple plot
oldplot(sin(x))
// using captions
-clf()
+xbasc()
oldplot(x,sin(x),"sin","time","plot of sinus")
// plot 2 functions
-clf()
+xbasc()
oldplot([sin(x);cos(x)])
]]></programlisting>
plotting is used.</para>
<para>By default, successive plots are superposed. To clear the previous
- plot, use <literal>clf()</literal>.</para>
+ plot, use <literal>xbasc()</literal>.</para>
<para>See the meaning of the parameters above for a complete
description.</para>
//simple plot
x=[0:0.1:2*%pi]';
plot2d(sin(x))
-clf()
+xbasc()
plot2d(x,sin(x))
//multiple plot
-clf()
+xbasc()
plot2d(x,[sin(x) sin(2*x) sin(3*x)])
// multiple plot giving the dimensions of the frame
// old syntax and new syntax
-clf()
+xbasc()
plot2d(x,[sin(x) sin(2*x) sin(3*x)],1:3,"011","",[0,0,6,0.5])
-clf()
+xbasc()
plot2d(x,[sin(x) sin(2*x) sin(3*x)],rect=[0,0,6,0.5])
//multiple plot with captions and given tics // old syntax and new syntax
-clf()
+xbasc()
plot2d(x,[sin(x) sin(2*x) sin(3*x)],..
[1,2,3],"111","L1@L2@L3",[0,-2,2*%pi,2],[2,10,2,10]);
-clf()
+xbasc()
plot2d(x,[sin(x) sin(2*x) sin(3*x)],..
[1,2,3],leg="L1@L2@L3",nax=[2,10,2,10],rect=[0,-2,2*%pi,2])
// isoview
-clf()
+xbasc()
plot2d(x,sin(x),1,"041")
// scale
-clf()
+xbasc()
plot2d(x,sin(x),1,"061")
// auto scaling with previous plots
-clf()
+xbasc()
plot2d(x,sin(x),1)
plot2d(x,2*sin(x),2)
plot2d(2*x,cos(x),3)
// axis on the right
-clf()
+xbasc()
plot2d(x,sin(x),1,"183","sin(x)")
// centered axis
-clf()
+xbasc()
plot2d(x,sin(x),1,"184","sin(x)")
// axis centered at (0,0)
-clf()
+xbasc()
plot2d(x-4,sin(x),1,"185","sin(x)")
</programlisting>
<member><link linkend="plot2d4">plot2d4</link></member>
- <member><link linkend="clf">clf</link></member>
+ <member><link linkend="xbasc">xbasc</link></member>
<member><link linkend="xset">xset</link></member>
</simplelist>
<para>J.Ph.C.</para>
</refsection>
-</refentry>
+</refentry>
\ No newline at end of file
plot3d(t,t,z)
// same plot using facets computed by genfac3d
[xx,yy,zz]=genfac3d(t,t,z);
-clf()
+xbasc()
plot3d(xx,yy,zz)
// multiple plots
-clf()
+xbasc()
plot3d([xx xx],[yy yy],[zz 4+zz])
// multiple plots using colors
-clf()
+xbasc()
plot3d([xx xx],[yy yy],list([zz zz+4],[4*ones(1,400) 5*ones(1,400)]))
// simple plot with viewpoint and captions
-clf()
+xbasc()
plot3d(1:10,1:20,10*rand(10,20),35,45,"X@Y@Z",[2,2,3])
// plot of a sphere using facets computed by eval3dp
deff("[x,y,z]=sph(alp,tet)",["x=r*cos(alp).*cos(tet)+orig(1)*ones(tet)";..
"z=r*sin(alp)+orig(3)*ones(tet)"]);
r=1; orig=[0 0 0];
[xx,yy,zz]=eval3dp(sph,linspace(-%pi/2,%pi/2,40),linspace(0,%pi*2,20));
-clf();plot3d(xx,yy,zz)
+xbasc();plot3d(xx,yy,zz)
-clf();xset('colormap',hotcolormap(128));
+xbasc();xset('colormap',hotcolormap(128));
r=0.3;orig=[1.5 0 0];
[xx1,yy1,zz1]=eval3dp(sph,linspace(-%pi/2,%pi/2,40),linspace(0,%pi*2,20));
cc=(xx+zz+2)*32;cc1=(xx1-orig(1)+zz1/r+2)*32;
-clf();plot3d1([xx xx1],[yy yy1],list([zz,zz1],[cc cc1]),70,80)
+xbasc();plot3d1([xx xx1],[yy yy1],list([zz,zz1],[cc cc1]),70,80)
-clf();plot3d1([xx xx1],[yy yy1],list([zz,zz1],[cc cc1]),theta=70,alpha=80,flag=[5,6,3])
+xbasc();plot3d1([xx xx1],[yy yy1],list([zz,zz1],[cc cc1]),theta=70,alpha=80,flag=[5,6,3])
]]></programlisting>
</refsection>
<link linkend="xbasr">xbasr</link>
</member>
<member>
+ <link linkend="xbasc">xbasc</link>
+ </member>
+ <member>
<link linkend="clf">clf</link>
</member>
</simplelist>
t=[0:0.1:2*%pi]';
plot2d(sin(t),cos(t))
-clf()
+xbasc()
square(-1,-1,1,1)
plot2d(sin(t),cos(t))
xset("default")
might be used instead.
</para>
<para>
- The <literal>xbasc</literal> function is obsolete and will be removed in Scilab 5.3.
+ Function <literal>xbasc</literal> is obsolete.
To erase a figure, please use instead the <literal>clf</literal> or <literal>delete</literal> functions.
</para>
<title>See Also</title>
<simplelist type="inline">
<member>
- <link linkend="clf">clf</link>
+ <link linkend="xbasc">xbasc</link>
</member>
</simplelist>
</refsection>
// get the graphic scales of second subwindow
xsetech([0,0.5,1.0,0.5])
[wrect,frect,logflag,arect]=xgetech();
-clf();
+xbasc();
xset('default')
]]></programlisting>
<term>xset("auto clear","on"|"off")</term>
<listitem>
<para>Switch "on" or "off" the auto clear mode for graphics. When the
- auto clear mode is "on", successive plots are not superposed, ie a
- <literal>clf()</literal> operation (the graphics window is cleared and the
+ auto clear mode is "on", successive plots are not superposed, ie an
+ <literal>xbasc()</literal> operation (the graphics window is cleared and the
associated recorded graphics is erased) is performed before each high
level graphics function. Default value is "off".</para>
</listitem>
flag=1 the graphics are done on a pixmap and are sent to the graphics
window with the command <literal>xset("wshow")</literal>. The pixmap is
cleared with the command <literal>xset("wwpc")</literal>. Note that the
- usual command <literal>clf()</literal> also clears the pixmap.</para>
+ usual command <literal>xbasc()</literal> also clears the pixmap.</para>
</listitem>
</varlistentry>
<varlistentry>
remains unchanged. the default value of <literal>rect</literal> is <literal>[0,0,1,1]</literal>
(at window creation, when switching back to default value with
<literal>xset('default')</literal> or when clearing graphic recorded events
- <literal>clf()</literal>).</para>
+ <literal>xbasc()</literal>).</para>
<para><literal>arect=[x_left, x_right,y_up,y_down]</literal> is used to set the graphic
frame inside the subwindow. The graphic frame is specified (like
<literal>wrect</literal>) using proportion of the width or height of the current
// and we change it with the use of the rect argument in plot2d
plot2d([1:10]',[1:10]',1,"011"," ",[-6,-6,6,6])
// Four plots on a single graphics window
-clf()
+xbasc()
xset("font",2,0)
xsetech([0,0,0.5,0.5]); plot3d()
xsetech([0.5,0,0.5,0.5]); plot2d()
// back to default values for the sub-window
xsetech([0,0,1,1])
// One plot with changed arect
-clf()
+xbasc()
xset("default")
xsetech(arect=[0,0,0,0])
x=1:0.1:10;plot2d(x',sin(x)')
-clf()
+xbasc()
xsetech(arect=[1/8,1/8,1/16,1/4])
x=1:0.1:10;plot2d(x',sin(x)')
-clf()
+xbasc()
xset("default")
]]></programlisting>
"h" "i" "j" "k" "l" "m" "n" ..
"o" "p" "q" "r" "s" "t" "u" ..
"v" "w" "x" "y" "z"];
-clf()
+xbasc()
plot2d([0;1],[0;2],0)
xstring(0.1,1.8,alphabet) // alphabet
xstring(0.1,1.6,alphabet,0,1) // alphabet in a box
h = [r g b];
xset('colormap',h);
xset('fpf',' ');
-clf();
+xbasc();
contourf([],[],z,[-6:-1,-logspace(-5,0,10),logspace(-5,0,10),1:8],0*ones(1,m))
xset('fpf','');
-clf();
+xbasc();
contourf([],[],z,[-6:-1,-logspace(-5,0,10),logspace(-5,0,10),1:8]);
</programlisting>
<para>J.Ph.C.</para>
</refsection>
-</refentry>
+</refentry>
\ No newline at end of file
T = [1 1 2 3 1;
2 3 4 1 1];
z = [0 1 0 -1]; // values of the func at each vertices
-clf()
+xbasc()
xset("colormap",jetcolormap(64))
subplot(1,2,1)
colorbar(-1,1)
// this example shows the effect of zminmax and uses the
// previous example datas (you have to execute the it before)
-clf()
+xbasc()
xset("colormap",jetcolormap(64))
colorbar(-0.5,0.5) // be careful colorbar must be set by hands !
fec(x,y,T,z,strf="040", zminmax=[-0.5 0.5], mesh=%t)
// this example shows the effect of zminmax and colout. It uses
// also the datas of the first example (you have to execute the it before)
-clf()
+xbasc()
xset("colormap",jetcolormap(64))
subplot(2,2,1)
colorbar(-0.5,0.5)
// this example shows a feature from colminmax:
// playing with 2 colormaps for 2 subplots. It
// uses also the data of the first example.
-clf()
+xbasc()
xset("colormap",[hotcolormap(64);jetcolormap(64)])
subplot(1,2,1)
colorbar(-1,1,[1 64])
<title>Exemples</title>
<programlisting role="example"><![CDATA[
y=(0:0.33:145.78)';
- clf();plot2d1('enn',0,y)
+ xbasc();plot2d1('enn',0,y)
[ymn,ymx,np]=graduate(mini(y),maxi(y))
rect=[1,ymn,prod(size(y)),ymx];
- clf();plot2d1('enn',0,y,1,'011',' ',rect,[10,3,10,np])
+ xbasc();plot2d1('enn',0,y,1,'011',' ',rect,[10,3,10,np])
]]></programlisting>
</refsection>
<refsection>
// exemple #2: histogramme d'un échantillon de loi binomiale B(6,0.5)
d = grand(1000,1,"bin", 6, 0.5);
c = linspace(-0.5,6.5,8);
-clf()
+xbasc()
subplot(2,1,1)
histplot(c, d, style=2)
xtitle("l''histogramme normalisé")
lambda = 2;
X = grand(100000,1,"exp", 1/lambda);
Xmax = max(X);
-clf()
+xbasc()
histplot(40, X, style=2)
x = linspace(0,max(Xmax),100)';
plot2d(x,lambda*exp(-lambda*x),strf="000",style=5)
<link linkend="xbasr">xbasr</link>
</member>
<member>
+ <link linkend="xbasc">xbasc</link>
+ </member>
+ <member>
<link linkend="clf">clf</link>
</member>
</simplelist>
<programlisting role="example"><![CDATA[
t=[0:0.1:2*%pi]';
plot2d(sin(t),cos(t))
-clf()
+xbasc()
square(-1,-1,1,1)
plot2d(sin(t),cos(t))
xset("default")
peut être utilisée à la place.
</para>
<para>
- La fonction <literal>xbasc</literal> est obsolète et sera retirée dans la version 5.3.
- Pour effacer une fenêtre graphique, les fonctions <literal>clf</literal> ou <literal>delete</literal> peuvent être utilisées
+ La fonction <literal>xbasc</literal> est obsolète.
+ Pour effacer une fenêtre graphique, les fonctions <literal>clf</literal> ou <literal>delete</literal> peuvent être utilisée
à la place.
</para>
</refsection>
<title>Voir Aussi</title>
<simplelist type="inline">
<member>
- <link linkend="clf">clf</link>
+ <link linkend="xbasc">xbasc</link>
</member>
</simplelist>
</refsection>
// recupération de l'échelle
xsetech([0,0.5,1.0,0.5])
[wrect,frect,logflag,arect]=xgetech();
-clf();
+xbasc();
]]></programlisting>
</refsection>
<refsection>
<listitem>
<para>Met "on" ou "off" le mode d'effacement automatique des
graphiques. Quand le mode est "on", les dessins successifs ne sont
- pas superposés, i.e. la commande <literal>clf()</literal>
+ pas superposés, i.e. la commande <literal>xbasc()</literal>
(effacement de la fenêtre graphique et effacement des graphiques
enregistrés) est exécutée avant chaque commande graphique de haut
niveau (plot2d par exemple). La valeur par défaut est "off".</para>
sont affichés à   l'écran avec la commande
<literal>xset("wshow")</literal>. Le pixmap est effacé avec la
commande <literal>xset("wwpc")</literal>. Noter que la commande
- <literal>clf()</literal> efface aussi le pixmap.</para>
+ <literal>xbasc()</literal> efface aussi le pixmap.</para>
</listitem>
</varlistentry>
<para>J.Ph.C.</para>
</refsection>
-</refentry>
+</refentry>
\ No newline at end of file
</info>
<refnamediv>
<refname>xsetech</refname>
- <refpurpose> sélectionne la sous-fenêtre d'une fenêtre graphique pour les dessins </refpurpose>
+ <refpurpose> sélectionne la sous-fenêtre d'une fenêtre graphique pour les dessins </refpurpose>
</refnamediv>
<refsynopsisdiv>
<title>Séquence d'appel</title>
<literal>frect</literal> n'est pas donné la valeur courante de l'échelle graphique n'est pas
modifiée. La valeur par défaut de <literal>rect</literal> est <literal>[0,0,1,1]</literal>
(à la création de la fenêtre, ou par exemple après un <literal>xset('default')</literal>
- ou après effacement complet de la fenêtre avec <literal>clf()</literal>).
+ ou après effacement complet de la fenêtre avec <literal>xbasc()</literal>).
</para>
<para><literal>arect=[x_gauche, x_droite, y_haut, y_bas]</literal> est utilisé pour définir le cadre
dans la sous-fenêtre. Le cadre est spécifié (comme <literal>wrect</literal>) en utilisant des
// on la change avec l'argument rect de plot2d
plot2d([1:10]',[1:10]',1,"011"," ",[-6,-6,6,6])
// 4 dessins sur une seule fenêtre
-clf()
+xbasc()
xset("font",2,0)
xsetech([0,0,0.5,0.5]); plot3d()
xsetech([0.5,0,0.5,0.5]); plot2d()
// retour aux valeurs par défaut
xsetech([0,0,1,1])
// Un dessin avec arect change
-clf()
+xbasc()
xset("default")
xsetech(arect=[0,0,0,0])
x=1:0.1:10;plot2d(x',sin(x)')
-clf()
+xbasc()
xsetech(arect=[1/8,1/8,1/16,1/4])
x=1:0.1:10;plot2d(x',sin(x)')
-clf()
+xbasc()
xset("default")
]]></programlisting>
</refsection>
"h" "i" "j" "k" "l" "m" "n" ..
"o" "p" "q" "r" "s" "t" "u" ..
"v" "w" "x" "y" "z"];
-clf()
+xbasc()
plot2d([0;1],[0;2],0)
xstring(0.1,1.8,alphabet) // alphabet
xstring(0.1,1.6,alphabet,0,1) // alphabet dans une boîte
fig=gcf();
autoc=fig.auto_clear;
- if autoc=="on" then, clf(),end
+ if autoc=="on" then, xbasc(),end
a=gca();
fg=a.foreground
v=fig.immediate_drawing;
fig=gcf();
autoc=fig.auto_clear;
-if autoc=="on" then, clf(),end
+if autoc=="on" then, xbasc(),end
a=gca();
v=fig.immediate_drawing;
fig.immediate_drawing="off"
[nout,nin]=argn(0);
newstyle = get('figure_style')=='new'
-
+
if nin == 0 then // demo
t = -%pi:0.1:%pi;
m = sin(t)'*cos(t);
// n1 <= np <= n2
//%Exemple
// y=0:0.33:145.78
-// clf();plot2d1('enn',0,y)
+// xbasc();plot2d1('enn',0,y)
// [ymn,ymx,np]=graduate(mini(y),maxi(y))
-// rect=[1,ymn,prod(size(y)),ymx];
-// clf();plot2d1('enn',0,y,-1,'011',' ',rect,[10,3,10,np])
+// rect=[1,ymn,prod(size(y),ymx];
+// xbasc();plot2d1('enn',0,y,-1,'011',' ',rect,[10,3,10,np])
// Copyright INRIA
//!
if rhs<=0 then
rho=1:0.2:4;theta=(0:0.02:1)*2*%pi;
z=30+round(theta'*(1+rho^2));
- clf();
+ xbasc();
f=gcf();
f.color_map=hotcolormap(128);
f.background= 128;
if nl==1|nk==1 then
plot2d1("enn",1,matrix(x,prod(size(x)),1));
else
- clf();plot2d((ones(nl,1)*(1:nk))',x')
+ xbasc();plot2d((ones(nl,1)*(1:nk))',x')
end
- case 2 then clf();
+ case 2 then xbasc();
if type(y)==10,
plot2d1("enn",1,matrix(x,prod(size(x)),1));
xtitle(' ',y,' ');
else
plot2d(matrix(x,prod(size(x)),1),matrix(y,prod(size(y)),1));
end;
- case 3 then clf();
+ case 3 then xbasc();
if type(y)==10,
plot2d1("enn",1,matrix(x,prod(size(x)),-1));
xtitle(' ',y,legx);
plot2d(matrix(x,prod(size(x)),1),matrix(y,prod(size(y)),1));
xtitle(' ',legx,' ');
end;
- case 4 then clf();
+ case 4 then xbasc();
if type(y)==10,
plot2d1("enn",1,matrix(x,prod(size(x)),1));
xtitle(legy,y,legx);
plot2d(matrix(x,prod(size(x)),1),matrix(y,prod(size(y)),1));
xtitle(' ',legx,legy);
end;
- case 5 then clf();
+ case 5 then xbasc();
plot2d(matrix(x,prod(size(x)),1),matrix(y,prod(size(y)),1));
xtitle(leg,legx,legy);
end
if rhs<43 then flag='no';end
realtimeinit(0.1);
-clf();
+xbasc();
fig=gcf();
a=gca();
a.data_bounds=matrix(rect,2,2);
[lhs,rhs]=argn(0)
if rhs<=0 then
theta=0:.01:2*%pi;rho=sin(2*theta).*cos(2*theta)
- clf();polarplot(theta,rho)
+ xbasc();polarplot(theta,rho)
return
end
if size(theta,1)==1 then theta=theta(:),end
// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
function xbasc(win_num)
-
-warnobsolete('clf', '5.3');
-
-// This function is obsolete.
//xbasc([win_num])
// Clear the graphic window win_num and erase the recorded graphics of
// window win_num
// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
function xclear(win_num)
-//xclear([win_num])
+//xbasc([win_num])
// Clear the graphic window win_num and erase the recorded graphics of
// window win_num
// if win_num is omited, it's the current graphic window
if (strcmp(cstk(l2),"all") == 0)
{
startGraphicDataWriting();
- sciClearFigure(sciGetCurrentFigure());
+ sciXbasc();
endGraphicDataWriting();
sciDrawObj(sciGetCurrentFigure()); /* redraw the figure to see the change */
LhsVar(1) = 0;
/*special treatement for xset default and old_style off F.Leray 23.09.04 */
/* mimic clf(gcf(),'reset') behaviour here */
- sciClearFigure(sciGetCurrentFigure());
+ sciXbasc();
- ResetFigureToDefaultValues(pfigure);
+ ResetFigureToDefaultValues(pfigure);
}
else if( strcmp(cstk(l1),"clipgrf") == 0 ) {
/* special treatement for xset("cligrf") */
/********************* modifie le 01/02/2002 ************************
* On detruit pas la sous fenetre, elle est initialiser avec la figure
* pour cette version, on considere qu'il y'a 1 seule sous fenetre et
- * elle suit la fenetre principale (voir clf() ), la fenetre n'est pas
+ * elle suit la fenetre principale (voir xbasc() ), la fenetre n'est pas
* consideree comme un des fils.
*/
/**
}
void sciXbasc()
-{
+{
sciClearFigure(sciGetCurrentFigure());
-}
+}
void sciXclear()
{
// <-- Short Description -->
// Ces deux groupes de trois lignes font quasiment la meme chose. Dans le premier cas, la fenetre est correctement reajustee et dans le second un truc affreux est fait alors qu'il ne faut rien faire!!!
// <-- TEST WITH GRAPHIC -->
-clf();
+xbasc();
plot2d([.4; .6],[-.6 ;.6],-3);
plot2d(.2,0,-3)
-clf();
+xbasc();
plot2d([.4; .6],[-.6;.6],-3);
plot2d(.5,0,-3);
// <-- TEST WITH GRAPHIC -->
-clf();
+xbasc();
plot2d([.4; .6],[-.6 ;.6],-3);
plot2d(.2,0,-3)
-clf();
+xbasc();
plot2d([.4; .6],[-.6;.6],-3);
plot2d(.5,0,-3);
plot2d([-100,500],[-100,600],[-1,-1],"022");
xsegs(10*x1+200*ones(x1),10*y1+200*ones(y1));
// rectangle clipping zone
-clf(); plot2d([-100,500],[-100,600],[-1,-1],"022")
+xbasc(); plot2d([-100,500],[-100,600],[-1,-1],"022")
xrect(clipBox(1), clipBox(2), clipBox(3), clipBox(4));
axes = gca();
axes.clip_box = clipBox;
plot2d([-100,500],[-100,600],[-1,-1],"022");
xsegs(10*x1+200*ones(x1),10*y1+200*ones(y1));
// rectangle clipping zone
-clf(); plot2d([-100,500],[-100,600],[-1,-1],"022")
+xbasc(); plot2d([-100,500],[-100,600],[-1,-1],"022")
xrect(clipBox(1), clipBox(2), clipBox(3), clipBox(4));
axes = gca();
axes.clip_box = clipBox;
xclick();
xdel();
end
- clf();
+ xbasc();
end;
lsoda-- caution... t (=r1) and h (=r2) are
such that t + h = t at next step
(h = pas). integration continues
- where r1 is : 0.4373378914124D+00 and r2 : 0.2754264981180D-16
+ where r1 is : 0.4373378914124D+00 and r2 : 0.2754264981636D-16
lsoda-- caution... t (=r1) and h (=r2) are
such that t + h = t at next step
(h = pas). integration continues
- where r1 is : 0.4373378914124D+00 and r2 : 0.2754264981180D-16
+ where r1 is : 0.4373378914124D+00 and r2 : 0.2754264981636D-16
lsoda-- caution... t (=r1) and h (=r2) are
such that t + h = t at next step
(h = pas). integration continues
- where r1 is : 0.4373378914124D+00 and r2 : 0.2754264981180D-16
+ where r1 is : 0.4373378914124D+00 and r2 : 0.2754264981636D-16
lsoda-- caution... t (=r1) and h (=r2) are
such that t + h = t at next step
(h = pas). integration continues
- where r1 is : 0.4373378914124D+00 and r2 : 0.2754264981180D-16
+ where r1 is : 0.4373378914124D+00 and r2 : 0.2754264981636D-16
lsoda-- caution... t (=r1) and h (=r2) are
such that t + h = t at next step
(h = pas). integration continues
- where r1 is : 0.4373378914124D+00 and r2 : 0.2249615077083D-16
+ where r1 is : 0.4373378914124D+00 and r2 : 0.2249615077458D-16
lsoda-- caution... t (=r1) and h (=r2) are
such that t + h = t at next step
(h = pas). integration continues
- where r1 is : 0.4373378914124D+00 and r2 : 0.2249615077083D-16
+ where r1 is : 0.4373378914124D+00 and r2 : 0.2249615077458D-16
lsoda-- caution... t (=r1) and h (=r2) are
such that t + h = t at next step
(h = pas). integration continues
- where r1 is : 0.4373378914124D+00 and r2 : 0.2249615077083D-16
+ where r1 is : 0.4373378914124D+00 and r2 : 0.2249615077458D-16
lsoda-- caution... t (=r1) and h (=r2) are
such that t + h = t at next step
(h = pas). integration continues
- where r1 is : 0.4373378914124D+00 and r2 : 0.2249615077083D-16
+ where r1 is : 0.4373378914124D+00 and r2 : 0.2249615077458D-16
lsoda-- caution... t (=r1) and h (=r2) are
such that t + h = t at next step
(h = pas). integration continues
- where r1 is : 0.4373378914124D+00 and r2 : 0.1837429597234D-16
+ where r1 is : 0.4373378914124D+00 and r2 : 0.1837429597534D-16
lsoda-- caution... t (=r1) and h (=r2) are
such that t + h = t at next step
(h = pas). integration continues
- where r1 is : 0.4373378914124D+00 and r2 : 0.1837429597234D-16
+ where r1 is : 0.4373378914124D+00 and r2 : 0.1837429597534D-16
lsoda-- previous message precedent given i1 times
will no more be repeated
where i1 is : 10
needed before reaching tout
where i1 is : 500
where r1 is : 0.4373378914124D+00
-Attention: Le résultat est peut être inexact.
+Warning: Result may be inaccurate.
TT=TT(1:size(XX,2));
K=XX($,:)+XX(2,:).*(XX(3,:)-XX(4,:)).^2;
xset('window',0);
-clf();
+xbasc();
plot2d(TT',K');
xset('window',1);
-clf();
+xbasc();
plot2d(TT',XX(2,:)');
xset('window',2);
-clf();
+xbasc();
plot2d(TT',XX(1,:)');
// Test #2
clear
K=XX($,:)+XX(2,:).*(XX(3,:)-XX(4,:)).^2;
xset('window',0);
-clf();
+xbasc();
plot2d(TT',K');
xset('window',1);
-clf();
+xbasc();
plot2d(TT',XX(2,:)');
xset('window',2);
-clf();
+xbasc();
plot2d(TT',XX(1,:)');
// Test #2
m2=uimenu(m,'label', 'quit scilab', 'callback', "exit");
//create two items in the menu "windows"
m11=uimenu(m1,'label', 'new window', 'callback',"xselect()");
-m12=uimenu(m1,'label', 'clear window', 'callback',"clf()");
+m12=uimenu(m1,'label', 'clear window', 'callback',"xbasc()");
// create a submenu to the item "operations"
close(f);
// close the figure
//
// <-- Short Description -->
// plot() plots fullscreen despite the xsetech() restriction.
-clf();
+xbasc();
xsetech([0 .5 .5 .5]);
plot2d(1:10,1:10)
// <-- Short Description -->
// plot() plots fullscreen despite the xsetech() restriction.
-clf();
+xbasc();
xsetech([0 .5 .5 .5]);
m2=uimenu(m,'label', 'quit scilab', 'callback', "exit");
//create two items in the menu "windows"
m11=uimenu(m1,'label', 'new window', 'callback',"xselect()");
- m12=uimenu(m1,'label', 'clear window', 'callback',"clf()");
+ m12=uimenu(m1,'label', 'clear window', 'callback',"xbasc()");
// create a submenu to the item "operations"
close(f);
end
m2=uimenu(m,'label', 'quit scilab', 'callback', "exit");
//create two items in the menu "windows"
m11=uimenu(m1,'label', 'new window', 'callback',"xselect()");
- m12=uimenu(m1,'label', 'clear window', 'callback',"clf()");
+ m12=uimenu(m1,'label', 'clear window', 'callback',"xbasc()");
// create a submenu to the item "operations"
close(f);
end
ln($+1)=lk
end
- elseif lk(1)=='2'&or(lk(2)==['xdel','clf']) then
+ elseif lk(1)=='2'&or(lk(2)==['xbasc','xdel','clf']) then
//change some function names to allow overloading
lk(2)=lk(2)+'_build'
ln($+1)=lk
else
ln($+1)=lk
end
- elseif lk(1)=='2'&or(lk(2)==['xdel','clf']) then
+ elseif lk(1)=='2'&or(lk(2)==['xbasc','xdel','clf']) then
//change some function names to allow overloading
lk(2)=lk(2)+'_run'
ln($+1)=lk
xx = linspace(0,2*%pi,m);
[X,Y] = ndgrid(xx,xx);
Z = eval_cshep2d(X,Y, tl_coef);
-clf()
+xbasc()
plot3d(xx,xx,Z,flag=[2 6 4])
param3d1(xy(:,1),xy(:,2),list(z,-9), flag=[0 0])
xtitle("Cubic Shepard Interpolation of cos(x)cos(y) with randomly choosen interpolation points")
// indices corresponding to facet in the interpolation region
ind=find( mean(xf,"r")>0 & mean(xf,"r")<1 & mean(yf,"r")>0 & mean(yf,"r")<1 );
color(ind)=3;
-clf();
+xbasc();
plot3d(xf,yf,list(zf,color), flag=[2 6 4])
legends(["extrapolation region","interpolation region"],[2 3],1)
xselect()
xx = linspace(a,b,800)';
[yyk, yy1k, yy2k] = interp(xx, x, y, dk);
[yyf, yy1f, yy2f] = interp(xx, x, y, df);
-clf()
+xbasc()
subplot(3,1,1)
plot2d(xx, [yyk yyf])
plot2d(x, y, style=-9)
yy1 = interp(xx,x,y,d,"linear");
yy2 = interp(xx,x,y,d,"natural");
yy3 = interp(xx,x,y,d,"periodic");
-clf()
+xbasc()
plot2d(xx,[yy0 yy1 yy2 yy3],style=2:5,frameflag=2,leg="C0@linear@natural@periodic")
xtitle(" different way to evaluate a spline outside its domain")
</programlisting>
y = sin(x);
xx = linspace(-2*%pi,4*%pi,400)';
yy = linear_interpn(xx, x, y, "periodic");
-clf()
+xbasc()
plot2d(xx,yy,style=2)
plot2d(x,y,style=-9, strf="000")
xtitle("linear interpolation of sin(x) with 11 interpolation points")
xx = linspace(0,2*%pi, 40);
[xp,yp] = ndgrid(xx,xx);
zp = linear_interpn(xp,yp, x, y, z);
-clf()
+xbasc()
plot3d(xx, xx, zp, flag=[2 6 4])
[xg,yg] = ndgrid(x,x);
param3d1(xg,yg, list(z,-9*ones(1,n)), flag=[0 0])
zp3 = linear_interpn(XP, YP, x, y, z, "C0");
zp4 = linear_interpn(XP, YP, x, y, z, "by_zero");
zp5 = linear_interpn(XP, YP, x, y, z, "by_nan");
-clf()
+xbasc()
subplot(2,3,1)
plot3d(x, y, z, leg="x@y@z", flag = [2 4 4])
xtitle("initial function 0.4 cos(2 pi x) cos(pi y)")
vmin = min(VF); vmax = max(VF);
color = dsearch(VF,linspace(vmin,vmax,nb_col+1));
xset("colormap",jetcolormap(nb_col));
-clf()
+xbasc()
xset("hidden3d",xget("background"))
colorbar(vmin,vmax)
plot3d(XF, YF, list(ZF,color), flag=[-1 6 4])
// plotting
ye = sin(xd);
ys = interp(xd, x, y, d);
-clf()
+xbasc()
plot2d(xd,[ye yd ys],style=[2 -2 3], ...
leg="exact function@experimental measures (gaussian perturbation)@fitted spline")
xtitle("a least square spline")
xx = linspace(a, b, m)';
yyi = interp(xx, x, y, d);
yye = runge(xx);
-clf()
+xbasc()
plot2d(xx, [yyi yye], style=[2 5], leg="interpolation spline@exact function")
plot2d(x, y, -9)
xtitle("interpolation of the Runge function")
yk = interp(xx, x, y, splin(x,y,"not_a_knot"));
yf = interp(xx, x, y, splin(x,y,"fast"));
ym = interp(xx, x, y, splin(x,y,"monotone"));
-clf()
+xbasc()
plot2d(xx, [yf ym yk], style=[5 2 3], strf="121", ...
leg="fast@monotone@not a knot spline")
plot2d(x,y,-9, strf="000") // to show interpolation points
vmin = min(VF); vmax = max(VF);
color = dsearch(VF,linspace(vmin,vmax,nb_col+1));
xset("colormap",jetcolormap(nb_col));
-clf(); xset("hidden3d",xget("background"));
+xbasc(); xset("hidden3d",xget("background"));
colorbar(vmin,vmax)
plot3d(XF, YF, list(ZF,color), flag=[-1 6 4])
xtitle("3d spline interpolation of "+func)
xset("colormap",rand(2*n,3));
xfpolys(xpols,ypols,[n/4:n/4+n-1]);
endfunction
-N=1000;clf();X=rand(1,N); Y=rand(1,N);
+N=1000;xbasc();X=rand(1,N); Y=rand(1,N);
xset("wdim",700,700);
test(X,Y);
xset("colormap",rand(2*n,3));
xfpolys(xpols,ypols,[n/4:n/4+n-1]);
endfunction
-N=1000;clf();X=rand(1,N); Y=rand(1,N);
+N=1000;xbasc();X=rand(1,N); Y=rand(1,N);
xset("wdim",700,700);
test(X,Y);
delete(scf());
xset("colormap",rand(2*n,3));
xfpolys(xpols,ypols,[n/4:n/4+n-1]);
endfunction
-N=1000;clf();X=rand(1,N); Y=rand(1,N);
+N=1000;xbasc();X=rand(1,N); Y=rand(1,N);
xset("wdim",700,700);
test(X,Y);
delete(scf());
g('edge_color')=[10 0 2 6 11 11 0 0 11];
rep=[2 2 1 1 2 2 2 2 2 2 2 2 2];
rep1=[100 -400 650 300];
-clf(); plot_graph(g,rep,rep1);
+xbasc(); plot_graph(g,rep,rep1);
rep=[2 1 1 1 2 2 2 2 2 2 2 2 2];
-clf(); plot_graph(g,rep,rep1);
+xbasc(); plot_graph(g,rep,rep1);
// plotting using dialogs
-clf(); plot_graph(g);
+xbasc(); plot_graph(g);
xset("thickness",4);
-clf();
+xbasc();
plot_graph(g);
[p,err]=fit_dat(G,[3;5;10],Z)
xset('window',0)
-clf();
+xbasc();
plot2d(X',Y',-1)
plot2d(X',FF(X)',5,'002')
a=p(1),b=p(2),c=p(3);plot2d(X',FF(X)',12,'002')
[p,err]=fit_dat(G,[3;5;10],Z,DG)
xset('window',1)
-clf();
+xbasc();
plot2d(X',Y',-1)
plot2d(X',FF(X)',5,'002')
a=p(1),b=p(2),c=p(3);plot2d(X',FF(X)',12,'002')
// a small graphic (before showing other calling features)
tt = linspace(0,1.1*max(tm),100)';
yy = yth(tt, xopt);
-clf()
+xbasc()
plot2d(tm, ym, style=-2)
plot2d(tt, yy, style = 2)
legend(["measure points", "fitted curve"]);
//deff('e=G(p,z)','a=p(1),b=p(2),c=p(3),y=z(1),x=z(2),e=y-FF(x)')
//[p,err]=datafit(G,Z,[3;5;10])
//xset('window',0)
-//clf();
+//xbasc();
//plot2d(X',Y',-1)
//plot2d(X',FF(X)',5,'002')
//a=p(1),b=p(2),c=p(3);plot2d(X',FF(X)',12,'002')
//deff('s=DG(p,z)','y=z(1),x=z(2),s=-[x-p(2),-p(1),x*x]')
//[p,err]=datafit(G,DG,Z,[3;5;10])
//xset('window',1)
-//clf();
+//xbasc();
//plot2d(X',Y',-1)
//plot2d(X',FF(X)',5,'002')
//a=p(1),b=p(2),c=p(3);plot2d(X',FF(X)',12,'002')
//deff('e=G(p,z)','a=p(1),b=p(2),c=p(3),y=z(1),x=z(2),e=y-FF(x)')
//[p,err]=fit_dat(G,[3;5;10],Z)
//xset('window',0)
-//clf();
+//xbasc();
//plot2d(X',Y',-1)
//plot2d(X',FF(X)',5,'002')
//a=p(1),b=p(2),c=p(3);plot2d(X',FF(X)',12,'002')
//deff('s=DG(p,z)','y=z(1),x=z(2),s=-[x-p(2),-p(1),x*x]')
//[p,err]=fit_dat(G,[3;5;10],Z,DG)
//xset('window',1)
-//clf();
+//xbasc();
//plot2d(X',Y',-1)
//plot2d(X',FF(X)',5,'002')
//a=p(1),b=p(2),c=p(3);plot2d(X',FF(X)',12,'002')
deff('e=G(p,z)','pK1=p(1),pK2=p(2),v=z(2),pHexp=z(1),e=pHexp-fpH(v)');
[p,err]=fit_dat(G,[6;7],Z);
// graphic part
-clf()
+xbasc()
//v=[0:1e-5:4.5e-4]
v=X;
fplot2d(v,fpH);
// graphic part
-clf()
+xbasc()
//v=[0:1e-5:4.5e-4]
v=X;
fplot2d(v,fpH);
N=100000;
//Generation of a vector of numbers following an exponential distribution
X = grand(1,N,"exp",lambda);
-clf();
+xbasc();
//Discretisation of the abscisses in classes
classes = linspace(0,12,25);
//Draw in histogram
N=100000;
//Generation of a vector of numbers following a beta distribution
X = grand(1,N,"bet",A,B);
-clf();
+xbasc();
//Discretisation of the abscisses in classes
classes = linspace(0,1,50);
//Draw in histogram
N=100000;
//Generation of a vector of numbers following a gamma distribution
X = grand(1,N,"gam",A,B);
-clf();
+xbasc();
//Discretisation of the abscisses in classes
classes = linspace(0,2,50);
//Draw in histogram
N=100000;
//Generation of a vector of numbers following a binomial distribution
X = grand(1,N,"bin",n,p);
-clf();
+xbasc();
//Discretisation of the abscisses in classes
classes = linspace(0,n,n+1);
//Draw in histogram
N=100000;
//Generation of a vector of numbers following a poisson distribution
X = grand(1,N,"poi",mu);
-clf();
+xbasc();
//Discretisation of the abscisses in classes
classes = linspace(0,2*mu,101);
//Draw in histogram
N=100000;
//Generation of a vector of numbers following an exponential distribution
X = grand(1,N,"exp",lambda);
-clf();
+xbasc();
//Discretisation of the abscisses in classes
classes = linspace(0,12,25);
//Draw in histogram
N=100000;
//Generation of a vector of numbers following a beta distribution
X = grand(1,N,"bet",A,B);
-clf();
+xbasc();
//Discretisation of the abscisses in classes
classes = linspace(0,1,50);
//Draw in histogram
N=100000;
//Generation of a vector of numbers following a gamma distribution
X = grand(1,N,"gam",A,B);
-clf();
+xbasc();
//Discretisation of the abscisses in classes
classes = linspace(0,2,50);
//Draw in histogram
N=100000;
//Generation of a vector of numbers following a binomial distribution
X = grand(1,N,"bin",n,p);
-clf();
+xbasc();
//Discretisation of the abscisses in classes
classes = linspace(0,n,n+1);
//Draw in histogram
N=100000;
//Generation of a vector of numbers following a poisson distribution
X = grand(1,N,"poi",mu);
-clf();
+xbasc();
//Discretisation of the abscisses in classes
classes = linspace(0,2*mu,101);
//Draw in histogram
t = linspace(0,16*%pi,1000)';
x = -20 + t + 0.3*sin(0.5*t) + sin(t) + 2*sin(2*t) + 0.5*sin(3*t);
y = detrend(x);
-clf()
+xbasc()
plot2d(t,[x y],style=[2 5])
legend(["before detrend","after detrend"]);
xgrid()
t = linspace(0,32*%pi,2000)';
x = abs(t-16*%pi) + 0.3*sin(0.5*t) + sin(t) + 2*sin(2*t) + 0.5*sin(3*t);
y = detrend(x,"linear",1000);
-clf()
+xbasc()
plot2d(t,[x y],style=[2 5])
legend(["before detrend","after detrend"]);
xgrid()
//compute the fft
y=fft(x,-1);
//display
-clf();
+xbasc();
subplot(2,1,1);plot2d(abs(y))
subplot(2,1,2);plot2d(fftshift(abs(y)))
//compute the fft
y=fft(x,-1);
//display
-clf();
+xbasc();
xset('colormap',hotcolormap(256))
subplot(2,1,1);Matplot(abs(y))
subplot(2,1,2);Matplot(fftshift(abs(y)))
P=4*K; //Real period
real_val=0:(P/50):P;
plot(real_val,real(%sn(real_val,m)))
-clf();
+xbasc();
KK=%k(1-m);
Ip=2*KK;
ima_val1=0:(Ip/50):KK-0.001;
f=[0,0.4,0.4,0.6,0.6,1];H=[0,0,1,1,0,0];Hz=yulewalk(8,f,H);
fs=1000;fhz = f*fs/2;
-clf(0);xset('window',0);plot2d(fhz',H');
+xbasc(0);xset('window',0);plot2d(fhz',H');
xtitle('Desired Frequency Response (Magnitude)')
[frq,repf]=repfreq(Hz,0:0.001:0.5);
-clf(1);xset('window',1);plot2d(fs*frq',abs(repf'));
+xbasc(1);xset('window',1);plot2d(fs*frq',abs(repf'));
xtitle('Obtained Frequency Response (Magnitude)')
]]></programlisting>
//
// Example: f=[0,0.4,0.4,0.6,0.6,1];H=[0,0,1,1,0,0];Hz=yulewalk(8,f,H);
//fs=1000;fhz = f*fs/2;
-//clf(0);xset('window',0);plot2d(fhz',H');
+//xbasc(0);xset('window',0);plot2d(fhz',H');
//xtitle('Desired Frequency Response')
//[frq,repf]=repfreq(Hz,0:0.001:0.5);
-//clf(1);xset('window',1);plot2d(fs*frq',abs(repf'));
+//xbasc(1);xset('window',1);plot2d(fs*frq',abs(repf'));
//xtitle('Obtained Frequency Response')
//
[LHS,RHS]=argn(0);
// besselI functions
// ==================
x = linspace(0.01,10,5000)';
- clf()
+ xbasc()
subplot(2,1,1)
plot2d(x,besseli(0:4,x), style=2:6)
legend('I'+string(0:4),2);
// besselJ functions
// =================
x = linspace(0,40,5000)';
- clf()
+ xbasc()
plot2d(x,besselj(0:4,x), style=2:6, leg="J0@J1@J2@J3@J4")
legend('I'+string(0:4),1);
xtitle("Some Bessel functions of the first kind")
y2 = sqrt(2 ./(%pi*x)).*sin(x);
er = abs((y1-y2)./y2);
ind = find(er > 0 & y2 ~= 0);
- clf()
+ xbasc()
subplot(2,1,1)
plot2d(x,y1,style=2)
xtitle("besselj(0.5,x)")
// besselK functions
// =================
x = linspace(0.01,10,5000)';
- clf()
+ xbasc()
subplot(2,1,1)
plot2d(x,besselk(0:4,x), style=0:4, rect=[0,0,6,10])
legend('K'+string(0:4),1);
// besselY functions
// =================
x = linspace(0.1,40,5000)'; // Y Bessel functions are unbounded for x -> 0+
- clf()
+ xbasc()
plot2d(x,bessely(0:4,x), style=0:4, rect=[0,-1.5,40,0.6])
legend('Y'+string(0:4),4);
xtitle("Some Bessel functions of the second kind")
er = abs(e) .* x;
ind = find(er ~= 0);
eps = ones(x(ind))*number_properties("eps");
-clf()
+xbasc()
plot2d(x(ind),[er(ind) eps 2*eps],style=[1 2 3],logflag="ll",leg="er@eps_m@2 eps_m")
xtitle("approximate relative error in computing beta(1,x)")
xselect()
t = linspace(0.2,10,60);
X = t'*ones(t); Y = ones(t')*t;
Z = beta(X,Y);
-clf()
+xbasc()
plot3d(t, t, Z, flag=[2 4 4], leg="x@y@z", alpha=75, theta=30)
xtitle("The beta function on [0.2,10]x[0.2,10]")
xselect()
a = -3; b = 5;
x = linspace(a,b,40000)';
y = gamma(x);
-clf()
+xbasc()
c=xget("color")
xset("color",2)
plot2d(x, y, style=0, axesflag=5, rect=[a, -10, b, 10])
l = nearfloat("pred",1);
x = linspace(-l,l,200)';
y = legendre(0:5, 0, x);
-clf()
+xbasc()
plot2d(x,y', leg="p0@p1@p2@p3@p4@p5@p6")
xtitle("the 6 th first Legendre polynomials")
l = nearfloat("pred",1);
x = linspace(-l,l,200)';
y = legendre(5, 0:5, x, "norm");
-clf()
+xbasc()
plot2d(x,y', leg="p5,0@p5,1@p5,2@p5,3@p5,4@p5,5")
xtitle("the (normalised) associated Legendre functions of degree 5")
[x2,y2,z2] = sph2cart(theta,phi,abs(real(f))); [xf2,yf2,zf2] = nf3d(x2,y2,z2);
[x3,y3,z3] = sph2cart(theta,phi,abs(imag(f))); [xf3,yf3,zf3] = nf3d(x3,y3,z3);
-clf()
+xbasc()
subplot(1,3,1)
plot3d(xf1,yf1,zf1,flag=[2 4 4]); xtitle("|Y31(theta,phi)|")
subplot(1,3,2)
x = linspace(0.01,10,5000)';
y = oldbesseli(0:4,x);
ys = oldbesseli(0:4,x,2);
-clf()
+xbasc()
subplot(2,1,1)
plot2d(x,y, style=2:6, leg="I0@I1@I2@I3@I4", rect=[0,0,6,10])
xtitle("Some modified Bessel functions of the first kind")
// example #2 : display some J Bessel functions
x = linspace(0,40,5000)';
y = besselj(0:4,x);
-clf()
+xbasc()
plot2d(x,y, style=2:6, leg="J0@J1@J2@J3@J4")
xtitle("Some Bessel functions of the first kind")
y2 = sqrt(2 ./(%pi*x)).*sin(x);
er = abs((y1-y2)./y2);
ind = find(er > 0 & y2 ~= 0);
-clf()
+xbasc()
subplot(2,1,1)
plot2d(x,y1,style=2)
xtitle("besselj(0.5,x)")
x = linspace(0.01,10,5000)';
y = besselk(0:4,x);
ys = besselk(0:4,x,1);
-clf()
+xbasc()
subplot(2,1,1)
plot2d(x,y, style=0:4, leg="K0@K1@K2@K3@K4", rect=[0,0,6,10])
xtitle("Some modified Bessel functions of the second kind")
// example #5: plot severals Y Bessel functions
x = linspace(0.1,40,5000)'; // Y Bessel functions are unbounded for x -> 0+
y = bessely(0:4,x);
-clf()
+xbasc()
plot2d(x,y, style=0:4, leg="Y0@Y1@Y2@Y3@Y4", rect=[0,-1.5,40,0.6])
xtitle("Some Bessel functions of the second kind")
</programlisting>
n = 50000;
X = grand(n,1,"bin",70,0.5);
m = tabul(X,"i");
-clf()
+xbasc()
plot2d3(m(:,1), m(:,2)/n)
xtitle("empiral probabilities of B(70,0.5)")
// retrieve the factor at scilab level
[Ct, p] = taucs_chget(Cptr);
// plot the initial matrix
-xset("window",0) ; clf()
+xset("window",0) ; xbasc()
PlotSparse(A) ; xtitle("Initial matrix A (bcsstk24.rsa)")
// plot the permuted matrix
B = A(p,p);
-xset("window",1) ; clf()
+xset("window",1) ; xbasc()
PlotSparse(B) ; xtitle("Permuted matrix B = A(p,p)")
// plot the upper triangle Ct
-xset("window",2) ; clf()
+xset("window",2) ; xbasc()
PlotSparse(Ct) ; xtitle("The pattern of Ct (A(p,p) = C*Ct)")
// retrieve cnz
[OK, n, cnz] = taucs_chinfo(Cptr)
// retrieve the factor at scilab level
[Ct, p] = taucs_chget(Cptr);
// plot the initial matrix
-xset("window",0) ; clf();
+xset("window",0) ; xbasc();
PlotSparse(A) ; xtitle("Initial matrix A (bcsstk24.rsa)");
// plot the permuted matrix
B = A(p,p);
-xset("window",1) ; clf();
+xset("window",1) ; xbasc();
PlotSparse(B) ; xtitle("Permuted matrix B = A(p,p)");
// plot the upper triangle Ct
-xset("window",2) ; clf();
+xset("window",2) ; xbasc();
PlotSparse(Ct) ; xtitle("The pattern of Ct (A(p,p) = C*Ct)");
// retrieve cnz
[OK, n, cnz] = taucs_chinfo(Cptr);
// retrieve the factor at scilab level
[Ct, p] = taucs_chget(Cptr);
// plot the initial matrix
-xset("window",0) ; clf();
+xset("window",0) ; xbasc();
PlotSparse(A) ; xtitle("Initial matrix A (bcsstk24.rsa)");
// plot the permuted matrix
B = A(p,p);
-xset("window",1) ; clf();
+xset("window",1) ; xbasc();
PlotSparse(B) ; xtitle("Permuted matrix B = A(p,p)");
// plot the upper triangle Ct
-xset("window",2) ; clf();
+xset("window",2) ; xbasc();
PlotSparse(Ct) ; xtitle("The pattern of Ct (A(p,p) = C*Ct)");
// retrieve cnz
[OK, n, cnz] = taucs_chinfo(Cptr);