'findlcccompiler' have been moved as toolbox in ATOMS
See http://atoms.scilab.org/toolboxes/LCC-windows or atomsInstall('LCC-windows')
from Scilab.
+
+* 'maxi' obsolete see 'max'.
+
+* 'mini' obsolete see 'min'.
Removed functions (previously declared as obsolete):
====================================================
bigL = 1 ;// car length (m)
// computation of intermediate configuration
- x0 = maxi(initial(1),final(2)) ....
+ x0 = max(initial(1),final(2)) ....
+ bigL*abs(tan(initial(3))) ...
+ bigL*abs(tan(final(3))) ...
+ bigL*(abs(initial(2)-final(2))/bigL)^(1/2) ;
a=gca()
drawlater()
a.isoview="on"
- a.data_bounds=[mini(state(:,1))-0.5*bigL, mini(state(:,2))-1.5*bigL
- maxi(state(:,1))+1.5*bigL, maxi(state(:,2))+1.5*bigL]
+ a.data_bounds=[min(state(:,1))-0.5*bigL, min(state(:,2))-1.5*bigL
+ max(state(:,1))+1.5*bigL, max(state(:,2))+1.5*bigL]
rect=matrix(a.data_bounds',-1,1)
xpoly(rect([1 3 3 1]),rect([2,2,4,4]),'lines',1)
C=build_car()
// computation of intermediate configuration
LL=bigL+d1+d2
- x0 = maxi(initial(1),final(2)) ....
+ x0 = max(initial(1),final(2)) ....
+ LL*abs(tan(initial(3))) ...
+ LL*abs(tan(initial(4))) ...
+ LL*abs(tan(initial(5))) ...
a=gca();
drawlater();
a.isoview="on"
- a.data_bounds=[mini(state(:,1))-1.5*(d1+d2), mini(state(:,2))-bigL
- maxi(state(:,1))+1.5*bigL, maxi(state(:,2))+bigL]
+ a.data_bounds=[min(state(:,1))-1.5*(d1+d2), min(state(:,2))-bigL
+ max(state(:,1))+1.5*bigL, max(state(:,2))+bigL]
rect=matrix(a.data_bounds',-1,1)
xpoly(rect([1 3 3 1]),rect([2,2,4,4]),'lines',1)
C=build_truck()
Kpid,1];Winv=inv(W);
disp(spec(Winv(2)),'closed loop eigenvalues');//Check internal stability
- if maxi(real(spec(Winv(2)))) > 0 then
+ if max(real(spec(Winv(2)))) > 0 then
messagebox('You loose: closed-loop is UNSTABLE!!!',"modal");
else
messagebox('Congratulations: closed-loop is STABLE !!!',"modal");
// define state space model of the Signal to track
nw=4;nuu=2;
A=rand(nw,nw);
-A=A-maxi(real(spec(A)))*eye(A);
+A=A-max(real(spec(A)))*eye(A);
B=rand(nw,nuu);
C=2*rand(ny,nw);
D=0*rand(C*B);
we can write
<literal>y(t)= coef* z(t) + sig*e(t) </literal> and the algorithm minimises
<literal>sum_{t=1}^N ( [y(t)- coef'z(t)]^2)</literal>
- where t0=maxi(maxi(r,s)+1,1))).</para>
+ where t0=max(max(r,s)+1,1))).</para>
</refsection>
<refsection>
<title>Examples</title>
Plant=ssrand(1,3,5);
[F,G,H,J]=abcd(Plant);
nw=4;nuu=2;A=rand(nw,nw);
-st=maxi(real(spec(A)));A=A-st*eye(A);
+st=max(real(spec(A)));A=A-st*eye(A);
B=rand(nw,nuu);C=2*rand(1,nw);D=0*rand(C*B);
Model=syslin('c',A,B,C,D);
[L,M,T]=gfrancis(Plant,Model);
Kf=-ppol(A',C',[-2,-2,-2,-2]);Kf=Kf'; //Observer gain
cl=P/.(-obscont(P,Kc,Kf));spec(cl('A')) //closed loop system
[J,r]=obscont(P,Kc,Kf);
-Q=ssrand(nu,ny,3);Q('A')=Q('A')-(maxi(real(spec(Q('A'))))+0.5)*eye(Q('A'))
+Q=ssrand(nu,ny,3);Q('A')=Q('A')-(max(real(spec(Q('A'))))+0.5)*eye(Q('A'))
//Q is a stable parameter
K=lft(J,r,Q);
spec(h_cl(P,K)) // closed-loop A matrix (should be stable);
y=aa*x +bb*ones(1,100)+ 0.1*rand(3,100);
// identification
[a,b,sig]=reglin(x,y);
-maxi(abs(aa-a))
-maxi(abs(bb-b))
+max(abs(aa-a))
+max(abs(bb-b))
// an other example : fitting a polynom
f=1:100; x=[f.*f; f];
y= [ 2,3]*x+ 10*ones(f) + 0.1*rand(f);
<varlistentry>
<term>up,yp</term>
<listitem>
- <para>real matrices (<literal>up</literal> dimension <literal>m</literal>x<literal>(maxi(degree(Den)))</literal> (default values=<literal>0</literal>) ,
+ <para>real matrices (<literal>up</literal> dimension <literal>m</literal>x<literal>(max(degree(Den)))</literal> (default values=<literal>0</literal>) ,
<literal>yp</literal> dimension <literal>n</literal>x
- <literal>(maxi(degree(Den)))</literal>)</para>
+ <literal>(max(degree(Den)))</literal>)</para>
</listitem>
</varlistentry>
<varlistentry>
the discrete time linear system with transfer matrix <literal>Den^-1 Num</literal>
for the input <literal>u</literal>, i.e <literal>y</literal> and <literal>u</literal> are such that <literal>Den y = Num u</literal> at t=0,1,...</para>
<para>
- If <literal>d1=maxi(degree(Den))</literal>, and <literal>d2=maxi(degree(Num))</literal> the polynomial
+ If <literal>d1=max(degree(Den))</literal>, and <literal>d2=max(degree(Num))</literal> the polynomial
matrices <literal>Den(z)</literal> and <literal>Num(z)</literal> may be written respectively as:</para>
<programlisting role = ""><![CDATA[
D(z) = D_0 + D_1 z + ... + D_d1 z^d1
end;
[a,b,c,d,x0,dom]=a(2:7);
- if(maxi(real(spec(a)))) > 0 then
+ if(max(real(spec(a)))) > 0 then
error(msprintf(_("%s: Wrong values for input argument #%d: Stable system expected.\n"),"arhnk",1));
end
domaine='c'
end;
sigma=wc(ordre+1,ordre+1)
- r=maxi(n1-ordre-1,1)
+ r=max(n1-ordre-1,1)
n=n1
sel=[1:ordre ordre+r+1:n];seleq=ordre+1:ordre+r
// lb est la liste list(b,b+etb,b-etb);(etb : ecart type estime)
// b=[b0,.....,b_s] bi(nu,nu)
// sig est l'ecart type estime du bruit
-// et resid=[ sig*e(t0),....]; t0=maxi(maxi(r,s)+1,1));
+// et resid=[ sig*e(t0),....]; t0=max(max(r,s)+1,1));
//
// Exemple :
// taper [a,b,sig,resid]=armax(); pour voir un exemple
// calul de la matrice zz telle que
// zz(:,j)=[ y(t-1),...,y(t-r),u(t),...,u(t-s)]', avec t=t0-1+j
// on peut calcule zz a partir de t=t0;
- t0=maxi(maxi(r,s)+1,1);
+ t0=max(max(r,s)+1,1);
if r==0;if s==-1;error(msprintf(gettext("%s: Wrong value for input arguments: If %s and %s nothing to identify.\n"),"armax","r==0","s==-1"))
end;end
z=[];
"armax1",4,5));
end
//
- t0=maxi(maxi(r,s+1),1)+1;
+ t0=max(max(r,s+1),1)+1;
if r<>0;XTM1=y((t0-1):-1:(t0-r));else XTM1=[];end
if s<>-1;UTM1=u(t0-b0f:-1:(t0-s));else UTM1=[];end
if q<>0;ETM1=0*ones(1,q);else ETM1=[];end
// coef= [-a1,..,-ar,b1,...,b_s,d1,...,d_q]' si b0f=1
//!
[n1,n2]=size(y);
- t0=maxi(maxi(r,s+1),1)+1;
+ t0=max(max(r,s+1),1)+1;
if r<>0;XTM1=y((t0-1):-1:(t0-r));else XTM1=[];end
if s<>-1;UTM1=u(t0-b0f:-1:(t0-s));else UTM1=[];end
if q<>0;ETM1=0*ones(1,q);else ETM1=[];end
kk=kk+1
dst=dst+min(sqrt(((phi(:,kk-1)-phi(:,kk))^2)/dx2+((d(:,kk-1)-d(:,kk))^2)/dy2))
if dst>0.2 then
- if mini(abs(frq(:,ks(prod(size(ks))))-frq(:,kk))./frq(:,kk))>0.2 then
+ if min(abs(frq(:,ks(prod(size(ks))))-frq(:,kk))./frq(:,kk))>0.2 then
ks=[ks kk]
dst=0
end
end;
end,end
end;
-if mini(lsorties)==0 then
+if min(lsorties)==0 then
error(msprintf(gettext("%s: Some output(s) are undefined.\n"),"bloc2exp")),
end
-if mini(lentrees)==0 then
+if min(lentrees)==0 then
error(msprintf(gettext("%s: Some input(s) are undefined.\n"),"bloc2exp")),
end
if lentrees==[] then
error(msprintf(gettext("%s: No input found.\n"),"bloc2ss")),
end
-if mini(lsorties)==0 then
+if min(lsorties)==0 then
error(msprintf(gettext("%s: Some output(s) are undefined.\n"),"bloc2ss")),
end
-if mini(lentrees)==0 then
+if min(lentrees)==0 then
error(msprintf(gettext("%s: Some input(s) are undefined.\n"),"bloc2ss")),
end
endfunction
axes=newaxes();
axes.axes_bounds=[wrect(1)+0,wrect(2)+wrect(4)*hx,wrect(3)*1.0,wrect(4)*hx*0.95];
- axes.data_bounds = [mini(frq),mini(phi);maxi(frq),maxi(phi)];
+ axes.data_bounds = [min(frq),min(phi);max(frq),max(phi)];
axes.log_flags = "lnn" ;
axes.grid=color("lightgrey")*ones(1,3);
axes.axes_visible="on";
rf=freq(h('num'),h('den'),exp(%i*xt));
end
//
- xmin=mini(real(rf));xmax=maxi(real(rf));
- ymin=mini(imag(rf));ymax=maxi(imag(rf));
+ xmin=min(real(rf));xmax=max(real(rf));
+ ymin=min(imag(rf));ymax=max(imag(rf));
bnds=[xmin xmax ymin ymax];
dx=max([xmax-xmin,1]);dy=max([ymax-ymin,1]);
pas=Pas(floor(i/2)+1)
splitf=[splitf size(frq,'*')];
- f=mini(f0+pas,fmax);
+ f=min(f0+pas,fmax);
if dom=='c' then //cas continu
while f0<fmax
rfd=(freq(h('num'),h('den'),%i*(f0+epsd))-rf0)/(epsd);
rfp=rf0+pas*rfd;
- e=maxi([abs(imag(rfp-rfc))/dy;abs(real(rfp-rfc))/dx])
+ e=max([abs(imag(rfp-rfc))/dy;abs(real(rfp-rfc))/dx])
if (e>k) then rf0=freq(h('num'),h('den'),(%i*f0));
rfc=freq(h('num'),h('den'),%i*f);
// compute prediction error
rfd=(freq(h('num'),h('den'),%i*(f0+epsd))-rf0)/(epsd);
rfp=rf0+pas*rfd;
- e=maxi([abs(imag(rfp-rfc))/dy;abs(real(rfp-rfc))/dx])
+ e=max([abs(imag(rfp-rfc))/dy;abs(real(rfp-rfc))/dx])
// compute minimum frequency logarithmic step to ensure a maximum
//of nptmax points to discretize
pasmin=f0*(10^((l10last-log10(f0))/(nptr+1))-1)
if pas<pasmin then
pas=pasmin
frq=[frq,f];nptr=max([1,nptr-1])
- f0=f;f=mini(f0+pas,fmax)
+ f0=f;f=min(f0+pas,fmax)
else
- f=mini(f0+pas,fmax)
+ f=min(f0+pas,fmax)
end
elseif e<k/2 then
pas=2*pas
frq=[frq,f];nptr=max([1,nptr-1])
- f0=f;f=mini(f0+pas,fmax),
+ f0=f;f=min(f0+pas,fmax),
else
frq=[frq,f];nptr=max([1,nptr-1])
- f0=f;f=mini(f0+pas,fmax),
+ f0=f;f=min(f0+pas,fmax),
end
end
else //cas discret
rfd=dom*(freq(h('num'),h('den'),exp(%i*(f0+pas/100)))-rf0)/(pas/100);
rfp=rf0+pas*rfd
rfc=freq(h('num'),h('den'),exp(%i*f));
- e=maxi([abs(imag(rfp-rfc))/dy;abs(real(rfp-rfc))/dx])
+ e=max([abs(imag(rfp-rfc))/dy;abs(real(rfp-rfc))/dx])
if (e>k) then
pasmin=f0*(10^((l10last-log10(f0))/(nptr+1))-1)
pas=pas/2
if pas<pasmin then
pas=pasmin
frq=[frq,f];nptr=max([1,nptr-1])
- f0=f;f=mini(f0+pas,fmax)
+ f0=f;f=min(f0+pas,fmax)
else
- f=mini(f0+pas,fmax)
+ f=min(f0+pas,fmax)
end
elseif e<k/2 then
pas=2*pas
frq=[frq,f];nptr=max([1,nptr-1])
- f0=f;f=mini(f0+pas,fmax),
+ f0=f;f=min(f0+pas,fmax),
else
frq=[frq,f];nptr=max([1,nptr-1])
- f0=f;f=mini(f0+pas,fmax),
+ f0=f;f=min(f0+pas,fmax),
end
end
end
//DETERMINATION OF DK
//-------------------
- [u,s,v]=svd(d12); r12=maxi(size(find(diag(s) > 1.0e-10)));
- [w,p,z]=svd(d21); r21=maxi(size(find(diag(p) > 1.0e-10)));
+ [u,s,v]=svd(d12); r12=max(size(find(diag(s) > 1.0e-10)));
+ [w,p,z]=svd(d21); r21=max(size(find(diag(p) > 1.0e-10)));
u1=u(:,1:r12); v1=v(:,1:r12); w1=w(:,1:r21); z1=z(:,1:r21);
s1=s(1:r12,1:r12); ph1=p(1:r21,1:r21);
d11tr=u'*d11*z;
(gs*eye(p1,p1)-td11*td11')*(d11*d21p+d12*dk);
ttt=py'*ttt;
- nmin=maxi(norm(hd11),norm(td11));
+ nmin=max(norm(hd11),norm(td11));
ncom=norm(d11+d12*dk*d21);
//constant
TOLA=1.0e-8; // threshold used to discard near singularities in gs I - A'*A
- go=maxi(norm([a b]),norm([a;c]));
+ go=max(norm([a b]),norm([a;c]));
[ra,cb]=size(b); [rc,ca]=size(c); xo=0;
[u,s,v]=svd(a);
//form gs I - s' * s
- ns=mini(ra,ca);
+ ns=min(ra,ca);
if size(s,1)>1 then
d=diag(s);
else
n=size(D);n1=n(1);n2=n(2);
Ws=syslin([],[],[],[],eye(n2,n2));
Stmp=Sl;
-m=maxi(degree(D));
+m=max(degree(D));
// moving poles @ infinity to poles @ Alfa
while m>0
Dm=coeff(D,m);
Ws=Ws*Wstmp;
Stmp=Stmp*Wstmp;
D=clean(Stmp(5));
- m=maxi(degree(D));
+ m=max(degree(D));
end
Stmp(5)=coeff(Stmp(5),0);
num(l,k)=nl,d(l,k)=dl,
end,
end
-if maxi(degree(d))==0 then d=coeff(d),end
+if max(degree(d))==0 then d=coeff(d),end
//matrices a b and c
if nd<>0 then
den=coeff(den);c=coeff(num,0:nd-1)
if n1<>t then
w1=u1(:,n1+1:t),a1=w1'*a*w1,
no=norm(a1),
- if maxi(real(spec(a1)))>no*tol then
+ if max(real(spec(a1)))>no*tol then
error(msprintf(gettext("%s: Wrong value for input argument #%d: Stabilizable system expected.\n"),"copfac",1)),
end,
end,
if n2<>t then
w2=u2(:,n2+1:t),a2=w2'*a*w2,
no=norm(a2),
- if maxi(real(spec(a2)))>no*tol then
+ if max(real(spec(a2)))>no*tol then
error(msprintf(gettext("%s: Wrong value for input argument #%d: Detectable system expected.\n"),"copfac",1)),
end,
end,
kk=k:k+n-1
ak=a(kk,kk)
bk=b(kk,:)
- nrmu=maxi([norm(bk*ut,1),norm(x0(kk))])
+ nrmu=max([norm(bk*ut,1),norm(x0(kk))])
if nrmu > 0 then
if rhs<5 then
atol=1.d-12*nrmu;rtol=atol/100
end
end
s=spec(a)
- if (domaine=='c'&maxi(real(s))>=0)|(domaine=='d'&maxi(abs(s))>=1) then
+ if (domaine=='c'&max(real(s))>=0)|(domaine=='d'&max(abs(s))>=1) then
error(msprintf(gettext("%s: Wrong value for input argument #%d: Stable system expected.\n"),"ctr_gram",1));
end
gc=lyap(a',-b*b',domaine)
if rcond(x12) > 1.d-6 then
X=phi12/x12;
z=eye()-B'*X*B
-ok= mini(real(spec(z))) > -%eps
+ok= min(real(spec(z))) > -%eps
else
ok=%t;end
endfunction
//!
[n1,n2]=size(y);
-t0=maxi(maxi(r,s+1),1)+1;
+t0=max(max(r,s+1),1)+1;
if r<>0;XTM1=y((t0-1):-1:(t0-r));else XTM1=[];end
if s<>-1;UTM1=u(t0-b0f:-1:(t0-s));else UTM1=[];end
if q<>0;ETM1=0*ones(1,q);else ETM1=[];end
error(msprintf(gettext("%s: Wrong value for input argument #%d: Single input, single output system expected.\n"),"evans",1));
end
if kmax<=0 then
- nm=mini([degree(n),degree(d)])
+ nm=min([degree(n),degree(d)])
fact=norm(coeff(d),2)/norm(coeff(n),2)
kmax=round(500*fact),
end
//calcul de la discretisation en k et racines associees
nroots=roots(n);racines=roots(d);
if nroots==[] then
- nrm=maxi([norm(racines,1),norm(roots(d+kmax*n),1)])
+ nrm=max([norm(racines,1),norm(roots(d+kmax*n),1)])
else
- nrm=maxi([norm(racines,1),norm(nroots,1),norm(roots(d+kmax*n),1)])
+ nrm=max([norm(racines,1),norm(nroots,1),norm(roots(d+kmax*n),1)])
end
md=degree(d)
//
while fin=='no' then
k=k+pas
r=roots(d+k*n);r=r(ord)
- dist=maxi(abs(racines(:,nr)-r))/nrm
+ dist=max(abs(racines(:,nr)-r))/nrm
//
point='nok'
if dist <smax then //pas correct
ord1=[ord1 kmn]
end
r(ord1)=r
- dist=maxi(abs(racines(:,nr)-r))/nrm
+ dist=max(abs(racines(:,nr)-r))/nrm
if dist <smax then
point='ok',
ord(ord1)=ord
end
//draw the axis
x1 =[nroots;matrix(racines,md*nr,1)];
- xmin=mini(real(x1));xmax=maxi(real(x1))
- ymin=mini(imag(x1));ymax=maxi(imag(x1))
+ xmin=min(real(x1));xmax=max(real(x1))
+ ymin=min(imag(x1));ymax=max(imag(x1))
dx=abs(xmax-xmin)*0.05
dy=abs(ymax-ymin)*0.05
if dx<1d-10, dx=0.01,end
lhandle=[lhandle; e];
end
- dx=maxi(abs(xmax-xmin),abs(ymax-ymin));
+ dx=max(abs(xmax-xmin),abs(ymax-ymin));
//plot the zeros locations
x1=0*ones(2),y1=0*ones(2)
end,
end;
- if maxi(k)>0 then
+ if max(k)>0 then
xpoly(i1,i2);
e=gce();
legs=[legs;_("asymptotic directions")]
[nb,mb]=size(sl.B)
if mb<>nu then error(60),end;
if sl.dt=='c' then error(94,2),end;
- np=maxi(degree(sl.D))
+ np=max(degree(sl.D))
[xf,x]=ltitr(sl.A,sl.B,u(:,1:(mu-np)),x0)
D=sl.D
if type(D)==1 then
nden(l)=pp
for k=1:ne,nnum(l,k)=num(l,k)*pdiv(pp,den(l,k)),end,
end;
- for l=1:ns, nm(l)=degree(nden(l))-maxi(degree(nnum(l,:))),end
- ly=mu+mini(nm)
+ for l=1:ns, nm(l)=degree(nden(l))-max(degree(nnum(l,:))),end
+ ly=mu+min(nm)
if rhs==3 then
- [mx,nx]=size(x0);maxdgd=maxi(degree(nden))
+ [mx,nx]=size(x0);maxdgd=max(degree(nden))
if nx<maxdgd then
error(msprintf(gettext("%s: At least %s past values needed.\n"),"flts",string(maxdgd)))
end;
y=0*ones(ns,ly);
for l=1:ns
ddl=degree(nden(l))
- dnl=maxi(degree(nnum(l,:)))
+ dnl=max(degree(nnum(l,:)))
lent=ly-ddl+dnl
select rhs
case 2 then yl=rtitr(nnum(l,:),nden(l),u(:,1:lent));
// L*[x;b]=[repfk;1]
// Least squ. pb is min norm of [A,0] [x;b]
// under constraint L*[x;b]=[repfk;1]
- [rmax,imax]=maxi(abs(repf))
+ [rmax,imax]=max(abs(repf))
L2=a(imax,1:dg+1);
L=[zeros(L2),L2,%i;
L2,zeros(L2),repf(imax)*%i];
w=real(w(k))
//find maximums
-wx=maxi(w)+0.5
+wx=max(w)+0.5
if horner(modul_d,wx)<0 then
w=w($:-2:1)
else
//(A,B2,C2) stabilizable + detectable
//-------------------------------------
-noa=maxi(abs(a)); nob2=maxi(abs(b2)); noc2=maxi(abs(c2));
+noa=max(abs(a)); nob2=max(abs(b2)); noc2=max(abs(c2));
-ns=st_ility(syslin('c',a,b2,c2),1.0e-10*maxi(noa,nob2));
+ns=st_ility(syslin('c',a,b2,c2),1.0e-10*max(noa,nob2));
if ns<na then
warning(msprintf(gettext("%s: %s is nearly unstabilizable.\n"),"gamitg","(A,B2)"));
end
-nd=dt_ility(syslin('c',a,b2,c2),1.0e-10*maxi(noa,noc2));
+nd=dt_ility(syslin('c',a,b2,c2),1.0e-10*max(noa,noc2));
if nd>0 then
warning(msprintf(gettext("%s: %s is nearly unstabilizable.\n"),"gamitg","(C2,A)"));
end
ah=a-b2*v12/s12*u12'*c1; bh=b2*v12; ch=u12'*c1;
hg=[ah,-bh/(s12**2)*bh';ch'*ch-c1'*c1,-ah'];
spech=spec(hg);
-if mini(abs(real(spech))) < 1.0e-9*maxi(abs(hg)) then
+if min(abs(real(spech))) < 1.0e-9*max(abs(hg)) then
warning(msprintf(gettext("%s: %s has zero(s) near the imaginary axis.\n"),"gamitg","G12"));
end
ah=a-b1*v21/s21*u21'*c2; ch=u21'*c2; bh=b1*v21;
jg=[ah',-ch'/(s21**2)*ch;bh*bh'-b1*b1',-ah];
specj=spec(jg);
-if mini(abs(real(specj))) < 1.0e-9*maxi(abs(jg)) then
+if min(abs(real(specj))) < 1.0e-9*max(abs(jg)) then
warning(msprintf(gettext("%s: %s has zero(s) near the imaginary axis.\n"),"gamitg","G21"));
end
else
sig21=0;
end
-sigd=maxi(sig12,sig21);
+sigd=max(sig12,sig21);
if T_EVALH==1 then
hev=spec(hg);
- if mini(abs(real(hev))) <= RELACCU*maxi(abs(hev)) then
+ if min(abs(real(hev))) <= RELACCU*max(abs(hev)) then
lower=ga; DONE=1; //Hg HAS EVAL ON iR -> NEXT LOOP
if str_member('t',options) then
mprintf(gettext("%s: %s has pure imaginary eigenvalue(s).\n"),"gamitg","H");
if T_EVALJ==1 then
jev=spec(jg);
- if mini(abs(real(jev))) <= RELACCU*maxi(abs(jev)) then
+ if min(abs(real(jev))) <= RELACCU*max(abs(jev)) then
lower=ga; DONE=1; //Jg HAS EVAL ON iR -> NEXT LOOP
if str_member('t',options) then
mprintf(gettext("%s: %s has pure imaginary eigenvalue(s).\n"),"gamitg","J");
[e,f]=spec(qx,px);
i=1;
while i<=na,
- if mini(abs([e(i),f(i)])) >= RELACCU & real(e(i)/f(i)) <= 0 then
+ if min(abs([e(i),f(i)])) >= RELACCU & real(e(i)/f(i)) <= 0 then
lower=ga; DONE=1; T_EVALH=0; i=na+1;
if str_member('t',options) then
mprintf(gettext("%s: %s is indefinite.\n"),"gamitg","X");
[e,f]=spec(qy,py);
i=1;
while i<=na,
- if mini(abs([e(i),f(i)])) >= RELACCU & real(e(i)/f(i)) <= 0 then
+ if min(abs([e(i),f(i)])) >= RELACCU & real(e(i)/f(i)) <= 0 then
lower=ga; DONE=1; T_EVALJ=0; i=na+1;
if str_member('t',options) then
mprintf(gettext("%s: %s is indefinite.\n"),"gamitg","Y");end;
if DONE==0 then
[e,f]=spec(qy'*qx,py'*px);
- if maxi(real(e-gs*f)) <= 0 then
+ if max(real(e-gs*f)) <= 0 then
upper=ga;
if str_member('t',options) then
write(%io(2),'rho(XY) <= gamma**2'); end
// mpt(i,j)= z^n*conj(mp(j,i))(1/z)
[m,n]=size(mp),z=varn(mp)
//max degree
- nmax=maxi(degree(mp));
+ nmax=max(degree(mp));
for i=1:m
for j=1:n
mpt(j,i)=poly(coeff(conj(mp(i,j)),nmax:-1:0),z,'c')
error(msprintf(gettext("%s: Wrong value for input argument #%d: Proper system expected.\n"),"h2norm",1)),
end;
sp=spec(g(2)),
- if maxi(real(sp))>=-tol then
+ if max(real(sp))>=-tol then
error(msprintf(gettext("%s: Wrong value for input argument #%d: Stable system expected.\n"),"h2norm",1)),
end,
w=obs_gram(g(2),g(4),'c'),
error(msprintf(gettext("%s: Wrong value for input argument #%d: Proper system expected.\n"),"h2norm",1)),
end
pol=roots(d),
- if maxi(real(pol))>-tol then
+ if max(real(pol))>-tol then
error(msprintf(gettext("%s: Wrong value for input argument #%d: Stable system expected.\n"),"h2norm",1)),
end,
nt=horner(n,-s),dt=horner(d,-s),
end
[P2,mu_inf,Uci,Yci,D22]=h_init(P,r,%t)
//if mu_inf < mumax then write(%io(2),mu_inf,'(3x,''romax too big: max romax= '',f10.5)');end
- mumax=mini(mu_inf,mumax)
+ mumax=min(mu_inf,mumax)
//
// Gama-iteration P6 = transformed P2 with D11 removed
[P6,Finf,mu,Uc#i,Yc#i]=h_iter(P2,r,mumin,mumax,nmax)
P12=syslin('c',A,B2,C1,D12);
[nt,dt]=trzeros(P12),rzt=real(nt./dt),
if size(nt,'*') > 0 then
- if mini(abs(rzt)) < sqrt(%eps) then
+ if min(abs(rzt)) < sqrt(%eps) then
warning(msprintf(gettext("%s: %s has a zero on/close the imaginary axis.\n"),"h_inf","P12")),
end,
end,
P21=syslin('c',A,B1,C2,D21);
[nt,dt]=trzeros(P21),rzt=real(nt./dt),
if size(nt,'*')>0 then
- if mini(abs(rzt)) < sqrt(%eps) then
+ if min(abs(rzt)) < sqrt(%eps) then
warning(msprintf(gettext("%s: %s has a zero on/close the imaginary axis.\n"),"h_inf","P21")),
end,
end,
if M11<>[] then g1=norm(M11);end
if M22<>[] then g2=norm(M22);end
- gama_inf=maxi(g1,g2);
+ gama_inf=max(g1,g2);
if gama_inf==0 then mu_inf=1/%eps/%eps, else mu_inf=1/(gama_inf*gama_inf);end
P2=syslin('c',A,[B1,B2],[C1;C2],[D11,D12;D21,0*D22]);
mu=(mumin+mumax)/2;
[P6,Finf,tv,Uc#i,Yc#i]=h_test(P2,r,mu)
- test=maxi(tv)
+ test=max(tv)
if test > 0 then
mumax=mu
H=[Ax Rx;
Qx -Ax'];
- dx=mini(abs(real(spec(H))));
+ dx=min(abs(real(spec(H))));
//write(%io(2),dx);
if dx < 1.d-9 then
mprintf(gettext("%s: An eigenvalue of %s (controller) is close to Imaginary axis.\n"),"h_inf","H");
J=[Ay' Ry;
Qy -Ay];
- dy=mini(abs(real(spec(J))));
+ dy=min(abs(real(spec(J))));
//write(%io(2),dy);
if dy < 1.d-9 then
mprintf(gettext("%s: An eigenvalue of %s (observer) is close to Imaginary axis.\n"+..
//Tests
//
// E=(Y2'*X2-mu*Y1'*X1);
- // write(%io(2),mini(svd(E)),'(5x,''mini(svd(E)) = '',f10.2)')
+ // write(%io(2),min(svd(E)),'(5x,''min(svd(E)) = '',f10.2)')
[al1,be1]=spec(A*X2 -B2*(S*X2 +B2'*X1 ),X2);
[al2,be2]=spec(Y2'*A-(Y2'*L+Y1'*C2')*C2,Y2');
[al3,be3]=spec(mu_test*Y1'*X1,Y2'*X2);
w2=find(be2==0);be2(w2)=%eps*ones(be2(w2));
w3=find(be3==0);be3(w3)=%eps*ones(be3(w3));
- test1=maxi(real(al1./be1));
- test2=maxi(real(al2./be2));
- test3=maxi(real(al3./be3))-1;
+ test1=max(real(al1./be1));
+ test2=max(real(al2./be2));
+ test3=max(real(al3./be3))-1;
tv =[test1,test2,test3]
end
end
//write(%io(2),1/sqrt(mu),'(10x,'' Try gama = '',f18.10)');
- [answer,no]=maxi(tv);
- //if exists('tv')==1 then write(%io(2),[tv,maxi(tv)],'(4f15.10)');end
+ [answer,no]=max(tv);
+ //if exists('tv')==1 then write(%io(2),[tv,max(tv)],'(4f15.10)');end
comm1=_("Unfeasible (Hx hamiltonian)")
comm2=_("Unfeasible (Hy hamiltonian)")
comm3=_("Unfeasible (Hy hamiltonian)")
H=[Ax Rx;
Qx -Ax'];
polesH=spec(H);
- dx=mini(abs(real(polesH)));
+ dx=min(abs(real(polesH)));
//write(%io(2),dx);
if dx < 1.d-6 then
mprintf(gettext("%s: An eigenvalue of %s (controller) is close to Imaginary axis.\n"),"h_inf","H");
J=[Ay' Ry;
Qy -Ay];
polesJ=spec(J);
- dy=mini(abs(real(polesJ)));
+ dy=min(abs(real(polesJ)));
//write(%io(2),dy);
if dy < 1.d-6 then
mprintf(gettext("%s: An eigenvalue of %s (observer) is close to Imaginary axis.\n"),"h_inf","J");
end
[a,b,c,d]=Sl(2:5);
eiga=spec(a);
- if maxi(real(eiga)) >= -1e-12 then
+ if max(real(eiga)) >= -1e-12 then
warning(msprintf(_("%s: System is not stable.\n"),"h_norm"))
end
if argn(2)==1 then rerr=1e-8; end;
[no,ns] = size(c); [ns,ni] = size(b);
- if mini(ni,no) == 1 then isiso = 2; else isiso = 1; end;
+ if min(ni,no) == 1 then isiso = 2; else isiso = 1; end;
[p,a] = hess(a); [u,d,v] = svd(d); b = p' * b * v; c = u' * c * p;
dtd = diag(d'*d); ddt = diag(d*d'); dtc = d' * c;
aj = sqrt(-1)*eye(ns); R1 = ones(ni,1); S1 = ones(no,1);
// compute starting value
q = ((imag(eiga) + 0.01 * ones(eiga)) ./ real(eiga)) ./ abs(eiga);
- [q,i] = maxi(q); w = abs(eiga(i));
+ [q,i] = max(q); w = abs(eiga(i));
svw = norm( c * ((w*aj*eye()-a)\b) + d );
sv0 = norm( -c * (a\b) + d );
svdd = norm(d);
- [lb,i] = maxi([svdd sv0 svw]);l=lb;
+ [lb,i] = max([svdd sv0 svw]);l=lb;
w = [1.d30 0 w ]; M = w(i);
// to avoid numerical problems with Rinv and Sinv if lb == norm(d), lb must be
// enlarged to at least (1+1e-3)*lb;
idx = find(abs(real(evH)) < 1e-8 & imag(evH) >= 0);
imev= imag(evH(idx));
[imev] = gsort(imev);
- q = maxi(size(imev));
+ q = max(size(imev));
if q <= 1 then
// q=1 can only happen in the first step if H-norm==maxsv(D) or H-norm==maxsv(0)
// due to inaccurate eigenvalue computation (so gam must be an upper bound).
else
M = 0.5 * (imev(1:q-1) + imev(2:q)); M = M(1:isiso:q-1);
sv=[];
- for j = 1:maxi(size(M)),
- sv = [sv maxi(svd(d + c*((M(j)*aj*eye() - a)\b)))];
+ for j = 1:max(size(M)),
+ sv = [sv max(svd(d + c*((M(j)*aj*eye() - a)\b)))];
end;
- lb = maxi(sv);l=[l;lb];
+ lb = max(sv);l=[l;lb];
end;
end;
if M == 1.d30 then
if rcond(x12) > 1.d-6 then
X=phi12/x12;
z=eye()-B'*X*B
- ok= mini(real(spec(z))) > -%eps
+ ok= min(real(spec(z))) > -%eps
else
ok=%t;end
endfunction
[lhs,rhs]=argn(0),
if rhs==1 then tol=1000*%eps,end,
lf=spec(sl(2)),
- if mini(abs(lf))<=tol then
+ if min(abs(lf))<=tol then
error(msprintf(gettext("%s: Wrong value for input argument #%d: Pure imaginary poles unexpected.\n"),"hankelsv",1)),
end
- if maxi(real(lf)) > tol then
+ if max(real(lf)) > tol then
error(msprintf(gettext("%s: Wrong value for input argument #%d: Stable system expected.\n"),"hankelsv",1)),
end,
[sla,sls,d]=dtsi(sl);
end,
hsvp=sqrt(spec(pp*qq)),hsvp=gsort(real(hsvp)),
hsvm=sqrt(spec(pm*qm)),hsvm=gsort(real(hsvm)),
- gl=maxi([norm(d),hsvp(tp),hsvm(tm)]),
+ gl=max([norm(d),hsvp(tp),hsvm(tm)]),
gu=norm(d)+2*(sum(hsvp)+sum(hsvm)),
//2. binary search
//----------------------
r=d'*d-(x*x)*eye(),s=d*d'-(x*x)*eye(),
mx=[a-b/r*d'*c, -x*b/r*b'; ..
x*c'/s*c, -a'+c'*d/r*b'],
- mp=abs(real(spec(mx))),mp=mini(mp),
+ mp=abs(real(spec(mx))),mp=min(mp),
if mp>tol then gu=x, else gl=x, end,
end;
n=(gu+gl)/2
s=real(spec(a));
-if mini(abs(s)) < RELTOL then
+if min(abs(s)) < RELTOL then
write(%io(2),msprintf(gettext("%s: WARNING: the A matrix has eigenvalues near the imaginary axis.\n"),"linfn"));
end
// and the variables LOW and UPP keep record of these initial values so that
// the window can be extended if necessary.
-if maxi(s)*mini(s) > 0 then
+if max(s)*min(s) > 0 then
// A is stable or antistable: use associated Lyapunov equations
// to derive lower and upper bounds.
p=lyap(a',-b*b','c');
q=lyap(a,-c'*c,'c');
s=sqrt(abs(spec(p*q)));
- lower=maxi(nd,maxi(s)); LOW=0;
+ lower=max(nd,max(s)); LOW=0;
upper=nd+2*sum(diag(s)); UPP=100*upper;
else
//***********************************************************
[na,na]=size(a); twona=2*na;
[p,m]=size(d);
-nf=twona+mini(m,p); //size of e and f
+nf=twona+min(m,p); //size of e and f
// to ensure that D'*D is of size min(m,p), replace (a,b,c,d) by
// (a',c',b',d') if m>p
else evals=[evals,a(i)/bi]; end
end
-if nai>nz then dist=0; else dist=mini(abs(real(evals)))/maxi(abs(evals)); end
+if nai>nz then dist=0; else dist=min(abs(real(evals)))/max(abs(evals)); end
else //option = 'freq'
// Here gamma is appx equal to ||G||. Distinguish two cases:
// ||D|| < ||G|| and ||D|| = ||G||.
-if mini(svd(f(nf-nz+1:nf,nf-nz+1:nf))) < TOL then
+if min(svd(f(nf-nz+1:nf,nf-nz+1:nf))) < TOL then
//-----------------------------------------------
// f(nf-nz+1:nf,nf-nz+1:nf)= I - (D'*D)/||G||**2 -> case ||D||=||G||
- noa=maxi(abs(a)); na=0; //na -> # pairs (0,0)
+ noa=max(abs(a)); na=0; //na -> # pairs (0,0)
frequ=[-1]; //||G|| is always attained for s=infinity in this case
for i=1:nf,
bi=b(i);
frequ=[-2];
if na>=nz, write(%io(2),'G is all-pass'); end
else if evals<>[] then
- maxabs=maxi(abs(evals));
- for i=1:maxi(size(evals)),
+ maxabs=max(abs(evals));
+ for i=1:max(size(evals)),
if abs(real(evals(i))) <= TOL*maxabs,
frequ=[frequ,abs(imag(evals(i)))]; end
end,
if abs(bi) > 100*TOL, evals=[evals,a(i)/bi]; end
end
- maxabs=maxi(abs(evals));
- for i=1:maxi(size(evals)),
+ maxabs=max(abs(evals));
+ for i=1:max(size(evals)),
if abs(real(evals(i))) <= TOL*maxabs,
frequ=[frequ,abs(imag(evals(i)))]; end
end
[nf,nf]=size(f);
c=1;
-for i=1:maxi(size(frequ)),
+for i=1:max(size(frequ)),
s=svd(f-%i*frequ(i)*e);
- c=mini(c,s(nf)/s(1));
+ c=min(c,s(nf)/s(1));
if c < TOL then return; end
end
// eliminates redundant elements in a list. Two entries are considered
// identical when their difference is smaller then TOL (in relative terms)
//!
-nl=maxi(size(l));
+nl=max(size(l));
i=1;
while i < nl,
rayon=lambda./(lambda.*lambda-ones(lambda))
centre=-lambda.*rayon
rayon=abs(rayon)
- rect=[mini(centre-rayon),mini(-rayon),maxi(centre+rayon),maxi(rayon)];
+ rect=[min(centre-rayon),min(-rayon),max(centre+rayon),max(rayon)];
//
drawlater()
ax=gca();
// See also: pol2des
//!
-nmax=maxi(size(markpar));
+nmax=max(size(markpar));
H=[];H(n*nout,n*nin)=0;
p=markpar;
l1=1:nout;k1=1;
end;
//
- degnum=maxi(degree(den));
+ degnum=max(degree(den));
yp=[0*ones(al,degnum+1-adeg),yp(:,(adeg-1):-1:1)];
up=[0*ones(mmu,degnum+1-bdeg),up(:,(bdeg-1):-1:1)];
y=rtitr(num,den,u,up,yp);
matd= d*((s.^[ddeg-1:-1:0]).*.eye(al,al))';
num=matd*s**(adeg-1)
den=mata*s**(ddeg-1);
- degnum=maxi(degree(den));
+ degnum=max(degree(den));
ep=[0*ones(al,degnum+1-ddeg),ep(:,(ddeg-1):-1:1)];
// Normal noise
br=sig*rand(al,Nu,'normal')
if rhs==1 then tol=1000*%eps,end,
if sl==0 then nk=0,return,end,
lf=spec(sl(2)),
- if mini(abs(lf))<=tol then
+ if min(abs(lf))<=tol then
error(msprintf(gettext("%s: Wrong value for input argument #%d: Pure imaginary poles unexpected.\n"),"nehari",1))
end,
- if maxi(real(lf))<tol then nk=0,return,end,
+ if max(real(lf))<tol then nk=0,return,end,
sl=dtsi(sl);
lc=ctr_gram(sl),lo=obs_gram(sl),
- vp=spec(lc*lo),vmax=maxi(real(vp)),
+ vp=spec(lc*lo),vmax=max(real(vp)),
nk=sqrt(vmax)
endfunction
dua_g=sig*rand(0:pas:Tmax,'n');
[nn1,nn2]=size(dua_g);
-deff('[b]=Noise(t)','b=dua_g(mini(maxi((t/'+string(Tmax)+...
+deff('[b]=Noise(t)','b=dua_g(min(max((t/'+string(Tmax)+...
')*'+string(nn2)+',1),'+string(nn2)+'))');
[dua_g,Noise]=resume(dua_g,Noise);
endfunction
while %t
ksup=find(Ic-L>DIc);
if ksup==[] then break,end
- kk1=mini(ksup);
+ kk1=min(ksup);
L=Ic(kk1);
Ic(1:kk1)=[];
kk=kk+kk1;
- if mini(abs(frq(:,ks($))-frq(:,kk))./abs(frq(:,kk)))>0.001 then
- if mini(sqrt(((repf(:,ks)-repf(:,kk)*ones(ks)).^2)/dx2+..
+ if min(abs(frq(:,ks($))-frq(:,kk))./abs(frq(:,kk)))>0.001 then
+ if min(sqrt(((repf(:,ks)-repf(:,kk)*ones(ks)).^2)/dx2+..
((repi(:,ks)-repi(:,kk)*ones(ks)).^2)/dy2)) >DIc then
ks=[ks kk];
d=0;
end
end
if ks($)~=n then
- if mini(((repf(:,ks(1))-repf(:,n))^2)/dx2+((repi(:,ks(1))-repi(:,n))^2)/dy2)>0.01 then
+ if min(((repf(:,ks(1))-repf(:,n))^2)/dx2+((repi(:,ks(1))-repi(:,n))^2)/dy2)>0.01 then
ks=[ks n];
end
end
end;
//
s=spec(a)
- if (domaine=='c'&maxi(real(s))>=0)|(domaine=='d'&maxi(abs(s))>=1) then
+ if (domaine=='c'&max(real(s))>=0)|(domaine=='d'&max(abs(s))>=1) then
error(msprintf(gettext("%s: Wrong value for input argument #%d: Stable system expected.\n"),"obs_gram",1));
end
go=lyap(a,-c'*c,domaine)
D21=D(l2,k1);
D22=D(l2,k2);
D1=[D11,D12];D2=[D11;D21];
-gamaopt=maxi( maxi(svd(D1)),maxi(svd(D2)) );
+gamaopt=max( max(svd(D1)),max(svd(D2)) );
Kopt=-D22-D21*inv(gamaopt*gamaopt*eye()-D11'*D11)*D11'*D12;
endfunction
class=[class,real(spec(A))];
end
if oneortwo>1 then
- class=[class,mini(real(spec(A)))];
+ class=[class,min(real(spec(A)))];
end
end;
[cl,indi] = gsort(-class);
class=[class,abs(spec(A))];
end
if oneortwo>1 then
- class=[class,maxi(abs(spec(A)))];
+ class=[class,max(abs(spec(A)))];
end
end;
[cl,indi] = gsort(-class);
ni=imag(nr);nr=real(nr)
di=imag(dr);dr=real(dr)
//
- mxx=maxi([nr;dr;1]*1.1)
- mnx=mini([nr;dr;-1]*1.1)
- my=maxi(abs([ni;di;1])*1.1)
+ mxx=max([nr;dr;1]*1.1)
+ mnx=min([nr;dr;-1]*1.1)
+ my=max(abs([ni;di;1])*1.1)
rect=[mnx, -my, mxx, my];
[lhs,rhs]=argn(0)
if rhs <=2,
rand('uniform');
- yy= int(mini(maxi(n*rand(1,nc),1*ones(1,nc)),n*ones(1,nc)));
+ yy= int(min(max(n*rand(1,nc),1*ones(1,nc)),n*ones(1,nc)));
ids=gsort(yy);ids=[n,ids,1];
else
[n1,n2]=size(ids);
- ids=[n,mini(n*ones(ids),maxi(gsort(ids),1*ones(ids))),1];
+ ids=[n,min(n*ones(ids),max(gsort(ids),1*ones(ids))),1];
end
u=0*ones(1,n);
[n1,n2]=size(ids);
if size(n,'*')<>1 then
error(msprintf(gettext("%s: Wrong size for input argument #%d: Single input, single output system expected.\n"),"routh_t",1))
end
- nd=maxi([degree(d) degree(n)])+1;
+ nd=max([degree(d) degree(n)])+1;
cod=coeff(d,0:nd-1);//coeff du denominateur
con=coeff(n,0:nd-1);//coeff du numerateur
cobf=cod+k*con //coeff de la boucle fermee
[m,n]=size(sl(5))
c=sl(4)
for l=1:m
- [m,i]=maxi(abs(c(l,:)));
+ [m,i]=max(abs(c(l,:)));
if m<>0 then
ci=c(l,i)
t=eye(na,na)*ci;t(i,:)=[-c(l,1:i-1), 1, -c(l,i+1:na)]
// row dimension C2.= row dimension of D2. =rk
//***************************************************************
-deff('[w]=st_able(w,margin)','if w~=[] then w=w-(maxi(real(spec(w)))+margin)*eye();end')
+deff('[w]=st_able(w,margin)','if w~=[] then w=w-(max(real(spec(w)))+margin)*eye();end')
margin=0.5; //M "stable" will mean real-part(M) < -margin
[lhs,rhs]=argn(0)
//rand('seed',0)
[LHS,RHS]=argn(0);
if RHS==3 then flag='siu';end
if flag=='siu' then
-deff('[w]=st_able(w,margin)','if w~=[] then w=w-(maxi(real(spec(w)))+margin)*eye();end')
+deff('[w]=st_able(w,margin)','if w~=[] then w=w-(max(real(spec(w)))+margin)*eye();end')
margin=0.5; //M "stable" will mean real-part(M) < -margin
w=[];k=int(nn/2);
rand('normal');
return
end
if flag=='uis' then
-deff('[w]=st_able(w,margin)','if w~=[] then w=w-(maxi(real(spec(w)))+margin)*eye();end')
+deff('[w]=st_able(w,margin)','if w~=[] then w=w-(max(real(spec(w)))+margin)*eye();end')
w=[];k=int(nn/2);
rand('normal');
//rand('seed',0);
if argn(2) == 1
w = logspace(-3,3);
end
- nf = maxi(size(w)); nsv = mini(size(d)); j = sqrt(-1);
+ nf = max(size(w)); nsv = min(size(d)); j = sqrt(-1);
svm(nsv,nf) = 0;
for i = 1:nf
svm(:,i) = svd(c*((j*w(i)*eye()-a)\b)+d);
if argn(2) == 1
w = logspace(-3,3);
end
- nf = maxi(size(w)); nsv = mini(size(d)); j = sqrt(-1);
+ nf = max(size(w)); nsv = min(size(d)); j = sqrt(-1);
svm(nsv,nf) = 0;
for i = 1:nf
svm(:,i) = svd(c*((j*w(i)*eye()-a)\b)+d);
if argn(2) == 1
w = logspace(-3,%pi);
end
- nf = maxi(size(w)); nsv = mini(size(d)); j = sqrt(-1);
+ nf = max(size(w)); nsv = min(size(d)); j = sqrt(-1);
svm(nsv,nf) = 0;
for i = 1:nf
svm(:,i) = svd(c*((exp(j*w(i))*eye()-a)\b)+d);
if argn(2) == 1
w = logspace(-3,%pi);
end
- nf = maxi(size(w)); nsv = mini(size(d)); j = sqrt(-1);
+ nf = max(size(w)); nsv = min(size(d)); j = sqrt(-1);
svm(nsv,nf) = 0;
for i = 1:nf
svm(:,i) = svd(c*((exp(j*w(i)*T)*eye()-a)\b)+d);
den=real(poly(h('A'),'s'))
na=degree(den)
c=h(4)
- [m,i]=maxi(abs(c))
+ [m,i]=max(abs(c))
ci=c(i)
t=eye(h(2))*ci;t(i,:)=[-c(1:i-1), 1, -c(i+1:na)]
al=h(2)*t;
end
end
else
- if mini(size(x))==1 then //fft of a vector
+ if min(size(x))==1 then //fft of a vector
if n<>[] then //pad or truncate
s=size(x,'*')
if s>n then //truncated fft
end
end
else
- if mini(size(x))==1 then //fft of a vector
+ if min(size(x))==1 then //fft of a vector
if n<>[] then //pad or truncate
s=size(x,'*')
if s>n then //truncated fft
//!
[linn,mac]=where()
nn=prod(size(linn))
-lm=maxi(length(mac))
+lm=max(length(mac))
txt=[]
for k=2:nn
if mac(k)=='exec' then
'r=horner(p(2),x)./horner(p(3),x),';
'return,';
'end;';
- 'd=maxi(degree(p));';
+ 'd=max(degree(p));';
'r=coeff(p,d);';
'for k=1:d,';
'r=r*x+coeff(p,d-k)*eye();';
'r=horner(p(2),x)./horner(p(3),x),';
'return,';
'end;';
- 'd=maxi(degree(p));';
+ 'd=max(degree(p));';
'r=coeff(p,d);';
'for k=1:d,';
'r=r*x+coeff(p,d-k)*eye();';
//if cumprod(a+0*a)<>[1 -30;-3 -120;-15 720]+0*%i then bugmes();quit;end
//maxi
a=[1 2;-3 4;5 -6];
-if or(maxi(a)<>5) then bugmes();quit;end
-if or(maxi(a+0)<>5) then bugmes();quit;end
-if or(maxi(a,'r')<>[5 4]) then bugmes();quit;end
-if or(maxi(a+0,'r')<>[5 4]) then bugmes();quit;end
+if or(max(a)<>5) then bugmes();quit;end
+if or(max(a+0)<>5) then bugmes();quit;end
+if or(max(a,'r')<>[5 4]) then bugmes();quit;end
+if or(max(a+0,'r')<>[5 4]) then bugmes();quit;end
n='r';
-if or(maxi(a,n)<>[5 4]) then bugmes();quit;end
-if or(maxi(a+0,n)<>[5 4]) then bugmes();quit;end
-if or(maxi(a,'c')<>[2;4;5]) then bugmes();quit;end
-if or(maxi(a+0,'c')<>[2;4;5]) then bugmes();quit;end
+if or(max(a,n)<>[5 4]) then bugmes();quit;end
+if or(max(a+0,n)<>[5 4]) then bugmes();quit;end
+if or(max(a,'c')<>[2;4;5]) then bugmes();quit;end
+if or(max(a+0,'c')<>[2;4;5]) then bugmes();quit;end
n='c';
-if or(maxi(a,n)<>[2;4;5]) then bugmes();quit;end
-if or(maxi(a+0,n)<>[2;4;5]) then bugmes();quit;end
+if or(max(a,n)<>[2;4;5]) then bugmes();quit;end
+if or(max(a+0,n)<>[2;4;5]) then bugmes();quit;end
//a=[1 2;-3 4;5 -6]+0*%i;
-//if maxi(a)<>[1 -30;-3 -120;-15 720]+0*%i then bugmes();quit;end
-//if maxi(a+0)<>[1 -30;-3 -120;-15 720]+0*%i then bugmes();quit;end
-//if or(maxi(a,'r')<>[5 4]+0*%i) then bugmes();quit;end
-//if or(maxi(a+0,'r')<>[5 4]+0*%i) then bugmes();quit;end
+//if max(a)<>[1 -30;-3 -120;-15 720]+0*%i then bugmes();quit;end
+//if max(a+0)<>[1 -30;-3 -120;-15 720]+0*%i then bugmes();quit;end
+//if or(max(a,'r')<>[5 4]+0*%i) then bugmes();quit;end
+//if or(max(a+0,'r')<>[5 4]+0*%i) then bugmes();quit;end
//n='r';
-//if or(maxi(a,n)<>[5 4]+0*%i) then bugmes();quit;end
-//if or(maxi(a+0,n)<>[5 4]+0*%i) then bugmes();quit;end
-//if or(maxi(a,'c')<>[2;4;5]+0*%i) then bugmes();quit;end
-//if or(maxi(a+0,'c')<>[2;4;5]+0*%i) then bugmes();quit;end
+//if or(max(a,n)<>[5 4]+0*%i) then bugmes();quit;end
+//if or(max(a+0,n)<>[5 4]+0*%i) then bugmes();quit;end
+//if or(max(a,'c')<>[2;4;5]+0*%i) then bugmes();quit;end
+//if or(max(a+0,'c')<>[2;4;5]+0*%i) then bugmes();quit;end
//n='c';
-//if or(maxi(a,n)<>[2;4;5]+0*%i) then bugmes();quit;end
-//if or(maxi(a+0,n)<>[2;4;5]+0*%i) then bugmes();quit;end
+//if or(max(a,n)<>[2;4;5]+0*%i) then bugmes();quit;end
+//if or(max(a+0,n)<>[2;4;5]+0*%i) then bugmes();quit;end
a=[];
-if maxi(a)<>[] then bugmes();quit;end
-if maxi([])<>[] then bugmes();quit;end
-if maxi(a,'r')<>[] then bugmes();quit;end
-if maxi([],'r')<>[] then bugmes();quit;end
+if max(a)<>[] then bugmes();quit;end
+if max([])<>[] then bugmes();quit;end
+if max(a,'r')<>[] then bugmes();quit;end
+if max([],'r')<>[] then bugmes();quit;end
n='r';
-if maxi(a,n)<>[] then bugmes();quit;end
-if maxi([],n)<>[] then bugmes();quit;end
-if maxi(a,'c')<>[] then bugmes();quit;end
-if maxi([],'c')<>[] then bugmes();quit;end
+if max(a,n)<>[] then bugmes();quit;end
+if max([],n)<>[] then bugmes();quit;end
+if max(a,'c')<>[] then bugmes();quit;end
+if max([],'c')<>[] then bugmes();quit;end
n='c';
-if maxi(a,n)<>[] then bugmes();quit;end
-if maxi([],n)<>[] then bugmes();quit;end
+if max(a,n)<>[] then bugmes();quit;end
+if max([],n)<>[] then bugmes();quit;end
a=sparse([1 2;-3 4;5 -6]);
-//if maxi(a)<>5 then bugmes();quit;end
-//if maxi(a+0*a)<>5 then bugmes();quit;end
+//if max(a)<>5 then bugmes();quit;end
+//if max(a+0*a)<>5 then bugmes();quit;end
a=sparse([1 2;-3 4;5 -6]+0*%i);
-//if maxi(a)<>[1 -30;-3 -120;-15 720]+0*%i then bugmes();quit;end
-//if maxi(a+0*a)<>[1 -30;-3 -120;-15 720]+0*%i then bugmes();quit;end
+//if max(a)<>[1 -30;-3 -120;-15 720]+0*%i then bugmes();quit;end
+//if max(a+0*a)<>[1 -30;-3 -120;-15 720]+0*%i then bugmes();quit;end
//mini
a=[1 2;-3 4;5 -6];
-if or(mini(a)<>-6) then bugmes();quit;end
-if or(mini(a+0)<>-6) then bugmes();quit;end
-if or(mini(a,'r')<>[-3 -6]) then bugmes();quit;end
-if or(mini(a+0,'r')<>[-3 -6]) then bugmes();quit;end
+if or(min(a)<>-6) then bugmes();quit;end
+if or(min(a+0)<>-6) then bugmes();quit;end
+if or(min(a,'r')<>[-3 -6]) then bugmes();quit;end
+if or(min(a+0,'r')<>[-3 -6]) then bugmes();quit;end
n='r';
-if or(mini(a,n)<>[-3 -6]) then bugmes();quit;end
-if or(mini(a+0,n)<>[-3 -6]) then bugmes();quit;end
-if or(mini(a,'c')<>[1;-3;-6]) then bugmes();quit;end
-if or(mini(a+0,'c')<>[1;-3;-6]) then bugmes();quit;end
+if or(min(a,n)<>[-3 -6]) then bugmes();quit;end
+if or(min(a+0,n)<>[-3 -6]) then bugmes();quit;end
+if or(min(a,'c')<>[1;-3;-6]) then bugmes();quit;end
+if or(min(a+0,'c')<>[1;-3;-6]) then bugmes();quit;end
n='c';
-if or(mini(a,n)<>[1;-3;-6]) then bugmes();quit;end
-if or(mini(a+0,n)<>[1;-3;-6]) then bugmes();quit;end
+if or(min(a,n)<>[1;-3;-6]) then bugmes();quit;end
+if or(min(a+0,n)<>[1;-3;-6]) then bugmes();quit;end
//a=[1 2;-3 4;5 -6]+0*%i;
-//if mini(a)<>[1 -30;-3 -120;-15 720]+0*%i then bugmes();quit;end
-//if mini(a+0)<>[1 -30;-3 -120;-15 720]+0*%i then bugmes();quit;end
-//if or(mini(a,'r')<>[-3 -6]+0*%i) then bugmes();quit;end
-//if or(mini(a+0,'r')<>[-3 -6]+0*%i) then bugmes();quit;end
+//if min(a)<>[1 -30;-3 -120;-15 720]+0*%i then bugmes();quit;end
+//if min(a+0)<>[1 -30;-3 -120;-15 720]+0*%i then bugmes();quit;end
+//if or(min(a,'r')<>[-3 -6]+0*%i) then bugmes();quit;end
+//if or(min(a+0,'r')<>[-3 -6]+0*%i) then bugmes();quit;end
//n='r';
-//if or(mini(a,n)<>[-3 -6]+0*%i) then bugmes();quit;end
-//if or(mini(a+0,n)<>[-3 -6]+0*%i) then bugmes();quit;end
-//if or(mini(a,'c')<>[1;-3;-6]+0*%i) then bugmes();quit;end
-//if or(mini(a+0,'c')<>[1;-3;-6]+0*%i) then bugmes();quit;end
+//if or(min(a,n)<>[-3 -6]+0*%i) then bugmes();quit;end
+//if or(min(a+0,n)<>[-3 -6]+0*%i) then bugmes();quit;end
+//if or(min(a,'c')<>[1;-3;-6]+0*%i) then bugmes();quit;end
+//if or(min(a+0,'c')<>[1;-3;-6]+0*%i) then bugmes();quit;end
//n='c';
-//if or(mini(a,n)<>[1;-3;-6]+0*%i) then bugmes();quit;end
-//if or(mini(a+0,n)<>[1;-3;-6]+0*%i) then bugmes();quit;end
+//if or(min(a,n)<>[1;-3;-6]+0*%i) then bugmes();quit;end
+//if or(min(a+0,n)<>[1;-3;-6]+0*%i) then bugmes();quit;end
a=[];
-if mini(a)<>[] then bugmes();quit;end
-if mini([])<>[] then bugmes();quit;end
-if mini(a,'r')<>[] then bugmes();quit;end
-if mini([],'r')<>[] then bugmes();quit;end
+if min(a)<>[] then bugmes();quit;end
+if min([])<>[] then bugmes();quit;end
+if min(a,'r')<>[] then bugmes();quit;end
+if min([],'r')<>[] then bugmes();quit;end
n='r';
-if mini(a,n)<>[] then bugmes();quit;end
-if mini([],n)<>[] then bugmes();quit;end
-if mini(a,'c')<>[] then bugmes();quit;end
-if mini([],'c')<>[] then bugmes();quit;end
+if min(a,n)<>[] then bugmes();quit;end
+if min([],n)<>[] then bugmes();quit;end
+if min(a,'c')<>[] then bugmes();quit;end
+if min([],'c')<>[] then bugmes();quit;end
n='c';
-if mini(a,n)<>[] then bugmes();quit;end
-if mini([],n)<>[] then bugmes();quit;end
+if min(a,n)<>[] then bugmes();quit;end
+if min([],n)<>[] then bugmes();quit;end
a=sparse([1 2;-3 4;5 -6]);
-//if mini(a)<>-6 then bugmes();quit;end
-//if mini(a+0*a)<>-6 then bugmes();quit;end
+//if min(a)<>-6 then bugmes();quit;end
+//if min(a+0*a)<>-6 then bugmes();quit;end
a=sparse([1 2;-3 4;5 -6]+0*%i);
-//if mini(a)<>[1 -30;-3 -120;-15 720]+0*%i then bugmes();quit;end
-//if mini(a+0*a)<>[1 -30;-3 -120;-15 720]+0*%i then bugmes();quit;end
+//if min(a)<>[1 -30;-3 -120;-15 720]+0*%i then bugmes();quit;end
+//if min(a+0*a)<>[1 -30;-3 -120;-15 720]+0*%i then bugmes();quit;end
//kron
a=[1 2];b=[3;4];
if or(kron(a,b)<>[3 6;4 8]) then bugmes();quit;end
//maxi
a=[1 2;-3 4;5 -6];
-if or(maxi(a)<>5) then pause,end
-if or(maxi(a+0)<>5) then pause,end
-if or(maxi(a,'r')<>[5 4]) then pause,end
-if or(maxi(a+0,'r')<>[5 4]) then pause,end
+if or(max(a)<>5) then pause,end
+if or(max(a+0)<>5) then pause,end
+if or(max(a,'r')<>[5 4]) then pause,end
+if or(max(a+0,'r')<>[5 4]) then pause,end
n='r';
-if or(maxi(a,n)<>[5 4]) then pause,end
-if or(maxi(a+0,n)<>[5 4]) then pause,end
+if or(max(a,n)<>[5 4]) then pause,end
+if or(max(a+0,n)<>[5 4]) then pause,end
-if or(maxi(a,'c')<>[2;4;5]) then pause,end
-if or(maxi(a+0,'c')<>[2;4;5]) then pause,end
+if or(max(a,'c')<>[2;4;5]) then pause,end
+if or(max(a+0,'c')<>[2;4;5]) then pause,end
n='c';
-if or(maxi(a,n)<>[2;4;5]) then pause,end
-if or(maxi(a+0,n)<>[2;4;5]) then pause,end
+if or(max(a,n)<>[2;4;5]) then pause,end
+if or(max(a+0,n)<>[2;4;5]) then pause,end
//a=[1 2;-3 4;5 -6]+0*%i;
-//if maxi(a)<>[1 -30;-3 -120;-15 720]+0*%i then pause,end
-//if maxi(a+0)<>[1 -30;-3 -120;-15 720]+0*%i then pause,end
-//if or(maxi(a,'r')<>[5 4]+0*%i) then pause,end
-//if or(maxi(a+0,'r')<>[5 4]+0*%i) then pause,end
+//if max(a)<>[1 -30;-3 -120;-15 720]+0*%i then pause,end
+//if max(a+0)<>[1 -30;-3 -120;-15 720]+0*%i then pause,end
+//if or(max(a,'r')<>[5 4]+0*%i) then pause,end
+//if or(max(a+0,'r')<>[5 4]+0*%i) then pause,end
//n='r';
-//if or(maxi(a,n)<>[5 4]+0*%i) then pause,end
-//if or(maxi(a+0,n)<>[5 4]+0*%i) then pause,end
+//if or(max(a,n)<>[5 4]+0*%i) then pause,end
+//if or(max(a+0,n)<>[5 4]+0*%i) then pause,end
-//if or(maxi(a,'c')<>[2;4;5]+0*%i) then pause,end
-//if or(maxi(a+0,'c')<>[2;4;5]+0*%i) then pause,end
+//if or(max(a,'c')<>[2;4;5]+0*%i) then pause,end
+//if or(max(a+0,'c')<>[2;4;5]+0*%i) then pause,end
//n='c';
-//if or(maxi(a,n)<>[2;4;5]+0*%i) then pause,end
-//if or(maxi(a+0,n)<>[2;4;5]+0*%i) then pause,end
+//if or(max(a,n)<>[2;4;5]+0*%i) then pause,end
+//if or(max(a+0,n)<>[2;4;5]+0*%i) then pause,end
a=[];
-if maxi(a)<>[] then pause,end
-if maxi([])<>[] then pause,end
+if max(a)<>[] then pause,end
+if max([])<>[] then pause,end
-if maxi(a,'r')<>[] then pause,end
-if maxi([],'r')<>[] then pause,end
+if max(a,'r')<>[] then pause,end
+if max([],'r')<>[] then pause,end
n='r';
-if maxi(a,n)<>[] then pause,end
-if maxi([],n)<>[] then pause,end
+if max(a,n)<>[] then pause,end
+if max([],n)<>[] then pause,end
-if maxi(a,'c')<>[] then pause,end
-if maxi([],'c')<>[] then pause,end
+if max(a,'c')<>[] then pause,end
+if max([],'c')<>[] then pause,end
n='c';
-if maxi(a,n)<>[] then pause,end
-if maxi([],n)<>[] then pause,end
+if max(a,n)<>[] then pause,end
+if max([],n)<>[] then pause,end
a=sparse([1 2;-3 4;5 -6]);
-//if maxi(a)<>5 then pause,end
-//if maxi(a+0*a)<>5 then pause,end
+//if max(a)<>5 then pause,end
+//if max(a+0*a)<>5 then pause,end
a=sparse([1 2;-3 4;5 -6]+0*%i);
-//if maxi(a)<>[1 -30;-3 -120;-15 720]+0*%i then pause,end
-//if maxi(a+0*a)<>[1 -30;-3 -120;-15 720]+0*%i then pause,end
+//if max(a)<>[1 -30;-3 -120;-15 720]+0*%i then pause,end
+//if max(a+0*a)<>[1 -30;-3 -120;-15 720]+0*%i then pause,end
//mini
a=[1 2;-3 4;5 -6];
-if or(mini(a)<>-6) then pause,end
-if or(mini(a+0)<>-6) then pause,end
-if or(mini(a,'r')<>[-3 -6]) then pause,end
-if or(mini(a+0,'r')<>[-3 -6]) then pause,end
+if or(min(a)<>-6) then pause,end
+if or(min(a+0)<>-6) then pause,end
+if or(min(a,'r')<>[-3 -6]) then pause,end
+if or(min(a+0,'r')<>[-3 -6]) then pause,end
n='r';
-if or(mini(a,n)<>[-3 -6]) then pause,end
-if or(mini(a+0,n)<>[-3 -6]) then pause,end
+if or(min(a,n)<>[-3 -6]) then pause,end
+if or(min(a+0,n)<>[-3 -6]) then pause,end
-if or(mini(a,'c')<>[1;-3;-6]) then pause,end
-if or(mini(a+0,'c')<>[1;-3;-6]) then pause,end
+if or(min(a,'c')<>[1;-3;-6]) then pause,end
+if or(min(a+0,'c')<>[1;-3;-6]) then pause,end
n='c';
-if or(mini(a,n)<>[1;-3;-6]) then pause,end
-if or(mini(a+0,n)<>[1;-3;-6]) then pause,end
+if or(min(a,n)<>[1;-3;-6]) then pause,end
+if or(min(a+0,n)<>[1;-3;-6]) then pause,end
//a=[1 2;-3 4;5 -6]+0*%i;
-//if mini(a)<>[1 -30;-3 -120;-15 720]+0*%i then pause,end
-//if mini(a+0)<>[1 -30;-3 -120;-15 720]+0*%i then pause,end
-//if or(mini(a,'r')<>[-3 -6]+0*%i) then pause,end
-//if or(mini(a+0,'r')<>[-3 -6]+0*%i) then pause,end
+//if min(a)<>[1 -30;-3 -120;-15 720]+0*%i then pause,end
+//if min(a+0)<>[1 -30;-3 -120;-15 720]+0*%i then pause,end
+//if or(min(a,'r')<>[-3 -6]+0*%i) then pause,end
+//if or(min(a+0,'r')<>[-3 -6]+0*%i) then pause,end
//n='r';
-//if or(mini(a,n)<>[-3 -6]+0*%i) then pause,end
-//if or(mini(a+0,n)<>[-3 -6]+0*%i) then pause,end
+//if or(min(a,n)<>[-3 -6]+0*%i) then pause,end
+//if or(min(a+0,n)<>[-3 -6]+0*%i) then pause,end
-//if or(mini(a,'c')<>[1;-3;-6]+0*%i) then pause,end
-//if or(mini(a+0,'c')<>[1;-3;-6]+0*%i) then pause,end
+//if or(min(a,'c')<>[1;-3;-6]+0*%i) then pause,end
+//if or(min(a+0,'c')<>[1;-3;-6]+0*%i) then pause,end
//n='c';
-//if or(mini(a,n)<>[1;-3;-6]+0*%i) then pause,end
-//if or(mini(a+0,n)<>[1;-3;-6]+0*%i) then pause,end
+//if or(min(a,n)<>[1;-3;-6]+0*%i) then pause,end
+//if or(min(a+0,n)<>[1;-3;-6]+0*%i) then pause,end
a=[];
-if mini(a)<>[] then pause,end
-if mini([])<>[] then pause,end
+if min(a)<>[] then pause,end
+if min([])<>[] then pause,end
-if mini(a,'r')<>[] then pause,end
-if mini([],'r')<>[] then pause,end
+if min(a,'r')<>[] then pause,end
+if min([],'r')<>[] then pause,end
n='r';
-if mini(a,n)<>[] then pause,end
-if mini([],n)<>[] then pause,end
+if min(a,n)<>[] then pause,end
+if min([],n)<>[] then pause,end
-if mini(a,'c')<>[] then pause,end
-if mini([],'c')<>[] then pause,end
+if min(a,'c')<>[] then pause,end
+if min([],'c')<>[] then pause,end
n='c';
-if mini(a,n)<>[] then pause,end
-if mini([],n)<>[] then pause,end
+if min(a,n)<>[] then pause,end
+if min([],n)<>[] then pause,end
a=sparse([1 2;-3 4;5 -6]);
-//if mini(a)<>-6 then pause,end
-//if mini(a+0*a)<>-6 then pause,end
+//if min(a)<>-6 then pause,end
+//if min(a+0*a)<>-6 then pause,end
a=sparse([1 2;-3 4;5 -6]+0*%i);
-//if mini(a)<>[1 -30;-3 -120;-15 720]+0*%i then pause,end
-//if mini(a+0*a)<>[1 -30;-3 -120;-15 720]+0*%i then pause,end
+//if min(a)<>[1 -30;-3 -120;-15 720]+0*%i then pause,end
+//if min(a+0*a)<>[1 -30;-3 -120;-15 720]+0*%i then pause,end
//kron
a=[1 2];b=[3;4];
z=poly(0,'z');a=[z 1 -z+1 8;z*z 10*z 5 -z;3 7 z+1 -1-z];
-[m,n]=size(a);mn=mini([m n]);a1=a;l=1;
+[m,n]=size(a);mn=min([m n]);a1=a;l=1;
//
for dg=-(m-1):0,
if norm(coeff(triu(a,dg)-a1),1)>%eps then dg,bugmes();quit;end,
- for k=1:l,a1(-dg+k,k)=0;end,l=mini([l+1,mn]);end
+ for k=1:l,a1(-dg+k,k)=0;end,l=min([l+1,mn]);end
for dg=1:n,
if norm(coeff(triu(a,dg)-a1),1)>%eps then dg,bugmes();quit;end,
//
-a=a';a1=a;[m,n]=size(a);mn=mini([m,n]);l=1;
+a=a';a1=a;[m,n]=size(a);mn=min([m,n]);l=1;
for dg=-(m-1):0,
if norm(coeff(triu(a,dg)-a1),1)>%eps then dg,bugmes();quit;end,
- for k=1:l,a1(-dg+k,k)=0;end,l=mini([l+1,mn]);end
+ for k=1:l,a1(-dg+k,k)=0;end,l=min([l+1,mn]);end
for dg=1:n,
if norm(coeff(triu(a,dg)-a1),1)>%eps then dg,bugmes();quit;end,
a=a+%i*[1 2 3 4;5 6 7 8;9 10 11 12]';
-[m,n]=size(a);mn=mini([m n]);a1=a;l=1;
+[m,n]=size(a);mn=min([m n]);a1=a;l=1;
//
for dg=-(m-1):0,
if norm(coeff(triu(a,dg)-a1),1)>%eps then dg,bugmes();quit;end,
- for k=1:l,a1(-dg+k,k)=0;end,l=mini([l+1,mn]);end
+ for k=1:l,a1(-dg+k,k)=0;end,l=min([l+1,mn]);end
for dg=1:n,
if norm(coeff(triu(a,dg)-a1),1)>%eps then dg,bugmes();quit;end,
//
-a=a';a1=a;[m,n]=size(a);mn=mini([m,n]);l=1;
+a=a';a1=a;[m,n]=size(a);mn=min([m,n]);l=1;
for dg=-(m-1):0,
if norm(coeff(triu(a,dg)-a1),1)>%eps then dg,bugmes();quit;end,
- for k=1:l,a1(-dg+k,k)=0;end,l=mini([l+1,mn]);end
+ for k=1:l,a1(-dg+k,k)=0;end,l=min([l+1,mn]);end
for dg=1:n,
if norm(coeff(triu(a,dg)-a1),1)>%eps then dg,bugmes();quit;end,
if norm(log(exp(x))-x,1) > 10*%eps then pause,end
// triu
z=poly(0,'z');a=[z 1 -z+1 8;z*z 10*z 5 -z;3 7 z+1 -1-z];
-[m,n]=size(a);mn=mini([m n]);a1=a;l=1;
+[m,n]=size(a);mn=min([m n]);a1=a;l=1;
//
for dg=-(m-1):0,
if norm(coeff(triu(a,dg)-a1),1)>%eps then dg,pause,end,
- for k=1:l,a1(-dg+k,k)=0;end,l=mini([l+1,mn]);end
+ for k=1:l,a1(-dg+k,k)=0;end,l=min([l+1,mn]);end
for dg=1:n,
if norm(coeff(triu(a,dg)-a1),1)>%eps then dg,pause,end,
if dg>(n-m),l=l-1;end;for k=1:l,a1(k,dg+k)=0;end;end;
//
-a=a';a1=a;[m,n]=size(a);mn=mini([m,n]);l=1;
+a=a';a1=a;[m,n]=size(a);mn=min([m,n]);l=1;
for dg=-(m-1):0,
if norm(coeff(triu(a,dg)-a1),1)>%eps then dg,pause,end,
- for k=1:l,a1(-dg+k,k)=0;end,l=mini([l+1,mn]);end
+ for k=1:l,a1(-dg+k,k)=0;end,l=min([l+1,mn]);end
for dg=1:n,
if norm(coeff(triu(a,dg)-a1),1)>%eps then dg,pause,end,
if dg>(n-m),l=l-1;end;for k=1:l,a1(k,dg+k)=0;end;end;
//
a=a+%i*[1 2 3 4;5 6 7 8;9 10 11 12]';
-[m,n]=size(a);mn=mini([m n]);a1=a;l=1;
+[m,n]=size(a);mn=min([m n]);a1=a;l=1;
//
for dg=-(m-1):0,
if norm(coeff(triu(a,dg)-a1),1)>%eps then dg,pause,end,
- for k=1:l,a1(-dg+k,k)=0;end,l=mini([l+1,mn]);end
+ for k=1:l,a1(-dg+k,k)=0;end,l=min([l+1,mn]);end
for dg=1:n,
if norm(coeff(triu(a,dg)-a1),1)>%eps then dg,pause,end,
if dg>(n-m),l=l-1;end;for k=1:l,a1(k,dg+k)=0;end;end;
//
-a=a';a1=a;[m,n]=size(a);mn=mini([m,n]);l=1;
+a=a';a1=a;[m,n]=size(a);mn=min([m,n]);l=1;
for dg=-(m-1):0,
if norm(coeff(triu(a,dg)-a1),1)>%eps then dg,pause,end,
- for k=1:l,a1(-dg+k,k)=0;end,l=mini([l+1,mn]);end
+ for k=1:l,a1(-dg+k,k)=0;end,l=min([l+1,mn]);end
for dg=1:n,
if norm(coeff(triu(a,dg)-a1),1)>%eps then dg,pause,end,
if dg>(n-m),l=l-1;end;for k=1:l,a1(k,dg+k)=0;end;end;
zfrontar = sinl*sthe1+dec*xx(23,i);
//---------------boundaries
xp=[xprear,xpfront,[xf(2,:);yf(2,:);zf(2,:)]];
- xmin=mini(xp(1,:));xmax=maxi(xp(1,:));
- ymin=mini(xp(2,:));ymax=maxi(xp(2,:));
+ xmin=min(xp(1,:));xmax=max(xp(1,:));
+ ymin=min(xp(2,:));ymax=max(xp(2,:));
if xmin <0 then xmin=1.04*xmin,else xmin=0.96*xmin;end
if xmax >0 then xmax=1.04*xmax,else xmax=0.96*xmax;end
if ymin <0 then ymin=1.04*ymin,else ymin=0.96*ymin;end
if ymax >0 then ymax=1.04*ymax,else ymax=0.96*ymax;end
- zmin=mini(xp(3,:));zmax=maxi(xp(3,:));
+ zmin=min(xp(3,:));zmax=max(xp(3,:));
rect=[xmin,xmax,ymin,ymax,zmin,zmax]
get_velo_rti(%f);
f_name();
//draw chain given sequence of points
//!
//
-n=maxi(size(p));
+n=max(size(p));
arcs=[ -r ,r,2*r,2*r,0,64*360].*.ones(n,1);
arcs=[ p , 0*ones(n,4)] + arcs;
xarcs(arcs');
[xu,yu,zu]=wheelg(nu,size(time,'*'),xu,yu,zu,xx(:,time));
[xr,yr,zr]=wheelg(nr,size(time,'*'),xr,yr,zr,xx(:,time));
- xmin=mini(xu);
- xmax=maxi(xu);
- ymin=mini(yu);
- ymax=maxi(yu);
- zmin=mini(zu);
- zmax=maxi(zu);
+ xmin=min(xu);
+ xmax=max(xu);
+ ymin=min(yu);
+ ymax=max(yu);
+ zmin=min(zu);
+ zmax=max(zu);
//[4] creating the graphic objects
drawlater()
//[x1,w,iw]=impl([1;0;0],[-0.04;0.04;0],0,0.2,'resid','aplusp');
// hot start from previous call
//[x1]=impl([1;0;0],[-0.04;0.04;0],0.2,0.4,'resid','aplusp',w,iw);
-//maxi(abs(x1-x))
+//max(abs(x1-x))
]]></programlisting>
</refsection>
//[x1,w,iw]=impl([1;0;0],[-0.04;0.04;0],0,0.2,'resid','aplusp');
// inicialização rápida da chamada anterior
//[x1]=impl([1;0;0],[-0.04;0.04;0],0.2,0.4,'resid','aplusp',w,iw);
-//maxi(abs(x1-x))
+//max(abs(x1-x))
]]></programlisting>
</refsection>
clear trusol
exec(SCI+'/modules/differential_equations/tests/unit_tests/bvode_tst.sci');
[z,zf]=col1();
-if maxi(abs(z-zf))>1.e-5 then bugmes();quit;end
+if max(abs(z-zf))>1.e-5 then bugmes();quit;end
[z,zf]=col2(0);
// Fortran Coded version
-if maxi(abs(z-zf))>1.e-2 then bugmes();quit;end
+if max(abs(z-zf))>1.e-2 then bugmes();quit;end
[z,zf]=col2(1);
// Scilab coded version
-if maxi(abs(z-zf))>1.e-2 then bugmes();quit;end
+if max(abs(z-zf))>1.e-2 then bugmes();quit;end
exec(SCI+'/modules/differential_equations/tests/unit_tests/bvode_tst.sci');
[z,zf]=col1();
-if maxi(abs(z-zf))>1.e-5 then pause,end
+if max(abs(z-zf))>1.e-5 then pause,end
[z,zf]=col2(0);
// Fortran Coded version
-if maxi(abs(z-zf))>1.e-2 then pause,end
+if max(abs(z-zf))>1.e-2 then pause,end
[z,zf]=col2(1);
// Scilab coded version
-if maxi(abs(z-zf))>1.e-2 then pause,end
+if max(abs(z-zf))>1.e-2 then pause,end
//
// 1. fortran called by fydot, without jacobian
y1=ode(y0,t0,t1,'fex');
-if maxi(y1-yref) > Leps then bugmes();quit;end
+if max(y1-yref) > Leps then bugmes();quit;end
// 2. fortran called by fydot, type given (stiff), no jacobian
y2=ode('stiff',y0,t0,t1,'fex');
-if maxi(y2-yref) > Leps then bugmes();quit;end
+if max(y2-yref) > Leps then bugmes();quit;end
// 3. fortran called by fydot , fjac, type given
y3=ode('stiff',y0,t0,t1,'fex','jex');
-if maxi(y3-yref) > Leps then bugmes();quit;end
+if max(y3-yref) > Leps then bugmes();quit;end
// hot restart
[z,w,iw]=ode('stiff',y0,0,0.4,'fex','jex');
z=ode('stiff',z,0.4,4,'fex','jex',w,iw);
-if maxi(z-y3(:,2)) > %eps then bugmes();quit;end
+if max(z-y3(:,2)) > %eps then bugmes();quit;end
[y1,w,iw]=ode(y0,t0,t1(1),'fex');
y2=ode(y0,t1(1),t1(2:nt),'fex',w,iw);
-if maxi([y1 y2]-yref) > Leps then bugmes();quit;end
+if max([y1 y2]-yref) > Leps then bugmes();quit;end
[y1,w,iw]=ode(y0,t0,t1(1),'fex','jex');
y2=ode(y0,t1(1),t1(2:nt),'fex','jex',w,iw);
-if maxi([y1 y2]-yref) > Leps then bugmes();quit;end
+if max([y1 y2]-yref) > Leps then bugmes();quit;end
// variation of tolerances
atol=[0.001,0.0001,0.001];rtol=atol;
// externals
// 4. type given , scilab lhs ,jacobian not passed
y4=ode('stiff',y0,t0,t1(1),atol,rtol,f);
-if maxi(y4(:,1)-yref(:,1)) > 0.01 then bugmes();quit;end
+if max(y4(:,1)-yref(:,1)) > 0.01 then bugmes();quit;end
// 5. type non given, rhs and scilab jacobian
y5=ode(y0,t0,t1,f,j);
-if maxi(y5-yref) > Leps then bugmes();quit;end
+if max(y5-yref) > Leps then bugmes();quit;end
// 6. type given (stiff),rhs and jacobian by scilab
y6=ode('stiff',y0,t0,t1,0.00001,0.00001,f,j);
if (y6-yref) > 2*0.00001 then bugmes();quit;end
a=rand(3,3);ea=expm(a);
deff('[ydot]=f(t,y)','ydot=a*y')
t1=1;y=ode('adams',eye(a),t0,t1,f);
-if maxi(ea-y) > Leps then bugmes();quit;end
+if max(ea-y) > Leps then bugmes();quit;end
//
// DAE's
// dy1/dt = -.04*y1 + 1.e4*y2*y3
//
// 1. fortran called by fydot, without jacobian
y1=ode(y0,t0,t1,'fex');
-if maxi(y1-yref) > Leps then pause,end
+if max(y1-yref) > Leps then pause,end
// 2. fortran called by fydot, type given (stiff), no jacobian
y2=ode('stiff',y0,t0,t1,'fex');
-if maxi(y2-yref) > Leps then pause,end
+if max(y2-yref) > Leps then pause,end
// 3. fortran called by fydot , fjac, type given
y3=ode('stiff',y0,t0,t1,'fex','jex');
-if maxi(y3-yref) > Leps then pause,end
+if max(y3-yref) > Leps then pause,end
// hot restart
[z,w,iw]=ode('stiff',y0,0,0.4,'fex','jex');
z=ode('stiff',z,0.4,4,'fex','jex',w,iw);
-if maxi(z-y3(:,2)) > %eps then pause,end
+if max(z-y3(:,2)) > %eps then pause,end
[y1,w,iw]=ode(y0,t0,t1(1),'fex');
y2=ode(y0,t1(1),t1(2:nt),'fex',w,iw);
-if maxi([y1 y2]-yref) > Leps then pause,end
+if max([y1 y2]-yref) > Leps then pause,end
[y1,w,iw]=ode(y0,t0,t1(1),'fex','jex');
y2=ode(y0,t1(1),t1(2:nt),'fex','jex',w,iw);
-if maxi([y1 y2]-yref) > Leps then pause,end
+if max([y1 y2]-yref) > Leps then pause,end
// variation of tolerances
atol=[0.001,0.0001,0.001];rtol=atol;
// externals
// 4. type given , scilab lhs ,jacobian not passed
y4=ode('stiff',y0,t0,t1(1),atol,rtol,f);
-if maxi(y4(:,1)-yref(:,1)) > 0.01 then pause,end
+if max(y4(:,1)-yref(:,1)) > 0.01 then pause,end
// 5. type non given, rhs and scilab jacobian
y5=ode(y0,t0,t1,f,j);
-if maxi(y5-yref) > Leps then pause,end
+if max(y5-yref) > Leps then pause,end
// 6. type given (stiff),rhs and jacobian by scilab
y6=ode('stiff',y0,t0,t1,0.00001,0.00001,f,j);
if (y6-yref) > 2*0.00001 then pause,end
a=rand(3,3);ea=expm(a);
deff('[ydot]=f(t,y)','ydot=a*y')
t1=1;y=ode('adams',eye(a),t0,t1,f);
-if maxi(ea-y) > Leps then pause,end
+if max(ea-y) > Leps then pause,end
//
// DAE's
// dy1/dt = -.04*y1 + 1.e4*y2*y3
<refnamediv>
<refname>max</refname>
-
<refpurpose>maximum</refpurpose>
</refnamediv>
-
+ <refnamediv xml:id="maxi">
+ <refname>maxi</refname>
+ <refpurpose>Obsolete alias of max</refpurpose>
+ </refnamediv>
<refsynopsisdiv>
<title>Calling Sequence</title>
<para><literal>[m,k]=max(list(A1,...,An))</literal> is an equivalent
syntax of <literal>[m,k]=max(A1,A2,...,An)</literal></para>
</refsection>
-
+ <refsection>
+ <title>Remark</title>
+ <para>The <literal>maxi</literal> function is an obsolete alias of <literal>max</literal>.</para>
+ </refsection>
<refsection>
<title>Examples</title>
<member><link linkend="find">find</link></member>
- <member><link linkend="mini">mini</link></member>
+ <member><link linkend="min">min</link></member>
</simplelist>
</refsection>
</refentry>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
- * Copyright (C) 2008 - INRIA
- *
- * This file must be used under the terms of the CeCILL.
- * This source file is licensed as described in the file COPYING, which
- * you should have received as part of this distribution. The terms
- * are also available at
- * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
- *
- -->
-<refentry version="5.0-subset Scilab" xml:id="maxi" xml:lang="en"
- xmlns="http://docbook.org/ns/docbook"
- xmlns:xlink="http://www.w3.org/1999/xlink"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns:ns5="http://www.w3.org/1999/xhtml"
- xmlns:mml="http://www.w3.org/1998/Math/MathML"
- xmlns:db="http://docbook.org/ns/docbook">
- <info>
- <pubdate>$LastChangedDate$</pubdate>
- </info>
-
- <refnamediv>
- <refname>maxi</refname>
-
- <refpurpose>maximum</refpurpose>
- </refnamediv>
-
- <refsynopsisdiv>
- <title>Calling Sequence</title>
-
- <synopsis>[m [,k]]=maxi(A)
-[m [,k]]=maxi(A,'c')
-[m [,k]]=maxi(A,'r')
-[m [,k]]=maxi(A,'m')
-[m [,k]]=maxi(A1,A2,...,An)
-[m [,k]]=maxi(list(A1,A2,...,An))</synopsis>
- </refsynopsisdiv>
-
- <refsection>
- <title>Parameters</title>
-
- <variablelist>
- <varlistentry>
- <term>A</term>
-
- <listitem>
- <para>real vector or matrix.</para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>A1,...,An</term>
-
- <listitem>
- <para>a set of real vectors or matrices, all of the same size or
- scalar.</para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsection>
-
- <refsection>
- <title>Description</title>
-
- <para>For <literal>A</literal>, a real vector or matrix,
- <literal>maxi(A)</literal> is the largest element <literal>A</literal>.
- <literal>[m,k]=maxi(A)</literal> gives in addition the index of the
- maximum. A second argument of type string <literal>'r'</literal> or
- <literal>'c'</literal> can be used : <literal>'r'</literal> is used to get
- a row vector <literal>m</literal> such that <literal>m(j)</literal>
- contains the maximum of the <literal>j</literal> th column of A
- (<literal>A(:,j)</literal>), <literal>k(j)</literal> gives the row indice
- which contain the maximum for column <literal>j</literal>.
- <literal>'c'</literal> is used for the dual operation on the rows of
- <literal>A</literal>. <literal>'m'</literal> is used for compatibility
- with Matlab.</para>
-
- <para><literal>m=maxi(A1,A2,...,An)</literal>, where all the
- <literal>Aj</literal> are matrices of the same sizes,returns a vector or a
- matrix <literal>m</literal> of size <literal>size(m)=size(A1)</literal>
- such that <literal>m(i)= maxi( Aj(i)), j=1,...,n</literal>.
- <literal>[m,k]=maxi(A1,A2,...,An)</literal> gives in addition the vector
- or matrix <literal>k</literal>. for a fixed <literal>i</literal>,
- <literal>k(i)</literal> is the number of the first
- <literal>Aj(i)</literal> achieving the maximum.</para>
-
- <para><literal>[m,k]=maxi(list(A1,...,An))</literal> is an equivalent
- syntax of <literal>[m,k]=maxi(A1,A2,...,An)</literal></para>
- </refsection>
-
- <refsection>
- <title>Examples</title>
-
- <programlisting role="example"><![CDATA[
-[m,n]=maxi([1,3,1])
-[m,n]=maxi([3,1,1],[1,3,1],[1,1,3])
-[m,n]=maxi([3,-2,1],1)
-[m,n]=maxi(list([3,1,1],[1,3,1],[1,1,3]))
-[m,n]=maxi(list(1,3,1))
- ]]></programlisting>
- </refsection>
-
- <refsection>
- <title>See Also</title>
-
- <simplelist type="inline">
- <member><link linkend="gsort">gsort</link></member>
-
- <member><link linkend="find">find</link></member>
-
- <member><link linkend="mini">mini</link></member>
- </simplelist>
- </refsection>
-</refentry>
<refpurpose>minimum</refpurpose>
</refnamediv>
+ <refnamediv xml:id="mini">
+ <refname>mini</refname>
+ <refpurpose>Obsolete alias of min</refpurpose>
+ </refnamediv>
<refsynopsisdiv>
<title>Calling Sequence</title>
<para><literal>[m,k]=min(list(A1,...,An))</literal> is an equivalent
syntax of <literal>[m,k]=min(A1,A2,...,An)</literal></para>
</refsection>
-
+ <refsection>
+ <title>Remark</title>
+ <para>The <literal>mini</literal> function is an obsolete alias of <literal>min</literal>.</para>
+ </refsection>
<refsection>
<title>Examples</title>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
- * Copyright (C) 2008 - INRIA
- *
- * This file must be used under the terms of the CeCILL.
- * This source file is licensed as described in the file COPYING, which
- * you should have received as part of this distribution. The terms
- * are also available at
- * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
- *
- -->
-<refentry version="5.0-subset Scilab" xml:id="mini" xml:lang="en"
- xmlns="http://docbook.org/ns/docbook"
- xmlns:xlink="http://www.w3.org/1999/xlink"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns:ns5="http://www.w3.org/1999/xhtml"
- xmlns:mml="http://www.w3.org/1998/Math/MathML"
- xmlns:db="http://docbook.org/ns/docbook">
- <info>
- <pubdate>$LastChangedDate$</pubdate>
- </info>
-
- <refnamediv>
- <refname>mini</refname>
-
- <refpurpose>minimum</refpurpose>
- </refnamediv>
-
- <refsynopsisdiv>
- <title>Calling Sequence</title>
-
- <synopsis>[m [,k]]=mini(A)
-[m [,k]]=mini(A,'c')
-[m [,k]]=mini(A,'r')
-[m [,k]]=mini(A,'m')
-[m [,k]]=mini(A1,A2,...,An)
-[m [,k]]=mini(list(A1,A2,...,An))</synopsis>
- </refsynopsisdiv>
-
- <refsection>
- <title>Parameters</title>
-
- <variablelist>
- <varlistentry>
- <term>A</term>
-
- <listitem>
- <para>real vector or matrix.</para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>A1,...,An</term>
-
- <listitem>
- <para>a set of real vectors or matrices, all of the same size or
- scalar.</para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsection>
-
- <refsection>
- <title>Description</title>
-
- <para>For <literal>A</literal>, a real vector or matrix,
- <literal>mini(A)</literal> is the largest element <literal>A</literal>.
- <literal>[m,k]=mini(A)</literal> gives in addition the index of the
- minimum. A second argument of type string <literal>'r'</literal> or
- <literal>'c'</literal> can be used : <literal>'r'</literal> is used to get
- a row vector <literal>m</literal> such that <literal>m(j)</literal>
- contains the minimum of the <literal>j</literal> th column of A
- (<literal>A(:,j)</literal>), <literal>k(j)</literal> gives the row indice
- which contain the minimum for column <literal>j</literal>.
- <literal>'c'</literal> is used for the dual operation on the rows of
- <literal>A</literal>. <literal>'m'</literal> is used for compatibility
- with Matlab.</para>
-
- <para><literal>m=mini(A1,A2,...,An)</literal>, where all the
- <literal>Aj</literal> are matrices of the same sizes,returns a vector or a
- matrix <literal>m</literal> of size <literal>size(m)=size(A1)</literal>
- such that <literal>m(i)= mini( Aj(i)), j=1,...,n</literal>.
- <literal>[m,k]=mini(A1,A2,...,An)</literal> gives in addition the vector
- or matrix <literal>k</literal>. for a fixed <literal>i</literal>,
- <literal>k(i)</literal> is the number of the first
- <literal>Aj(i)</literal> achieving the minimum.</para>
-
- <para><literal>[m,k]=mini(list(A1,...,An))</literal> is an equivalent
- syntax of <literal>[m,k]=mini(A1,A2,...,An)</literal></para>
- </refsection>
-
- <refsection>
- <title>Examples</title>
-
- <programlisting role="example"><![CDATA[
-[m,n]=mini([1,3,1])
-[m,n]=mini([3,1,1],[1,3,1],[1,1,3])
-[m,n]=mini([3,-2,1],1)
-[m,n]=mini(list([3,1,1],[1,3,1],[1,1,3]))
-[m,n]=mini(list(1,3,1))
- ]]></programlisting>
- </refsection>
-
- <refsection>
- <title>See Also</title>
-
- <simplelist type="inline">
- <member><link linkend="gsort">gsort</link></member>
-
- <member><link linkend="find">find</link></member>
-
- <member><link linkend="min">min</link></member>
- </simplelist>
- </refsection>
-</refentry>
<listitem>
<para>The l_1 norm <literal>x</literal> (the largest column sum :
- <literal>maxi(sum(abs(x),'r'))</literal> ).</para>
+ <literal>max(sum(abs(x),'r'))</literal> ).</para>
</listitem>
</varlistentry>
<listitem>
<para>The infinity norm of <literal>x</literal> (the largest row sum
- : <literal>maxi(sum(abs(x),'c'))</literal> ).</para>
+ : <literal>max(sum(abs(x),'c'))</literal> ).</para>
</listitem>
</varlistentry>
<refnamediv>
<refname>max</refname>
-
<refpurpose>maximum</refpurpose>
</refnamediv>
-
+ <refnamediv xml:id="maxi">
+ <refname>maxi</refname>
+ <refpurpose>Equivalent obsolete de la fonction max</refpurpose>
+ </refnamediv>
+
<refsynopsisdiv>
<title>Séquence d'appel</title>
<para><literal>[m,k]=max(list(A1,...,An))</literal> est une syntaxe
équivalente de <literal>[m,k]=max(A1,A2,...,An)</literal></para>
</refsection>
+ <refsection>
+ <title>Remarque</title>
+ <para>La fonction <literal>maxi</literal> est un equivalent
+ obsolete de la fonction <literal>max</literal>.</para>
+ </refsection>
<refsection>
<title>Exemples</title>
</simplelist>
</refsection>
</refentry>
+
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<refentry version="5.0-subset Scilab" xml:id="maxi" xml:lang="fr"
- xmlns="http://docbook.org/ns/docbook"
- xmlns:xlink="http://www.w3.org/1999/xlink"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns:ns5="http://www.w3.org/1999/xhtml"
- xmlns:mml="http://www.w3.org/1998/Math/MathML"
- xmlns:db="http://docbook.org/ns/docbook">
- <info>
- <pubdate>$LastChangedDate$</pubdate>
- </info>
-
- <refnamediv>
- <refname>maxi</refname>
-
- <refpurpose>maximum</refpurpose>
- </refnamediv>
-
- <refsynopsisdiv>
- <title>Séquence d'appel</title>
-
- <synopsis>[m [,k]]=maxi(A)
-[m [,k]]=maxi(A,'c')
-[m [,k]]=maxi(A,'r')
-[m [,k]]=maxi(A,'m')
-[m [,k]]=maxi(A1,A2,...,An)
-[m [,k]]=maxi(list(A1,A2,...,An))</synopsis>
- </refsynopsisdiv>
-
- <refsection>
- <title>Paramètres</title>
-
- <variablelist>
- <varlistentry>
- <term>A</term>
-
- <listitem>
- <para>vecteur ou matrice réelle.</para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>A1,...,An</term>
-
- <listitem>
- <para>un ensemble de vecteurs ou de matrices toutes de même
- taille.</para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsection>
-
- <refsection>
- <title>Description</title>
-
- <para>Pour <literal>A</literal>, un vecteur ou une matrice réelle,
- <literal>maxi(A)</literal> est son plus grand élément.
- <literal>[m,k]=maxi(A)</literal> donne la position du maximum dans
- <literal>A</literal>. Le deuxième argument peut être la chaîne de
- caractère <literal>'r'</literal> ou <literal>'c'</literal> :
- <literal>'r'</literal> permet d'obtenir un vecteur ligne
- <literal>m</literal> tel que <literal>m(j)</literal> contient le maximum
- de la<literal>j</literal>-ième colonne de A (<literal>A(:,j)</literal>),
- <literal>k(j)</literal> donne le numéro de la ligne qui contient le
- maximum pour la colonne <literal>j</literal>. <literal>'c'</literal> est
- utilisé pour l'opération duale sur les lignes de <literal>A</literal>.
- <literal>'m'</literal> est utilisé pour la compatibilité avec
- Mtalab.</para>
-
- <para><literal>m=maxi(A1,A2,...,An)</literal>, où tous les
- <literal>Aj</literal> sont des matrices de même taille, renvoie un vecteur
- ou une matrice <literal>m</literal> de taille
- <literal>size(m)=size(A1)</literal> telle que <literal>m(i)= maxi( Aj(i)),
- j=1,...,n</literal>. <literal>[m,k]=maxi(A1,A2,...,An)</literal> donne de
- plus le vecteur ou la matrice <literal>k</literal>. Pour un
- <literal>i</literal> donné, <literal>k(i)</literal> est le numéro de la
- première <literal>Aj(i)</literal> réalisant le maximum.</para>
-
- <para><literal>[m,k]=maxi(list(A1,...,An))</literal> est une syntaxe
- équivalente de <literal>[m,k]=maxi(A1,A2,...,An)</literal></para>
- </refsection>
-
- <refsection>
- <title>Exemples</title>
-
- <programlisting role="example"><![CDATA[
-[m,n]=maxi([1,3,1])
-[m,n]=maxi([3,1,1],[1,3,1],[1,1,3])
-[m,n]=maxi([3,-2,1],1)
-[m,n]=maxi(list([3,1,1],[1,3,1],[1,1,3]))
-[m,n]=maxi(list(1,3,1))
- ]]></programlisting>
- </refsection>
-
- <refsection>
- <title>Voir Aussi</title>
-
- <simplelist type="inline">
- <member><link linkend="gsort">gsort</link></member>
-
- <member><link linkend="find">find</link></member>
-
- <member><link linkend="max">max</link></member>
- </simplelist>
- </refsection>
-</refentry>
<refnamediv>
<refname>min</refname>
-
<refpurpose>minimum</refpurpose>
</refnamediv>
+ <refnamediv xml:id="mini">
+ <refname>mini</refname>
+ <refpurpose>Equivalent obsolete de la fonction min</refpurpose>
+ </refnamediv>
<refsynopsisdiv>
<title>Séquence d'appel</title>
<para><literal>[m,k]=min(list(A1,...,An))</literal> est une syntaxe
équivalente de <literal>[m,k]=min(A1,A2,...,An)</literal></para>
</refsection>
+ <refsection>
+ <title>Remarque</title>
+ <para>La fonction <literal>mini</literal> est un equivalent
+ obsolete de la fonction <literal>min</literal>.</para>
+ </refsection>
<refsection>
<title>Exemples</title>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<refentry version="5.0-subset Scilab" xml:id="mini" xml:lang="fr"
- xmlns="http://docbook.org/ns/docbook"
- xmlns:xlink="http://www.w3.org/1999/xlink"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns:ns5="http://www.w3.org/1999/xhtml"
- xmlns:mml="http://www.w3.org/1998/Math/MathML"
- xmlns:db="http://docbook.org/ns/docbook">
- <info>
- <pubdate>$LastChangedDate$</pubdate>
- </info>
-
- <refnamediv>
- <refname>mini</refname>
-
- <refpurpose>minimum</refpurpose>
- </refnamediv>
-
- <refsynopsisdiv>
- <title>Séquence d'appel</title>
-
- <synopsis>[m [,k]]=mini(A)
-[m [,k]]=mini(A,'c')
-[m [,k]]=mini(A,'r')
-[m [,k]]=mini(A,'m')
-[m [,k]]=mini(A1,A2,...,An)
-[m [,k]]=mini(list(A1,A2,...,An))</synopsis>
- </refsynopsisdiv>
-
- <refsection>
- <title>Paramètres</title>
-
- <variablelist>
- <varlistentry>
- <term>A</term>
-
- <listitem>
- <para>vecteur ou matrice réelle.</para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>A1,...,An</term>
-
- <listitem>
- <para>un ensemble de vecteurs ou de matrices toutes de même
- taille.</para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsection>
-
- <refsection>
- <title>Description</title>
-
- <para>Pour <literal>A</literal>, un vecteur ou une matrice réelle,
- <literal>mini(A)</literal> est son plus grand élément.
- <literal>[m,k]=mini(A)</literal> donne la position du minimum dans
- <literal>A</literal>. Le deuxième argument peut être la chaîne de
- caractère <literal>'r'</literal> ou <literal>'c'</literal> :
- <literal>'r'</literal> permet d'obtenir un vecteur ligne
- <literal>m</literal> tel que <literal>m(j)</literal> contient le minimum
- de la<literal>j</literal>-ième colonne de A (<literal>A(:,j)</literal>),
- <literal>k(j)</literal> donne le numéro de la ligne qui contient le
- minimum pour la colonne <literal>j</literal>. <literal>'c'</literal> est
- utilisé pour l'opération duale sur les lignes de <literal>A</literal>.
- <literal>'m'</literal> est utilisé pour la compatibilité avec
- Matlab.</para>
-
- <para><literal>m=mini(A1,A2,...,An)</literal>, où tous les
- <literal>Aj</literal> sont des matrices de même taille, renvoie un vecteur
- ou une matrice <literal>m</literal> de taille
- <literal>size(m)=size(A1)</literal> telle que <literal>m(i)= mini( Aj(i)),
- j=1,...,n</literal>. <literal>[m,k]=mini(A1,A2,...,An)</literal> donne de
- plus le vecteur ou la matrice <literal>k</literal>. Pour un
- <literal>i</literal> donné, <literal>k(i)</literal> est le numéro de la
- première <literal>Aj(i)</literal> réalisant le minimum.</para>
-
- <para><literal>[m,k]=mini(list(A1,...,An))</literal> est une syntaxe
- équivalente de <literal>[m,k]=mini(A1,A2,...,An)</literal></para>
- </refsection>
-
- <refsection>
- <title>Exemples</title>
-
- <programlisting role="example"><![CDATA[
-[m,n]=mini([1,3,1])
-[m,n]=mini([3,1,1],[1,3,1],[1,1,3])
-[m,n]=mini([3,-2,1],1)
-[m,n]=mini(list([3,1,1],[1,3,1],[1,1,3]))
-[m,n]=mini(list(1,3,1))
- ]]></programlisting>
- </refsection>
-
- <refsection>
- <title>Voir Aussi</title>
-
- <simplelist type="inline">
- <member><link linkend="gsort">gsort</link></member>
-
- <member><link linkend="find">find</link></member>
-
- <member><link linkend="max">max</link></member>
- </simplelist>
- </refsection>
-</refentry>
<listitem>
<para>la norme l_1 de <literal>x</literal> (la plus grande somme
- suivant les colonnes : <literal>maxi(sum(abs(x),'r'))</literal>
+ suivant les colonnes : <literal>max(sum(abs(x),'r'))</literal>
).</para>
</listitem>
</varlistentry>
<listitem>
<para>la norme infinie de <literal>x</literal> (la plus grande somme
- suivant les lignes : <literal>maxi(sum(abs(x),'c'))</literal>
+ suivant les lignes : <literal>max(sum(abs(x),'c'))</literal>
).</para>
</listitem>
</varlistentry>
+++ /dev/null
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--
- * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
- * Copyright (C) 2008 - INRIA
- *
- * This file must be used under the terms of the CeCILL.
- * This source file is licensed as described in the file COPYING, which
- * you should have received as part of this distribution. The terms
- * are also available at
- * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
- *
- -->
-<refentry version="5.0-subset Scilab" xml:id="maxi" xml:lang="en"
- xmlns="http://docbook.org/ns/docbook"
- xmlns:xlink="http://www.w3.org/1999/xlink"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns:ns3="http://www.w3.org/1999/xhtml"
- xmlns:mml="http://www.w3.org/1998/Math/MathML"
- xmlns:db="http://docbook.org/ns/docbook">
- <info>
- <pubdate>$LastChangedDate$</pubdate>
- </info>
-
- <refnamediv>
- <refname>maxi</refname>
-
- <refpurpose>máximo</refpurpose>
- </refnamediv>
-
- <refsynopsisdiv>
- <title>Seqüência de Chamamento</title>
-
- <synopsis>[m [,k]]=maxi(A)
-[m [,k]]=maxi(A,'c')
-[m [,k]]=maxi(A,'r')
-[m [,k]]=maxi(A,'m')
-[m [,k]]=maxi(A1,A2,...,An)
-[m [,k]]=maxi(list(A1,A2,...,An))</synopsis>
- </refsynopsisdiv>
-
- <refsection>
- <title>Parâmetros</title>
-
- <variablelist>
- <varlistentry>
- <term>A</term>
-
- <listitem>
- <para>vetor ou matriz de reais</para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>A1,...,An</term>
-
- <listitem>
- <para>um conjunto de vetores ou matrizes, todos de tamanhos iguais,
- ou de escalares</para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsection>
-
- <refsection>
- <title>Descrição</title>
-
- <para>Para <literal>A</literal>, um vetor ou matriz de reais,
- <literal>maxi(A)</literal> é o maior elemento de <literal>A</literal>.
- <literal>[m,k]=maxi(A)</literal> fornece, ainda, o Ãndice do máximo. Um
- segundo argumento do tipo string <literal>'r'</literal> ou
- <literal>'c'</literal> pode ser usado : <literal>'r'</literal> é usado
- para obter um vetor-linha <literal>m</literal> tal que
- <literal>m(j)</literal> contém o méximo da <literal>j</literal> -ésima
- coluna de A (<literal>A(:,j)</literal>), <literal>k(j)</literal> fornece o
- Ãndice de linha que contém o máximo para a coluna <literal>j</literal>.
- <literal>'c'</literal> é usado para a operação dual de linhas de
- <literal>A</literal>. <literal>'m'</literal> é usado para compatibilidade
- com Matlab.</para>
-
- <para><literal>m=maxi(A1,A2,...,An)</literal>, onde todos os
- <literal>Aj</literal> são matrizes de mesmo tamanho, retorna um vetor ou
- matriz <literal>m</literal> de tamanho <literal>size(m)=size(A1)</literal>
- tal que <literal>m(i)= maxi( Aj(i)), j=1,...,n</literal>.
- <literal>[m,k]=maxi(A1,A2,...,An)</literal> fornece, ainda, o vetor ou
- matriz <literal>k</literal>. Fixado <literal>i</literal>,
- <literal>k(i)</literal> é o número do primeiro Aj(i) a alcançar o
- máximo.</para>
-
- <para><literal>[m,k]=maxi(list(A1,...,An))</literal> é uma outra sintaxe
- para <literal>[m,k]=maxi(A1,A2,...,An)</literal></para>
- </refsection>
-
- <refsection>
- <title>Exemplos</title>
-
- <programlisting role="example"><![CDATA[
-[m,n]=maxi([1,3,1])
-[m,n]=maxi([3,1,1],[1,3,1],[1,1,3])
-[m,n]=maxi([3,-2,1],1)
-[m,n]=maxi(list([3,1,1],[1,3,1],[1,1,3]))
-[m,n]=maxi(list(1,3,1))
- ]]></programlisting>
- </refsection>
-
- <refsection>
- <title>Ver Também</title>
-
- <simplelist type="inline">
- <member><link linkend="gsort">gsort</link></member>
-
- <member><link linkend="find">find</link></member>
-
- <member><link linkend="mini">mini</link></member>
- </simplelist>
- </refsection>
-</refentry>
+++ /dev/null
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--
- * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
- * Copyright (C) 2008 - INRIA
- *
- * This file must be used under the terms of the CeCILL.
- * This source file is licensed as described in the file COPYING, which
- * you should have received as part of this distribution. The terms
- * are also available at
- * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
- *
- -->
-<refentry version="5.0-subset Scilab" xml:id="mini" xml:lang="en"
- xmlns="http://docbook.org/ns/docbook"
- xmlns:xlink="http://www.w3.org/1999/xlink"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns:ns3="http://www.w3.org/1999/xhtml"
- xmlns:mml="http://www.w3.org/1998/Math/MathML"
- xmlns:db="http://docbook.org/ns/docbook">
- <info>
- <pubdate>$LastChangedDate$</pubdate>
- </info>
-
- <refnamediv>
- <refname>mini</refname>
-
- <refpurpose>mÃnimo</refpurpose>
- </refnamediv>
-
- <refsynopsisdiv>
- <title>Seqüência de Chamamento</title>
-
- <synopsis>[m [,k]]=mini(A)
-[m [,k]]=mini(A,'c')
-[m [,k]]=mini(A,'r')
-[m [,k]]=mini(A,'m')
-[m [,k]]=mini(A1,A2,...,An)
-[m [,k]]=mini(list(A1,A2,...,An))</synopsis>
- </refsynopsisdiv>
-
- <refsection>
- <title>Parâmetros</title>
-
- <variablelist>
- <varlistentry>
- <term>A</term>
-
- <listitem>
- <para>vetor ou matriz de reais</para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>A1,...,An</term>
-
- <listitem>
- <para>um conjunto de vetores ou matrizes, todos de tamanhos iguais,
- ou de escalares</para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsection>
-
- <refsection>
- <title>Descrição</title>
-
- <para>Para <literal>A</literal>, um vetor ou matriz de reais,
- <literal>mini(A)</literal> é o menor elemento de <literal>A</literal>.
- <literal>[m,k]=mini(A)</literal> fornece, ainda, o Ãndice do mÃnimo. Um
- segundo argumento do tipo string <literal>'r'</literal> ou
- <literal>'c'</literal> pode ser usado : <literal>'r'</literal> é usado
- para obter um vetor linha <literal>m</literal> tal que
- <literal>m(j)</literal> contém o mÃnimo da <literal>j</literal> -ésima
- coluna de A (<literal>A(:,j)</literal>), <literal>k(j)</literal> fornece o
- Ãndice de linha que contém o mÃnimo para a coluna <literal>j</literal>.
- <literal>'c'</literal> é usado para a operação dual de linhas de
- <literal>A</literal>. <literal>'m'</literal> é usado para compatibilidade
- com Matlab.</para>
-
- <para><literal>m=mini(A1,A2,...,An)</literal>, onde todos os
- <literal>Aj</literal> são matrizes de mesmo tamanho, retorna um vetor ou
- matriz <literal>m</literal> de tamanho <literal>size(m)=size(A1)</literal>
- tal que <literal>m(i)= mini( Aj(i)), j=1,...,n</literal>.
- <literal>[m,k]=mini(A1,A2,...,An)</literal> fornece, ainda, o vetor ou
- matriz <literal>k</literal>. Fixado um <literal>i</literal>,
- <literal>k(i)</literal> é o número do primeiro <literal>Aj(i)</literal> a
- alcançar o mÃnimo.</para>
-
- <para><literal>[m,k]=mini(list(A1,...,An))</literal> é uma outra sintaxe
- para <literal>[m,k]=mini(A1,A2,...,An)</literal></para>
- </refsection>
-
- <refsection>
- <title>Exemplos</title>
-
- <programlisting role="example"><![CDATA[
-[m,n]=mini([1,3,1])
-[m,n]=mini([3,1,1],[1,3,1],[1,1,3])
-[m,n]=mini([3,-2,1],1)
-[m,n]=mini(list([3,1,1],[1,3,1],[1,1,3]))
-[m,n]=mini(list(1,3,1))
- ]]></programlisting>
- </refsection>
-
- <refsection>
- <title>Ver Também</title>
-
- <simplelist type="inline">
- <member><link linkend="gsort">gsort</link></member>
-
- <member><link linkend="find">find</link></member>
-
- <member><link linkend="min">min</link></member>
- </simplelist>
- </refsection>
-</refentry>
<listitem>
<para>a norma l_1 de <literal>x</literal> (a maior soma coluna a
- coluna : <literal>maxi(sum(abs(x),'r'))</literal> ).</para>
+ coluna : <literal>max(sum(abs(x),'r'))</literal> ).</para>
</listitem>
</varlistentry>
<listitem>
<para>a norma infinitesimal de <literal>x</literal> (a maior soma
- linha a linha : <literal>maxi(sum(abs(x),'c'))</literal> ).</para>
+ linha a linha : <literal>max(sum(abs(x),'c'))</literal> ).</para>
</listitem>
</varlistentry>
elseif type(ik)==4 then // boolean subscript
ik=find(ik)
Newdims(k,1)=max(max(ik),dims(k))
- elseif mini(size(ik))<0 then // :
+ elseif min(size(ik))<0 then // :
if dims(k)<>0 then
ik=1:dims(k)
else
a=a+0*%i; //Set complex
rmax=max(norm(a,1),1/sqrt(%eps))
[s,u,bs]=bdiag(a,rmax);
- if maxi(bs)>1 then
+ if max(bs)>1 then
error(msprintf(gettext("%s: Unable to diagonalize.\n"),"logm"));
return
end
[lhs,rhs]=argn(0)
if rhs==1 then [m,n]=size(m),end
-mn=mini(m,n)
+mn=min(m,n)
sp=sparse([(1:mn)' (1:mn)'],ones(mn,1),[m,n])
endfunction
if part(typ,1)<>'u'&part(typ,1)<>'n' then
error(msprintf(gettext("%s: Wrong value for input argument #%d: ''%s'' or ''%s'' expected.\n"),"sprand",4,"uniform","normal"));
end
- density=maxi(mini(density,1),0);
+ density=max(min(density,1),0);
nel=m*n*density; //the objective number of non zero elements
if nel==0 then a=sparse([],[],[m,n]);return,end
[lhs,rhs]=argn(0)
if rhs==1 then [m,n]=size(m),end
-mn=mini(m,n)
+mn=min(m,n)
sp=sparse([],[],[m,n])
endfunction
if r(1)<>c(1) then
error(msprintf(gettext("%s: Wrong values for input arguments #%d and #%d: c(1) must be equal to r(1).\n"),"toeplitz",1,2));
end
-a(nc,nr)=r(1);k=mini([nr,nc]);
+a(nc,nr)=r(1);k=min([nr,nc]);
for l=1:k,a(l,l:nr)=r(1:nr-l+1),a(l:nc,l)=c(1:nc-l+1),end
endfunction
{sci_eye, "eye"},
{sci_rand, "rand"},
{sci_ones, "ones"},
- {sci_maxi, "maxi"},
- {sci_maxi, "mini"},
+ {sci_maxi, "max"},
+ {sci_maxi, "min"},
{sci_kron, "kron"},
{sci_kron, "kron"},
{sci_kron, "kron"},
{sci_spones, "spones"},
{sci_gsort, "gsort"},
{sci_isequalbitwise, "isequalbitwise"},
- {sci_rat, "rat"}
+ {sci_rat, "rat"},
+ {sci_maxi, "maxi"},
+ {sci_maxi, "mini"}
};
/*--------------------------------------------------------------------------*/
int gw_elementary_functions(void)
*
*/
/*--------------------------------------------------------------------------*/
+#include <string.h>
#include "gw_elementary_functions.h"
+#include "warningmode.h"
+#include "localization.h"
+#include "sciprint.h"
/*--------------------------------------------------------------------------*/
extern int C2F(intmaxi)(char *fname,int *id,unsigned long fname_len);
/*--------------------------------------------------------------------------*/
-int sci_maxi(char *fname,unsigned long fname_len)
+int sci_maxi(char *fname, unsigned long fname_len)
{
static int id[6];
- C2F(intmaxi)(fname,id,fname_len);
+
+ if ((strcmp(fname, "maxi") == 0) | (strcmp(fname, "mini") == 0))
+ {
+ if (getWarningMode())
+ {
+ sciprint(_("Warning: "));
+ sciprint(_("Function %s is obsolete."), fname);
+ sciprint("\n");
+ sciprint(_("Warning: "));
+ if (strcmp(fname, "maxi") == 0)
+ {
+ sciprint(_("Please use %s instead."), "max");
+ }
+ else
+ {
+ sciprint(_("Please use %s instead."), "min");
+ }
+ sciprint("\n");
+ sciprint(_("Warning: "));
+ sciprint(_("This function will be permanently removed in Scilab %s"), "5.3.1");
+ sciprint("\n");
+ }
+ }
+
+ C2F(intmaxi)(fname, id, fname_len);
return 0;
}
/*--------------------------------------------------------------------------*/
<PRIMITIVE gatewayId="6" primitiveId="14" primitiveName="rand" />
<PRIMITIVE gatewayId="6" primitiveId="15" primitiveName="ones" />
<PRIMITIVE gatewayId="6" primitiveId="16" primitiveName="max" />
-<PRIMITIVE gatewayId="6" primitiveId="16" primitiveName="maxi" />
<PRIMITIVE gatewayId="6" primitiveId="17" primitiveName="min" />
-<PRIMITIVE gatewayId="6" primitiveId="17" primitiveName="mini" />
<PRIMITIVE gatewayId="6" primitiveId="18" primitiveName="kron" />
<PRIMITIVE gatewayId="6" primitiveId="21" primitiveName="matrix" />
<PRIMITIVE gatewayId="6" primitiveId="22" primitiveName="sin" />
<PRIMITIVE gatewayId="6" primitiveId="50" primitiveName="gsort" />
<PRIMITIVE gatewayId="6" primitiveId="51" primitiveName="isequalbitwise" />
<PRIMITIVE gatewayId="6" primitiveId="52" primitiveName="rat" />
+<PRIMITIVE gatewayId="6" primitiveId="53" primitiveName="maxi" />
+<PRIMITIVE gatewayId="6" primitiveId="54" primitiveName="mini" />
</GATEWAY>
c This source file is licensed as described in the file COPYING, which
c you should have received as part of this distribution. The terms
c are also available at
-c http://www.cecill.info/licences/Licence_CeCILL_V2-en.txtc -------------------------------
+c http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+c -------------------------------
c
subroutine intmaxi(fname,id)
c -------------------------------
il=iadr(lstk(top))
if(istk(il).lt.0) il=iadr(istk(il+1))
- if(fin.eq.17) then
+ if ((fin.eq.17).or.(fin.eq.54)) then
call funnam(ids(1,pt+1),'mini',il)
else
call funnam(ids(1,pt+1),'maxi',il)
endif
if(gettype(top).ne.1) then
top=topk
- if(fin.eq.17) then
+ if((fin.eq.17) .or. (fin.eq.54)) then
call funnam(ids(1,pt+1),'mini',iadr(lstk(top-rhs+1)))
else
call funnam(ids(1,pt+1),'maxi',iadr(lstk(top-rhs+1)))
c ------------max of each column of a
if (.not.cremat(fname,topk,0,1,n,lr,lir)) return
if (.not.cremat(fname,topk+1,0,1,n,lkr,lkir)) return
- if(fin.eq.17) then
+ if ((fin.eq.17) .or. (fin.eq.54)) then
c . min
do 15 j=0,n-1
k=idmin(m,stk(lr1+m*j),1)
x1=stk(lr1)
k=1
- if(fin.eq.17) then
+ if ((fin.eq.17) .or. (fin.eq.54)) then
c . mini
k=idmin(m*n,stk(lr1),1)
else
else
inc=1
endif
- if ( fin.eq.17) then
+ if ((fin.eq.17) .or. (fin.eq.54)) then
c mini
do 111 j=0,m*n-1
if (stk(lri).lt.stk(lv+j).or.isanan(stk(lri)).eq.1) then
endif
if(.not.checkval(fname,m,mi)) return
if(.not.checkval(fname,n,ni)) return
- if ( fin.eq.17) then
+ if ((fin.eq.17) .or. (fin.eq.54)) then
c mini
do 211 j=0,m*n-1
x1=stk(lri+j)
vartype_
GetData
Ptover
+getWarningMode
Ntest =
1.
-// test maxi(A) : A matrix
+// test max(A) : A matrix
// maxi is compared with gsort
for i=1:Ntest,
m=100;n=200;a=rand(m,n);
- [am,ak]=maxi(a); [a1,ak1]=gsort(a);
+ [am,ak]=max(a); [a1,ak1]=gsort(a);
if norm([am-a1(1,1),(ak(1)+(m)*(ak(2)-1))-ak1(1,1)])> %eps then bugmes();quit;end
end
-// test maxi(A) : A vector
+// test max(A) : A vector
for i=1:Ntest,
m=100;a=rand(1,m);
- [am,ak]=maxi(a); [a1,ak1]=gsort(a);
+ [am,ak]=max(a); [a1,ak1]=gsort(a);
if norm([am-a1(1,1),(ak-ak1(1,1))])> %eps then bugmes();quit;end
end
// test mini
for i=1:Ntest,
m=100;n=200;a=rand(m,n);
- [am,ak]=maxi(-a); [ami,aki]=mini(a);
+ [am,ak]=max(-a); [ami,aki]=min(a);
if norm([am+ami,ak-aki])> %eps then bugmes();quit;end
end
for i=1:Ntest,
m=100;a=rand(1,m);
- [am,ak]=maxi(-a); [ami,aki]=mini(a);
+ [am,ak]=max(-a); [ami,aki]=min(a);
if norm([am+ami,ak-aki])> %eps then bugmes();quit;end
end
-// test maxi(A1,A....) compared with usual maxi + feval
+// test max(A1,A....) compared with usual maxi + feval
m=10,n=20;
m =
A2=rand(m,n);
A3=rand(m,n);
A4=rand(m,n);
-deff('[y]=f(i,j)','[y,k]=maxi([A1(i,j),A2(i,j),A3(i,j),A4(i,j)]);y=y+%i*k');
+deff('[y]=f(i,j)','[y,k]=max([A1(i,j),A2(i,j),A3(i,j),A4(i,j)]);y=y+%i*k');
A=feval(1:m,1:n,f);
Am=real(A);Ak=imag(A);
-[Am1,Ak1]=maxi(A1,A2,A3,A4);
+[Am1,Ak1]=max(A1,A2,A3,A4);
if norm(Am1-Am)> %eps then bugmes();quit;end
if norm(Ak1-Ak)> %eps then bugmes();quit;end
-// test maxi(list(A1,A2,..)) compared to maxi(A1,..)
-[Al,Akl]=maxi(list(A1,A2,A3,A4));
+// test max(list(A1,A2,..)) compared to max(A1,..)
+[Al,Akl]=max(list(A1,A2,A3,A4));
if norm(Al-Am)> %eps then bugmes();quit;end
if norm(Akl-Ak)> %eps then bugmes();quit;end
-// test maxi(A,'c') and maxi(A,'r')
-// maxi(A,'r') returns a row vector which contains max for each column
-[Am,Akm]=maxi(A1,'r');
+// test max(A,'c') and max(A,'r')
+// max(A,'r') returns a row vector which contains max for each column
+[Am,Akm]=max(A1,'r');
nc=size(A1,'c')
nc =
Ak1 =
[]
-for i=1:nc,[am,ak]=maxi(A1(:,i)); Am1=[Am1,am];Ak1=[Ak1,ak];end
+for i=1:nc,[am,ak]=max(A1(:,i)); Am1=[Am1,am];Ak1=[Ak1,ak];end
if norm(Am-Am1)> %eps then bugmes();quit;end
if norm(Akm-Ak1)> %eps then bugmes();quit;end
-// maxi(A,'c');
-[Am,Akm]=maxi(A1,'c');
+// max(A,'c');
+[Am,Akm]=max(A1,'c');
nc=size(A1,'r')
nc =
Ak1 =
[]
-for i=1:nc,[am,ak]=maxi(A1(i,:)); Am1=[Am1;am];Ak1=[Ak1;ak];end
+for i=1:nc,[am,ak]=max(A1(i,:)); Am1=[Am1;am];Ak1=[Ak1;ak];end
if norm(Am-Am1)> %eps then bugmes();quit;end
if norm(Akm-Ak1)> %eps then bugmes();quit;end
// <-- JVM NOT MANDATORY -->
Ntest=1
-// test maxi(A) : A matrix
+// test max(A) : A matrix
// maxi is compared with sort
for i=1:Ntest,
m=100;n=200;a=rand(m,n);
- [am,ak]=maxi(a); [a1,ak1]=gsort(a);
+ [am,ak]=max(a); [a1,ak1]=gsort(a);
if norm([am-a1(1,1),(ak(1)+(m)*(ak(2)-1))-ak1(1,1)])> %eps then pause,end
end
-// test maxi(A) : A vector
+// test max(A) : A vector
for i=1:Ntest,
m=100;a=rand(1,m);
- [am,ak]=maxi(a); [a1,ak1]=gsort(a);
+ [am,ak]=max(a); [a1,ak1]=gsort(a);
if norm([am-a1(1,1),(ak-ak1(1,1))])> %eps then pause,end
end
for i=1:Ntest,
m=100;n=200;a=rand(m,n);
- [am,ak]=maxi(-a); [ami,aki]=mini(a);
+ [am,ak]=max(-a); [ami,aki]=min(a);
if norm([am+ami,ak-aki])> %eps then pause,end
end
for i=1:Ntest,
m=100;a=rand(1,m);
- [am,ak]=maxi(-a); [ami,aki]=mini(a);
+ [am,ak]=max(-a); [ami,aki]=min(a);
if norm([am+ami,ak-aki])> %eps then pause,end
end
-// test maxi(A1,A....) compared with usual maxi + feval
+// test max(A1,A....) compared with usual maxi + feval
m=10,n=20;
A1=rand(m,n);
A2=rand(m,n);
A3=rand(m,n);
A4=rand(m,n);
-deff('[y]=f(i,j)','[y,k]=maxi([A1(i,j),A2(i,j),A3(i,j),A4(i,j)]);y=y+%i*k');
+deff('[y]=f(i,j)','[y,k]=max([A1(i,j),A2(i,j),A3(i,j),A4(i,j)]);y=y+%i*k');
A=feval(1:m,1:n,f);
Am=real(A);Ak=imag(A);
-[Am1,Ak1]=maxi(A1,A2,A3,A4);
+[Am1,Ak1]=max(A1,A2,A3,A4);
if norm(Am1-Am)> %eps then pause,end
if norm(Ak1-Ak)> %eps then pause,end
-// test maxi(list(A1,A2,..)) compared to maxi(A1,..)
+// test max(list(A1,A2,..)) compared to max(A1,..)
-[Al,Akl]=maxi(list(A1,A2,A3,A4));
+[Al,Akl]=max(list(A1,A2,A3,A4));
if norm(Al-Am)> %eps then pause,end
if norm(Akl-Ak)> %eps then pause,end
-// test maxi(A,'c') and maxi(A,'r')
-// maxi(A,'r') returns a row vector which contains max for each column
+// test max(A,'c') and max(A,'r')
+// max(A,'r') returns a row vector which contains max for each column
-[Am,Akm]=maxi(A1,'r');
+[Am,Akm]=max(A1,'r');
nc=size(A1,'c')
Am1=[];Ak1=[]
-for i=1:nc,[am,ak]=maxi(A1(:,i)); Am1=[Am1,am];Ak1=[Ak1,ak];end
+for i=1:nc,[am,ak]=max(A1(:,i)); Am1=[Am1,am];Ak1=[Ak1,ak];end
if norm(Am-Am1)> %eps then pause,end
if norm(Akm-Ak1)> %eps then pause,end
-// maxi(A,'c');
+// max(A,'c');
-[Am,Akm]=maxi(A1,'c');
+[Am,Akm]=max(A1,'c');
nc=size(A1,'r')
Am1=[];Ak1=[]
-for i=1:nc,[am,ak]=maxi(A1(i,:)); Am1=[Am1;am];Ak1=[Ak1;ak];end
+for i=1:nc,[am,ak]=max(A1(i,:)); Am1=[Am1;am];Ak1=[Ak1;ak];end
if norm(Am-Am1)> %eps then pause,end
if norm(Akm-Ak1)> %eps then pause,end
des = [1 0];
wate = [1 1];
h = eqfir(nf,bedge,des,wate);
- h1 = [h 0*ones(1:maxi(size(x))-1)];
- x1 = [x 0*ones(1:maxi(size(h))-1)];
+ h1 = [h 0*ones(1:max(size(x))-1)];
+ x1 = [x 0*ones(1:max(size(h))-1)];
hf = fft(h1,-1);
xf = fft(x1,-1);
yf = hf.*xf;
des = [1 0];
wate = [1 1];
h = eqfir(nf,bedge,des,wate);
- h1 = [h 0*ones(1:maxi(size(x))-1)];
- x1 = [x 0*ones(1:maxi(size(h))-1)];
+ h1 = [h 0*ones(1:max(size(x))-1)];
+ x1 = [x 0*ones(1:max(size(h))-1)];
hf = fft(h1,-1);
xf = fft(x1,-1);
yf = hf.*xf;
if ierr <> 0 then pause,end
-
\ No newline at end of file
+
end
mclose(fd);
a1=fscanfMat(TMPDIR+'/Mat');
-if maxi(a1-a) > 1.e-1 then bugmes();quit;end
+if max(a1-a) > 1.e-1 then bugmes();quit;end
[a1,txt]=fscanfMat(TMPDIR+'/Mat');
if ~and(txt==texte) then bugmes();quit;end
-if maxi(a1-a) > 1.e-1 then bugmes();quit;end
+if max(a1-a) > 1.e-1 then bugmes();quit;end
// ---- test with fprintfMat
n=50;
a=rand(n,n,'u');
fprintfMat(TMPDIR+'/Mat',a,'%5.2f');
a1=fscanfMat(TMPDIR+'/Mat');
-if maxi(a1-a) > 1.e-1 then bugmes();quit;end
+if max(a1-a) > 1.e-1 then bugmes();quit;end
// ---- test with fprintfMat
n=50;
a=rand(n,n,'u');
fprintfMat(TMPDIR+'/Mat',a,'%5.2f',txt);
[a1,txt1]=fscanfMat(TMPDIR+'/Mat');
-if maxi(a1-a) > 1.e-1 then bugmes();quit;end
+if max(a1-a) > 1.e-1 then bugmes();quit;end
if ~and(txt==txt1) then bugmes();quit;end
n=100;
a=rand(n,n,'u');
fprintfMat(TMPDIR+'/Mat',a)
[a1]=fscanfMat(TMPDIR+'/Mat');
-if maxi(a1-a) > 1.e-1 then bugmes();quit;end
+if max(a1-a) > 1.e-1 then bugmes();quit;end
[a1,S]=fscanfMat(TMPDIR+'/Mat');
if S<>emptystr() then bugmes();quit;end
end
mclose(fd);
a1=fscanfMat(TMPDIR+'/Mat');
-if maxi(a1-a) > 1.e-1 then pause,end
+if max(a1-a) > 1.e-1 then pause,end
[a1,txt]=fscanfMat(TMPDIR+'/Mat');
if ~and(txt==texte) then pause,end
-if maxi(a1-a) > 1.e-1 then pause,end
+if max(a1-a) > 1.e-1 then pause,end
// ---- test with fprintfMat
n=50;
a=rand(n,n,'u');
fprintfMat(TMPDIR+'/Mat',a,'%5.2f');
a1=fscanfMat(TMPDIR+'/Mat');
-if maxi(a1-a) > 1.e-1 then pause,end
+if max(a1-a) > 1.e-1 then pause,end
// ---- test with fprintfMat
n=50;
a=rand(n,n,'u');
fprintfMat(TMPDIR+'/Mat',a,'%5.2f',txt);
[a1,txt1]=fscanfMat(TMPDIR+'/Mat');
-if maxi(a1-a) > 1.e-1 then pause,end
+if max(a1-a) > 1.e-1 then pause,end
if ~and(txt==txt1) then pause,end
n=100;
a=rand(n,n,'u');
fprintfMat(TMPDIR+'/Mat',a)
[a1]=fscanfMat(TMPDIR+'/Mat');
-if maxi(a1-a) > 1.e-1 then pause,end
+if max(a1-a) > 1.e-1 then pause,end
[a1,S]=fscanfMat(TMPDIR+'/Mat');
if S<>emptystr() then pause,end
// generate code for extraction
// Author Serge Steer
txt=[]
- rhs=maxi(0,abs(evstr(op(3)))-1)
+ rhs=max(0,abs(evstr(op(3)))-1)
sn=stk(top);top=top-1
s2=stk(top)
if rhs==1 then
y=xx(:,2);
y1=matrix(y,2,prod(size(y))/2);
x1=matrix(x,2,prod(size(x))/2);
- rect=[mini(x1),mini(y1),maxi(x1),maxi(y1)];
+ rect=[min(x1),min(y1),max(x1),max(y1)];
plot2d(1,1,[1],"031"," ",rect);
xsegs(x1,y1);
[lhs,rhs]=argn(0);
if rhs<=0;col=1;end
- if rhs<=1;rect=[mini(noeul(:,2)),mini(noeul(:,3)),maxi(noeul(:,2)),maxi(noeul(:,3))];end
+ if rhs<=1;rect=[min(noeul(:,2)),min(noeul(:,3)),max(noeul(:,2)),max(noeul(:,3))];end
if rhs<=2;iso='1';end
plot2d(1,1,[1],"031"," ",rect);
xset("clipgrf");
// Visualisation des noeuds
[lhs,rhs]=argn(0);
- if rhs==0;rect=[mini(noeul(:,2)),mini(noeul(:,3)),maxi(noeul(:,2)),maxi(noeul(:,3))];end
+ if rhs==0;rect=[min(noeul(:,2)),min(noeul(:,3)),max(noeul(:,2)),max(noeul(:,3))];end
plot2d(1,1,[1],"031"," ",rect);
xset("clipgrf");
bords=noeul(find(noeul(:,4)>0),:);
nm=[nm,nm1];
if nm1<>0,resu(i,:)=resu(i,:)/nm1;end
end
- nmax=maxi(nm);
+ nmax=max(nm);
if nmax<>0; nm=nm/nmax;end
xsegs([noeul(:,2)-(1/sa)*resu(:,1),noeul(:,2)+(1/sa)*resu(:,1)]',...
[noeul(:,3)-(1/sa)*resu(:,2),noeul(:,3)+(1/sa)*resu(:,2)]',...
resu=read(unit,-1,j);
resu=resu(:,i);
file('close',unit);
- if rhs<=3;rect=[mini(noeul(:,2)),mini(noeul(:,3)),maxi(noeul(:,2)),maxi(noeul(:,3))];end
+ if rhs<=3;rect=[min(noeul(:,2)),min(noeul(:,3)),max(noeul(:,2)),max(noeul(:,3))];end
fec(noeul(:,2),noeul(:,3),trianl,resu,"031"," ",rect);
file("close",unit);
cw=xget("window");c_c=cw;if cw>=1 then;cw=cw-1;else cw=cw+1;end
xset("window",cw); clf(cw);
plot2d2("gnn",t',en',[1,-1],"111",...
- "en",[mini(t),mini(en)-0.5,maxi(t),maxi(en)+0.5])
+ "en",[min(t),min(en)-0.5,max(t),max(en)+0.5])
xset("window",c_c);
//
// save
cw=xget("window");c_c=cw;if cw>=1 then;cw=cw-1;else cw=cw+1;end
xset("window",cw); clf(cw);
plot2d2("gnn",t',en',[1,-1],"111",...
- "en",[mini(t),mini(en)-0.5,maxi(t),maxi(en)+0.5])
+ "en",[min(t),min(en)-0.5,max(t),max(en)+0.5])
xset("window",c_c);
clf(0:1);
<programlisting role="example"><![CDATA[
y=(0:0.33:145.78)';
clf();plot2d1('enn',0,y)
-[ymn,ymx,np]=graduate(mini(y),maxi(y))
+[ymn,ymx,np]=graduate(min(y),max(y))
rect=[1,ymn,prod(size(y)),ymx];
clf();plot2d1('enn',0,y,1,'011',' ',rect,[10,3,10,np])
]]></programlisting>
while rep(3)==-1 do // mouse just moving ...
rep=xgetmouse();
xc1=rep(1);yc1=rep(2);
- ox=mini(xc,xc1);
- oy=maxi(yc,yc1);
+ ox=min(xc,xc1);
+ oy=max(yc,yc1);
w=abs(xc-xc1);h=abs(yc-yc1);
r.data=[ox,oy,w,h]; //change the retangle origin, width an height
first=%f;
<programlisting role="example"><![CDATA[
y=(0:0.33:145.78)';
clf();plot2d1('enn',0,y)
- [ymn,ymx,np]=graduate(mini(y),maxi(y))
+ [ymn,ymx,np]=graduate(min(y),max(y))
rect=[1,ymn,prod(size(y)),ymx];
clf();plot2d1('enn',0,y,1,'011',' ',rect,[10,3,10,np])
]]></programlisting>
<programlisting role="example"><![CDATA[
y=(0:0.33:145.78)';
clf();plot2d1('enn',0,y)
-[ymn,ymx,np]=graduate(mini(y),maxi(y))
+[ymn,ymx,np]=graduate(min(y),max(y))
rect=[1,ymn,prod(size(y)),ymx];
clf();plot2d1('enn',0,y,1,'011',' ',rect,[10,3,10,np])
]]></programlisting>
while rep(3)==-1 do // movimentação do mouse...
rep=xgetmouse();
xc1=rep(1);yc1=rep(2);
- ox=mini(xc,xc1);
- oy=maxi(yc,yc1);
+ ox=min(xc,xc1);
+ oy=max(yc,yc1);
w=abs(xc-xc1);h=abs(yc-yc1);
r.data=[ox,oy,w,h]; //mudando a origem, largura e altura do retângulo
first=%f;
if nin <= 0 then x=1:10;end
if nin <= 1 then y=1:10;end
if nin <= 2 then z=rand(size(x,'*'),size(y,'*'));end
-if nin <= 3 then zmin=mini(z);zmax=maxi(z);nv = zmin + (1:10)*(zmax-zmin)/(11);end
+if nin <= 3 then zmin=min(z);zmax=max(z);nv = zmin + (1:10)*(zmax-zmin)/(11);end
if nin <= 5 then strf="121";end
if nin <= 6 then leg=" ";end
if nin <= 7 then rect=[0,0,1,1];end
if y==[] then y=1:size(z,'c');end
nvs=size(nv,'*') ;
-if nvs==1 then nvs=nv;zmin=mini(z);zmax=maxi(z);nv = zmin + (1:nvs)*(zmax-zmin)/(nvs+1);end;
+if nvs==1 then nvs=nv;zmin=min(z);zmax=max(z);nv = zmin + (1:nvs)*(zmax-zmin)/(nvs+1);end;
if nin <= 4 then style = -1*ones(1,nvs);end
-if nin <= 7 then rect=[mini(x),mini(y),maxi(x),maxi(y)]; end
+if nin <= 7 then rect=[min(x),min(y),max(x),max(y)]; end
nv1=nv
[mz,nz] = size(z);
minz = min(z);
if nv > lp ; write(%io(2),'Colormap too small');return ;end
end
-min_nv=mini(nv);
-max_nv=maxi(nv);
+min_nv=min(nv);
+max_nv=max(nv);
-plot2d([mini(xx);maxi(xx)],[mini(yy);maxi(yy)],0,strf,leg,rect,nax);
+plot2d([min(xx);max(xx)],[min(yy);max(yy)],0,strf,leg,rect,nax);
// Plot patches in order of decreasing size. This makes sure that
// all the lev1es get drawn, not matter if we are going up a hill or
// bornes initiales du graphique
if rhs<5 then
if mx<>0 then
- xmx = maxi(x); xmn = mini(x)
- ymx = maxi(y); ymn = mini(y)
+ xmx = max(x); xmn = min(x)
+ ymx = max(y); ymn = min(y)
dx = xmx-xmn; dy = ymx-ymn
- if dx==0 then dx=maxi(xmx/2,1),end
+ if dx==0 then dx=max(xmx/2,1),end
xmn=xmn-dx/10;xmx=xmx+dx/10
- if dy==0 then dy=maxi(ymx/2,1),end;
+ if dy==0 then dy=max(ymx/2,1),end;
ymn=ymn-dy/10;ymx=ymx+dy/10;
else
xmn=0;ymn=0;xmx=1;ymx=1;dx=1;dy=1
end
if ok then
dx=xmx-xmn;dy=ymx-ymn
- if dx==0 then dx=maxi(xmx/2,1),xmn=xmn-dx/10;xmx=xmx+dx/10;end
- if dy==0 then dy=maxi(ymx/2,1),ymn=ymn-dy/5;ymx=ymx+dy/10;end
+ if dx==0 then dx=max(xmx/2,1),xmn=xmn-dx/10;xmx=xmx+dx/10;end
+ if dy==0 then dy=max(ymx/2,1),ymn=ymn-dy/5;ymx=ymx+dy/10;end
rect=[xmn,ymn,xmx,ymx];
a.data_bounds=[rect(1),rect(2);rect(3),rect(4)]
end
case "Read" then
[x,y]=readxy()
- mx=mini(prod(size(x)),prod(size(y)))
+ mx=min(prod(size(x)),prod(size(y)))
if mx<>0 then
- xmx=maxi(x);xmn=mini(x)
- ymx=maxi(y);ymn=mini(y)
+ xmx=max(x);xmn=min(x)
+ ymx=max(y);ymn=min(y)
dx=xmx-xmn;dy=ymx-ymn
- if dx==0 then dx=maxi(xmx/2,1),xmn=xmn-dx/10;xmx=xmx+dx/10;end
- if dy==0 then dy=maxi(ymx/2,1),ymn=ymn-dy/5;ymx=ymx+dy/10;end
+ if dx==0 then dx=max(xmx/2,1),xmn=xmn-dx/10;xmx=xmx+dx/10;end
+ if dy==0 then dy=max(ymx/2,1),ymn=ymn-dy/5;ymx=ymx+dy/10;end
else
xmn=0;ymn=0;xmx=1;ymx=1;dx=1;dy=1
end
npt=prod(size(x))
if npt<>0 then
dist=((x-ones(npt,1)*c1(1))/dx)^2+((y-ones(npt,1)*c1(2))/dy)^2
- [m,k]=mini(dist);m=sqrt(m)
+ [m,k]=min(dist);m=sqrt(m)
else
m=3*eps
end
end
end
if d<>[] then
- [m,i]=mini(d)
+ [m,i]=min(d)
if m<eps
k=kk(i)
pp=pp(:,i)
xinfo(mess2)
while rep(3)==-1 do
rep=xgetmouse(0,[%t %t])
- r.data=[mini(xc,rep(1)),maxi(yc,rep(2)),abs(xc-rep(1)),abs(yc-rep(2))]
+ r.data=[min(xc,rep(1)),max(yc,rep(2)),abs(xc-rep(1)),abs(yc-rep(2))]
show_pixmap()
xinfo(mess2)
end
xinfo(mess2)
while rep(3)==-1 do
rep=xgetmouse(0,[%t %t])
- r.data=[mini(xc,rep(1)),maxi(yc,rep(2)),abs(xc-rep(1)),abs(yc-rep(2)),0,64*360]
+ r.data=[min(xc,rep(1)),max(yc,rep(2)),abs(xc-rep(1)),abs(yc-rep(2)),0,64*360]
show_pixmap()
xinfo(mess2)
end
if but==2 then sd1=list();return,end
o1=[oi1;of1],o2=[oi2;of2];
[r1,r2]=xgetech()
- sz=1/(40*mini(abs(r2(3)-r2(1)),abs(r2(4)-r2(2))))
+ sz=1/(40*min(abs(r2(3)-r2(1)),abs(r2(4)-r2(2))))
sd1=list("fleche",o1,o2,sz);
d_arrow(o1,o2,sz);
elseif rhs==1 then //draw
sz=x1;x1=c1(2);c1=c1(1);x2=c2(2);c2=c2(1);
else
[r1,r2]=xgetech()
- sz=1/(40*mini(abs(r2(3)-r2(1)),abs(r2(4)-r2(2))))
+ sz=1/(40*min(abs(r2(3)-r2(1)),abs(r2(4)-r2(2))))
end
xarrows([c1;x1],[c2;x2],sz,-1);
endfunction
//%Exemple
// y=0:0.33:145.78
// clf();plot2d1('enn',0,y)
-// [ymn,ymx,np]=graduate(mini(y),maxi(y))
+// [ymn,ymx,np]=graduate(min(y),max(y))
// rect=[1,ymn,prod(size(y)),ymx];
// clf();plot2d1('enn',0,y,-1,'011',' ',rect,[10,3,10,np])
xx0 = maxi ( xma , xmi )
xx1 = mini ( xma , xmi )
del=abs(xx1-xx0)
-if abs(xx0-xx1)<=1d-6*maxi(xx0,xx1) then
+if abs(xx0-xx1)<=1d-6*max(xx0,xx1) then
xa = xma
xi = xmi
np=1
// il est compris entre 10**ipa-1 et 10**ipa
//
if xx0*xx1<0 then
- pas=maxi(abs([xx0 xx1])/npi)
+ pas=max(abs([xx0 xx1])/npi)
else
pas = (xx0-xx1)/npi
end
end
dx=(x(2)-x(1))/nep;
dy=(y(2)-y(1))/nep;
- bnds=[x(1) x($), y(1) y($),mini(0,mini(f)) maxi(0,maxi(f))]
+ bnds=[x(1) x($), y(1) y($),min(0,min(f)) max(0,max(f))]
x=(x(1:sx-1)+x(2:sx))/2;
y=(y(1:sy-1)+y(2:sy))/2;
[nl,nc]=size(f);
x=(1:nl)-(0.5)*ones(1,nl);
y=(1:nc)-(0.5)*ones(1,nc);
dx=1/nep; dy=1/nep;
- bnds=[0 nl,0 nc,mini(0,mini(f)) maxi(0,maxi(f))]
+ bnds=[0 nl,0 nc,min(0,min(f)) max(0,max(f))]
end
x=x.*.[1,1] + dx*ones(x).*.[0,1] - dx*ones(x).*.[1,0];
y=y.*.[1,1] + dy*ones(y).*.[0,1] - dy*ones(y).*.[1,0];
xmx=rect(3);ymx=rect(4)
dx=abs(rect(3)-rect(1));dx=10^(-log(dx/100)/log(10))*10
dy=abs(rect(4)-rect(2));dy=10^(-log(dy/100)/log(10))*10
-dxy=maxi(dx,dy)
+dxy=max(dx,dy)
txt=[]
txt='xsetech([0 0 1 1],'+sci2exp(sd(2))+')'
for k=3:size(sd)
x2=round(dx*x2)/dx
y1=round(dy*y1)/dy
y2=round(dy*y2)/dy
- xi=string(mini(x1,x2));
+ xi=string(min(x1,x2));
w=string(abs(x1-x2));
yi=string(max(y1,y2));
h=string(abs(y1-y2));
x2=round(dx*x2)/dx
y1=round(dy*y1)/dy
y2=round(dy*y2)/dy
- xi=string(mini(x1,x2));
+ xi=string(min(x1,x2));
w=string(abs(x1-x2));
yi=string(max(y1,y2));
h=string(abs(y1-y2));
if rhs<2 then npas=n,end
if prod(size(npas))==1 then
sec=seclist(1);sec=sec(1,:)
- xmax=maxi(sec);xmin=mini(sec)
+ xmax=max(sec);xmin=min(sec)
for k=2:n
sec=seclist(k);sec=sec(1,:)
- xmax=maxi(xmax,maxi(sec))
- xmin=mini(xmin,mini(sec))
+ xmax=max(xmax,max(sec))
+ xmin=min(xmin,min(sec))
end
pas=(xmax-xmin)/npas
x=[xmin-pas xmin:pas:xmax xmax+pas]
end
my_figure = gcf();
- my_figure.axes_size = maxi(my_figure.axes_size) * ones(1,2);
+ my_figure.axes_size = max(my_figure.axes_size) * ones(1,2);
plot2d(0,0,1,"010"," ",[xmin,ymin,xmax,ymax]);
endfunction
<literal>(ptd(1,i),ptd(2,i))</literal>. The components
<literal>ptd(1,:)</literal> must be in ascending order. The default value
for the step is
- <literal>abs(maxi(ptd(1,:))-mini(ptd(1,:)))/100</literal></para>
+ <literal>abs(max(ptd(1,:))-min(ptd(1,:)))/100</literal></para>
</refsection>
<refsection>
Cette fonction calcule les valeurs d'une spline d'interpolation
dont les points de référence sont donnés par <literal>(ptd(1,i),ptd(2,i))</literal>. Les abscisses <literal>ptd(1,:)</literal> doivent être classées par ordre croissant.
La valeur par défaut du pas est égale Ã
- <literal>abs(maxi(ptd(1,:))-mini(ptd(1,:)))/100</literal>
+ <literal>abs(max(ptd(1,:))-min(ptd(1,:)))/100</literal>
</para>
</refsection>
<refsection>
<literal>(ptd(1,i),ptd(2,i))</literal>. Os componentes
<literal>ptd(1,:)</literal> devem estar em ordem crescente. O valor padrão
para o para step é
- <literal>abs(maxi(ptd(1,:))-mini(ptd(1,:)))/100</literal></para>
+ <literal>abs(max(ptd(1,:))-min(ptd(1,:)))/100</literal></para>
</refsection>
<refsection>
[lhs,rhs]=argn(0)
if a==[] then w=[];rk=0;return;end
if norm(a,1) < sqrt(%eps)/10 then rk=0,w=eye(na,na),return,end
- if rhs ==2 then tol=sqrt(%eps)*norm(a,1)*maxi(ma,na),end
- if rhs==1 then flag='svd',tol=sqrt(%eps)*norm(a,1)*maxi(ma,na);end
+ if rhs ==2 then tol=sqrt(%eps)*norm(a,1)*max(ma,na),end
+ if rhs==1 then flag='svd',tol=sqrt(%eps)*norm(a,1)*max(ma,na);end
select flag
case 'qr' then [q,r,rk,e]=qr(a',tol);
//w=[q(:,rk+1:ma),q(:,1:rk)]; <-- le ma me parait suspect je met na
error(msprintf(gettext("%s: SVD and QR not implemented in sparse.\n"),'kernel'));
end
if rhs==2 then tol=1.d-10;else tol=%eps;end
- %tol=tol*maxi(abs(A))*max(ma,na);
+ %tol=tol*max(abs(A))*max(ma,na);
if ma<na then
A=[A;sparse([],[],[na-ma,na])];
end
case 5 then //sparse matrix
[ma,na]=size(A);
- %tol=1.D-10*maxi(abs(A))*max(ma,na);
+ %tol=1.D-10*max(abs(A))*max(ma,na);
if ma<na then
A=[A;sparse([],[],[na-ma,na])];b=[b;zeros(na-ma,1)];end
if ma>na then
tests=rand(1,10);
conditions=0*tests;k=1;
for s0=tests, conditions(k)=cond(s0*E-A);k=k+1;end
- [w,k1]=mini(conditions);
+ [w,k1]=min(conditions);
rand(typ);rand('seed',seed)
if w>1.d+20 then
error(msprintf(gettext('%s: Singular pencil.'),'penlaur'));
A=Q*A*Z;
if A~=[] then
- tol=tol*maxi([norm(A,'fro'),norm(E,'fro')])+10*tol;
+ tol=tol*max([norm(A,'fro'),norm(E,'fro')])+10*tol;
else
tol=0
end
if norm(Q1-Q,1) > 100*%eps then
warning(msprintf(gettext("%s: Wrong size for input argument #%d: Symmetric expected"),'sqroot',1));
end
- tt=mini(spec(Q1));
+ tt=min(spec(Q1));
if tt <-10*%eps then
warning(msprintf(gettext("%s: Wrong value for input argument #%d: Not semi-definite positive"),'sqroot',1));
end
if abs(norm(x,p) - sum(abs(x)^p)^(1/p)) > eps then bugmes();quit;end
p=2.5;
if abs(norm(x,p) - sum(abs(x)^p)^(1/p)) > eps then bugmes();quit;end
-if abs(norm(x,'inf') -maxi(abs(x))) > eps then bugmes();quit;end
+if abs(norm(x,'inf') -max(abs(x))) > eps then bugmes();quit;end
if abs(norm(x,'inf') -norm(x,%inf)) > eps then bugmes();quit;end
if abs(norm(x,'fro') -norm(x,2)) > eps then bugmes();quit;end
// complex
if abs(norm(x,2) - norm(x)) > eps then bugmes();quit;end
p=0.5;
// 100*%eps is needed for linux
-if abs(norm(x,p) - maxi(abs(x))*sum((abs(x)/maxi(abs(x)))^p)^(1/p))> 100*%eps then bugmes();quit;end
+if abs(norm(x,p) - max(abs(x))*sum((abs(x)/max(abs(x)))^p)^(1/p))> 100*%eps then bugmes();quit;end
p=2.5;
-if abs(norm(x,p) - maxi(abs(x))*sum((abs(x)/maxi(abs(x)))^p)^(1/p))> 100*%eps then bugmes();quit;end
-if abs(norm(x,'inf') -maxi(abs(x)))> eps then bugmes();quit;end
+if abs(norm(x,p) - max(abs(x))*sum((abs(x)/max(abs(x)))^p)^(1/p))> 100*%eps then bugmes();quit;end
+if abs(norm(x,'inf') -max(abs(x)))> eps then bugmes();quit;end
if abs(norm(x,'inf') -norm(x,%inf)) > eps then bugmes();quit;end
if abs(norm(x,'fro') -norm(x,2))> eps then bugmes();quit;end
// scalar
if abs(norm(x,p) - sum(abs(x)^p)^(1/p)) > eps then bugmes();quit;end
p=2.5;
if abs(norm(x,p) - sum(abs(x)^p)^(1/p)) > eps then bugmes();quit;end
-if abs(norm(x,'inf') -maxi(abs(x))) > eps then bugmes();quit;end
+if abs(norm(x,'inf') -max(abs(x))) > eps then bugmes();quit;end
if abs(norm(x,'inf') -norm(x,%inf)) > eps then bugmes();quit;end
if abs(norm(x,'fro') -norm(x,2)) > eps then bugmes();quit;end
// Matrices
a=rand(10,10,'g');
-if abs(norm(a,1) - maxi(sum(abs(a),'r'))) > eps then bugmes();quit;end
-if abs(norm(a,'inf') - maxi(sum(abs(a),'c'))) > eps then bugmes();quit;end
-if abs(norm(a,%inf) - maxi(sum(abs(a),'c'))) > eps then bugmes();quit;end
-if abs(norm(a,2) - maxi(svd(a))) > eps then bugmes();quit;end
+if abs(norm(a,1) - max(sum(abs(a),'r'))) > eps then bugmes();quit;end
+if abs(norm(a,'inf') - max(sum(abs(a),'c'))) > eps then bugmes();quit;end
+if abs(norm(a,%inf) - max(sum(abs(a),'c'))) > eps then bugmes();quit;end
+if abs(norm(a,2) - max(svd(a))) > eps then bugmes();quit;end
if abs(norm(a,'fro') - norm(matrix(a,1,size(a,'*')),2)) > eps then bugmes();quit;end
a=a+%i*a;
-if abs(norm(a,1) - maxi(sum(abs(a),'r'))) > eps then bugmes();quit;end
-if abs(norm(a,'inf') - maxi(sum(abs(a),'c'))) > eps then bugmes();quit;end
-if abs(norm(a,%inf) - maxi(sum(abs(a),'c'))) > eps then bugmes();quit;end
-if abs(norm(a,2) - maxi(svd(a))) > eps then bugmes();quit;end
+if abs(norm(a,1) - max(sum(abs(a),'r'))) > eps then bugmes();quit;end
+if abs(norm(a,'inf') - max(sum(abs(a),'c'))) > eps then bugmes();quit;end
+if abs(norm(a,%inf) - max(sum(abs(a),'c'))) > eps then bugmes();quit;end
+if abs(norm(a,2) - max(svd(a))) > eps then bugmes();quit;end
if abs(norm(a,'fro') - norm(matrix(a,1,size(a,'*')),2)) > eps then bugmes();quit;end
//
// Difficult cases for large/small vectors
if abs(norm(x,p) - sum(abs(x)^p)^(1/p)) > eps then pause,end
p=2.5;
if abs(norm(x,p) - sum(abs(x)^p)^(1/p)) > eps then pause,end
-if abs(norm(x,'inf') -maxi(abs(x))) > eps then pause,end
+if abs(norm(x,'inf') -max(abs(x))) > eps then pause,end
if abs(norm(x,'inf') -norm(x,%inf)) > eps then pause,end
if abs(norm(x,'fro') -norm(x,2)) > eps then pause,end
// complex
if abs(norm(x,2) - norm(x)) > eps then pause,end
p=0.5;
// 100*%eps is needed for linux
-if abs(norm(x,p) - maxi(abs(x))*sum((abs(x)/maxi(abs(x)))^p)^(1/p))> 100*%eps then pause,end
+if abs(norm(x,p) - max(abs(x))*sum((abs(x)/max(abs(x)))^p)^(1/p))> 100*%eps then pause,end
p=2.5;
-if abs(norm(x,p) - maxi(abs(x))*sum((abs(x)/maxi(abs(x)))^p)^(1/p))> 100*%eps then pause,end
-if abs(norm(x,'inf') -maxi(abs(x)))> eps then pause,end
+if abs(norm(x,p) - max(abs(x))*sum((abs(x)/max(abs(x)))^p)^(1/p))> 100*%eps then pause,end
+if abs(norm(x,'inf') -max(abs(x)))> eps then pause,end
if abs(norm(x,'inf') -norm(x,%inf)) > eps then pause,end
if abs(norm(x,'fro') -norm(x,2))> eps then pause,end
if abs(norm(x,p) - sum(abs(x)^p)^(1/p)) > eps then pause,end
p=2.5;
if abs(norm(x,p) - sum(abs(x)^p)^(1/p)) > eps then pause,end
-if abs(norm(x,'inf') -maxi(abs(x))) > eps then pause,end
+if abs(norm(x,'inf') -max(abs(x))) > eps then pause,end
if abs(norm(x,'inf') -norm(x,%inf)) > eps then pause,end
if abs(norm(x,'fro') -norm(x,2)) > eps then pause,end
// Matrices
a=rand(10,10,'g');
-if abs(norm(a,1) - maxi(sum(abs(a),'r'))) > eps then pause,end
-if abs(norm(a,'inf') - maxi(sum(abs(a),'c'))) > eps then pause,end
-if abs(norm(a,%inf) - maxi(sum(abs(a),'c'))) > eps then pause,end
-if abs(norm(a,2) - maxi(svd(a))) > eps then pause,end
+if abs(norm(a,1) - max(sum(abs(a),'r'))) > eps then pause,end
+if abs(norm(a,'inf') - max(sum(abs(a),'c'))) > eps then pause,end
+if abs(norm(a,%inf) - max(sum(abs(a),'c'))) > eps then pause,end
+if abs(norm(a,2) - max(svd(a))) > eps then pause,end
if abs(norm(a,'fro') - norm(matrix(a,1,size(a,'*')),2)) > eps then pause,end
a=a+%i*a;
-if abs(norm(a,1) - maxi(sum(abs(a),'r'))) > eps then pause,end
-if abs(norm(a,'inf') - maxi(sum(abs(a),'c'))) > eps then pause,end
-if abs(norm(a,%inf) - maxi(sum(abs(a),'c'))) > eps then pause,end
-if abs(norm(a,2) - maxi(svd(a))) > eps then pause,end
+if abs(norm(a,1) - max(sum(abs(a),'r'))) > eps then pause,end
+if abs(norm(a,'inf') - max(sum(abs(a),'c'))) > eps then pause,end
+if abs(norm(a,%inf) - max(sum(abs(a),'c'))) > eps then pause,end
+if abs(norm(a,2) - max(svd(a))) > eps then pause,end
if abs(norm(a,'fro') - norm(matrix(a,1,size(a,'*')),2)) > eps then pause,end
//
// or the state at measure time instants of dtv.
df0 = 1;
-if mini(binf) <=0 then
+if min(binf) <=0 then
error('appel de icsu avec binf non strictement positif');
end
for i=1:nu
- u(1,i) = maxi( [binf(1,i),mini([u(1,i),bsup(1,i)])] );
+ u(1,i) = max( [binf(1,i),min([u(1,i),bsup(1,i)])] );
end
ech = u;
binf = binf./u;
// Use the macros icot and icob to extract the state
df0 = 1;
-if mini(binf) <=0 then
+if min(binf) <=0 then
error('call to icsua with binf not strictly positive');
end
for i=1:nu
- u(1,i)=maxi( [binf(1,i),mini([u(1,i),bsup(1,i)])] )
+ u(1,i)=max( [binf(1,i),min([u(1,i),bsup(1,i)])] )
end
ech = u;
binf = binf./u;
// Use the macros icot and icob to extract the state
df0 = 1;
-if mini(binf) <=0 then
+if min(binf) <=0 then
error('call to icsuq with binf not strictly positive');
end
for i=1:nu
- u(1,i)=maxi([ binf(1,i),mini([u(1,i),bsup(1,i)])] );
+ u(1,i)=max([ binf(1,i),min([u(1,i),bsup(1,i)])] );
end
ech = u;
binf = binf./u;
if w(1)<>p then
error(msprintf(gettext("%s: Wrong size for input argument #%d."),'karmarkar',4));
end
-if mini(x0)<0|norm(a*x0-b)>eps then
+if min(x0)<0|norm(a*x0-b)>eps then
error(msprintf(gettext("%s: x0 is not feasible."),'karmarkar'));
end
//
// y=(ax*ax')\(ax*xc)
d=-xc+ax'*y;
dk=x1.*d;
- if mini(dk)>0 then
+ if min(dk)>0 then
error(msprintf(gettext("%s: Unbounded problem!"),'karmarkar'));
end
- alpha=-Gamma/mini(d);
- test=alpha*(norm(d)**2)/maxi(1,abs(crit));
+ alpha=-Gamma/min(d);
+ test=alpha*(norm(d)**2)/max(1,abs(crit));
x1=x1+alpha*dk;
crit=tc*x1;
write(%io(2),[count,crit,test],'(f3.0,3x,e10.3,3x,e10.3)')
if %blck_szs == [] then
// is objective constant on LME constraint set, Xinit is feasible
- if maxi(abs(%O+0)) < %to then
+ if max(abs(%O+0)) < %to then
lmisolvertrace(msprintf(_('%s: Objective constant.'),'lmisolver'));
%Xlist=vec2list(%x0,%dim_X,%ind_X);
%Xopt=%O0;
%sm=100;
for %w=I
if %w~=[] then
- s=mini(real(spec(%w)))
+ s=min(real(spec(%w)))
%sm=min(%sm,s)
end
end
// <-- JVM NOT MANDATORY -->
exec(SCI+'/modules/differential_equations/tests/unit_tests/bvode_tst.sci');
[z,zf]=col1();
-if maxi(abs(z-zf))>1.e-5 then bugmes();quit;end
+if max(abs(z-zf))>1.e-5 then bugmes();quit;end
[z,zf]=col2(0);
// Fortran Coded version
-if maxi(abs(z-zf))>1.e-2 then bugmes();quit;end
+if max(abs(z-zf))>1.e-2 then bugmes();quit;end
[z,zf]=col2(1);
// Scilab coded version
-if maxi(abs(z-zf))>1.e-2 then bugmes();quit;end
+if max(abs(z-zf))>1.e-2 then bugmes();quit;end
[z,zf]=col1();
-if maxi(abs(z-zf))>1.e-5 then pause,end
+if max(abs(z-zf))>1.e-5 then pause,end
[z,zf]=col2(0);
// Fortran Coded version
-if maxi(abs(z-zf))>1.e-2 then pause,end
+if max(abs(z-zf))>1.e-2 then pause,end
[z,zf]=col2(1);
// Scilab coded version
-if maxi(abs(z-zf))>1.e-2 then pause,end
+if max(abs(z-zf))>1.e-2 then pause,end
end
if nc >ne then
for i=ne+1:nc
- f(i)=maxi([0 f(i)])
+ f(i)=max([0 f(i)])
end
end
fpen=f(nc+1) + cpen*norm(f(1:nc))^2/2';
end
if nc >ne then
for i=ne+1:nc
- f(i)=maxi([0 f(i)])
+ f(i)=max([0 f(i)])
end
end
fpen=f(nc+1) + cpen*norm(f(1:nc))^2/2';
end
deff('[ta]=%cv(x)',['[m,n]=size(x);';
'if m*n==0 then ta='' '',return,end';
- 'frmt=format();frmt=10**frmt(2)/maxi([1,norm(coeff(x))]);';
+ 'frmt=format();frmt=10**frmt(2)/max([1,norm(coeff(x))]);';
'x=round(frmt*x)/frmt;';
't=[];for k=1:m,t=[t;''|''],end;';
'ta=t;for k=1:n,';
' aa(l)='' ''+aa(l),';
' end,';
' end,';
- ' n=maxi(length(aa)),';
+ ' n=max(length(aa)),';
' aa=part(aa+blank,1:n),';
' ta=ta+aa+part(blank,1),';
'end;ta=ta+t;'])
t(na/2+1)=t(na/2+1)+'u '
end
end
- n1=maxi(length(t))+1
+ n1=max(length(t))+1
//
- n2=maxi(length(t))
+ n2=max(length(t))
if n2<ll then
write(out,t)
else
t=blank+td
t(nc/2+1)=t(nc/2+1)+'u '
end
- n1=maxi(length(t))+1
+ n1=max(length(t))+1
else
tc=%cv(c);td=%cv(d)
blank=part(blank,1:4);
t=t+blank+td
t(nc/2+1)=t(nc/2+1)+'u '
end
- n1=maxi(length(t))+1
+ n1=max(length(t))+1
else
if nc==1 then
t=t+'x '
end
end;
end
-n2=maxi(length(t))
+n2=max(length(t))
if n2<ll then
write(out,t)
else
[lhs,rhs]=argn(0)
if rhs==1 then out=%io(2),end
deff('[ta]=%cv(x)',['[m,n]=size(x);';
- 'frmt=format();frmt=10**frmt(2)/maxi([1,norm(x)]);';
+ 'frmt=format();frmt=10**frmt(2)/max([1,norm(x)]);';
'x=round(frmt*x)/frmt;';
't=[];for k=1:m,t=[t;''|''],end;';
'ta=t;for k=1:n,';
' aa(l)='' ''+aa(l),';
' end,';
' end,';
- ' n=maxi(length(aa)),';
+ ' n=max(length(aa)),';
' aa=part(aa+blank,1:n),';
' ta=ta+aa+part(blank,1),';
'end;ta=ta+t;'])
[lhs,rhs]=argn(0)
if rhs==1 then out=%io(2),end
deff('[ta]=%cv(x)',['[m,n]=size(x);';
- 'frmt=format();frmt=10**frmt(2)/maxi([1,norm(x)]);';
+ 'frmt=format();frmt=10**frmt(2)/max([1,norm(x)]);';
'x=round(frmt*x)/frmt;';
't=[];for k=1:m,t=[t;''|''],end;';
'ta=t;for k=1:n,';
' aa(l)='' ''+aa(l),';
' end,';
' end,';
- ' n=maxi(length(aa)),';
+ ' n=max(length(aa)),';
' aa=part(aa+blank,1:n),';
' ta=ta+aa+part(blank,1),';
'end;ta=ta+t;'])
[m,n]=size(a)
if m>1&n>1 then
if k<=0 then
- mn=mini(m+k,n)
+ mn=min(m+k,n)
i0=-k+1
else
mn=min(m,n-k)
[m,n]=size(a)
if m>1&n>1 then
if k<=0 then
- mn=mini(m+k,n)
+ mn=min(m+k,n)
i0=-k+1
else
mn=min(m,n-k)
[m,n]=size(a)
if k<=0 then
- mn=mini(m,n-k)
+ mn=min(m,n-k)
else
mn=min(m+k,n)
end
ik=varargin(k)
type_ik = type(ik)
if type_ik==1 then // usual subscript
- if mini(size(ik))<0 then
+ if min(size(ik))<0 then
if rhs==2 then // subscript is : in fact
M=matrix(M.entries,-1,1)
return
if size(i)==[-1,-1] then i=1:m2,end
if size(j)==[-1,-1] then j=1:p2,end
-if maxi(i)>m2 then
- s2=[s2;0*ones(maxi(i)-m2,p2)]
+if max(i)>m2 then
+ s2=[s2;0*ones(max(i)-m2,p2)]
[m2,p2]=size(s2(5));
end
-if maxi(j)>p2 then
- s2=[s2,0*ones(m2,maxi(j)-p2)]
+if max(j)>p2 then
+ s2=[s2,0*ones(m2,max(j)-p2)]
[m2,p2]=size(s2(5));
end
jj=0*ones(1,p2);jj(j)=ones(1,prod(size(j)));
[m,n]=size(d);
polyn=(type(d)==2);constant=(type(d)==1);
if constant&(m==n) then
- minsv=mini(svd(d));rcd=rcond(d);s=poly(0,'s');
+ minsv=min(svd(d));rcd=rcond(d);s=poly(0,'s');
end
if constant&(m<>n) then
- minsv=mini(svd(d));s=poly(0,'s');
+ minsv=min(svd(d));s=poly(0,'s');
end
if polyn then rcd=0;minsv=0;s=poly(0,varn(d));end
www=[];
for k=1:10
www=[www,rcond(horner(h,valfa(k)))];end
- [w,k1]=maxi(www);alfa=valfa(k1);
+ [w,k1]=max(www);alfa=valfa(k1);
x=invrs(a,alfa);
end
elseif m<n then
x=invsyslin(a)
else
[stmp,ws]=rowregul(a,0,0);
- if mini(svd(stmp(5))) > 1.d-6 then
+ if min(svd(stmp(5))) > 1.d-6 then
x=invsyslin(stmp)*ws
else
error(19)
x=invsyslin(a)
else
[stmp,ws]=rowregul(a,0,0);
- if mini(svd(stmp(5))) > 1.d-6 then
+ if min(svd(stmp(5))) > 1.d-6 then
x=invsyslin(stmp)*ws
else
error(19)
[A1,B1,C1,D1,x1,dom1]=S1(2:7),
[A2,B2,C2,D2,x2]=S2(2:6),
//
-if maxi(degree(D1))==0 & maxi(degree(D2))==0 then
+if max(degree(D1))==0 & max(degree(D2))==0 then
D1=coeff(D1);D2=coeff(D2);
B1C2=B1*C2
SS=tlist(['lss','A','B','C','D','X0','dt'],[A1,B1C2;0*B1C2' ,A2],[B1*D2;B2],...
if type(D1*D2)~=1
s=poly(0,varn(D1*D2));
end
-deg=maxi(degree(Ms));
+deg=max(degree(Ms));
B=coeff(Ms,deg);
Ps=0*B
for i=1:deg
B=J*B+coeff(Ms,deg-i)
end
//
-deg=maxi(degree(Ls)); J=J'
+deg=max(degree(Ls)); J=J'
C=coeff(Ls,deg);
pps=0*C
for i=1:deg
//
C=C';
D=pps'*B+Ls'*Ps+D1*D2;
-Dg=maxi(degree(D));
+Dg=max(degree(D));
if Dg==0 then D=coeff(D);end
SS=tlist(['lss','A','B','C','D','X0','dt'],J',B,C,D,[x1;x2],dom1);
[ms,ns]=size(s)
if ms==1&ns==1 then
if s<0 then
- if or(abs(coeff(p(:)))*ones(maxi(degree(p))+1,1)==0) then
+ if or(abs(coeff(p(:)))*ones(max(degree(p))+1,1)==0) then
error(27)
end
f=tlist(['r','num','den','dt'],ones(p),p.^(-s),[])
num=p
den=ones(s)
num(kp)=num(kp).^s(kp)
- if or(abs(coeff(p(kn)))*ones(maxi(degree(p(kn)))+1,1)==0) then
+ if or(abs(coeff(p(kn)))*ones(max(degree(p(kn)))+1,1)==0) then
error(27)
end
num(kn)=ones(p(kn))
if ms==1&ns==1 then
if m==1|n==1 then //Element wise exponentiation p.^s with p vector
if s<0 then
- if or(abs(coeff(p(:)))*ones(maxi(degree(p))+1,1)==0) then
+ if or(abs(coeff(p(:)))*ones(max(degree(p))+1,1)==0) then
error(27)
end
f=tlist(['r','num','den','dt'],ones(p),p.^(-s),[])
else
s=poly(0,varn(p))
f=coeff(p,0)/m
- for k=1:maxi(degree(p))
+ for k=1:max(degree(p))
f=f+(coeff(p,k)/m)*(s^k)
end
end
if ms==1&ns==1 then
if s<0 then
num=f('num')
- if or(abs(coeff(num(:)))*ones(maxi(degree(num))+1,1)==0) then
+ if or(abs(coeff(num(:)))*ones(max(degree(num))+1,1)==0) then
error(27)
end
s=-s
num(kp)=num(kp).^s(kp)
den(kp)=den(kp).^s(kp)
- if or(abs(coeff(num(kn)))*ones(maxi(degree(num(kn)))+1,1)==0) then
+ if or(abs(coeff(num(kn)))*ones(max(degree(num(kn)))+1,1)==0) then
error(27)
end
num(kn)=den(kn).^(-s(kn))
n2=n2+0;l2=1;m2=1;
if l1*m1==1 then indef=%t,else error(14),end
end
- if mini([l1*m1,l2*m2])==1 then,
+ if min([l1*m1,l2*m2])==1 then,
num=n1*n2,
den=d1*ones(l2,m2),
else,
if m==1|n==1 then //Element wise exponentiation f.^s with f vector
if s<0 then
num=f('num')
- if or(abs(coeff(num(:)))*ones(maxi(degree(num))+1,1)==0) then
+ if or(abs(coeff(num(:)))*ones(max(degree(num))+1,1)==0) then
error(27)
end
s=-s
elseif type(ik)==4 then // boolean subscript
ik=find(ik)
dims1(k,1)=max(max(ik),dims(k))
- elseif mini(size(ik))<0 then // :
+ elseif min(size(ik))<0 then // :
if dims(k)<>0 then
ik=1:dims(k)
else
else
s=poly(0,varn(p))
f=m\coeff(p,0)
- for k=1:maxi(degree(p))
+ for k=1:max(degree(p))
f=f+(m\coeff(p,k))*(s^k)
end
end
end
else
[s,u,bs]=bdiag(p+0*%i);
- if maxi(bs)>1 then
+ if max(bs)>1 then
error('g_pow: unable to diagonalize!');
end
w=diag(s);
//General matrix
r=and(imag(a)==0)
[s,u,bs]=bdiag(a+0*%i);
- if maxi(bs)>1 then
+ if max(bs)>1 then
error('g_pow: unable to diagonalize!');
end
x=u*diag(diag(s).^p)*inv(u);
if isreal(a)&isreal(b) then
[h,rk]=lufact(b')
- if rk<mini(mb,nb) then warning('deficient rank: rank = '+string(rk)),end
+ if rk<min(mb,nb) then warning('deficient rank: rank = '+string(rk)),end
x=[]
for k=1:ma
x=[x;lusolve(h,a(k,:)')']
else
b=b';a=a'
[h,rk]=lufact([real(b) -imag(b);imag(b) real(b)])
- if rk<2*mini(mb,nb) then warning('deficient rank: rank = '+string(rk/2)),end
+ if rk<2*min(mb,nb) then warning('deficient rank: rank = '+string(rk/2)),end
x=[]
for k=1:ma
x=[x lusolve(h,[real(a(:,k));imag(a(:,k))])]
if m>1&n>1 then
l=find(ij(:,1)==(ij(:,2)-k))
if k<=0 then
- mn=mini(m+k,n)
+ mn=min(m+k,n)
i0=-k
else
mn=min(m,n-k)
if isreal(a)&isreal(b) then
[h,rk]=lufact(a)
- if rk<mini(ma,na) then warning('deficient rank: rank = '+string(rk)),end
+ if rk<min(ma,na) then warning('deficient rank: rank = '+string(rk)),end
x=[]
for k=1:nb
x=[x,lusolve(h,b(:,k))]
ludel(h)
else
[h,rk]=lufact([real(a) -imag(a);imag(a) real(a)])
- if rk<2*mini(ma,na) then warning('deficient rank: rank = '+string(rk/2)),end
+ if rk<2*min(ma,na) then warning('deficient rank: rank = '+string(rk/2)),end
x=[]
for k=1:nb
x=[x,lusolve(h,[real(b(:,k));imag(b(:,k))])]
end
[h,rk]=lufact(a)
-if rk<mini(ma,na) then warning('deficient rank: rank = '+string(rk)),end
+if rk<min(ma,na) then warning('deficient rank: rank = '+string(rk)),end
x=[]
for k=1:nb
x=[x,sparse(lusolve(h,full(b(:,k))))]
select flag
case 1 then
- res=maxi(ones(1,m)*abs(S))
+ res=max(ones(1,m)*abs(S))
case 2 then
if m<n then
S=S*S'
end
if m<>n then res=sqrt(res),end
case %inf then
- res=maxi(abs(S)*ones(n,1))
+ res=max(abs(S)*ones(n,1))
case 'inf' then
- res=maxi(abs(S)*ones(n,1))
+ res=max(abs(S)*ones(n,1))
case 'fro' then
[ij,v]=spget(S);
res=sqrt(sum(abs(v.*v)))
end
[h,rk]=lufact(b')
-if rk<mini(mb,nb) then warning('deficient rank: rank = '+string(rk)),end
+if rk<min(mb,nb) then warning('deficient rank: rank = '+string(rk)),end
x=[]
for k=1:ma
x=[x;sparse(lusolve(h,full(a(k,:))')')]
if m>1&n>1 then
l=find(ij(:,1)==(ij(:,2)-k))
if k<=0 then
- mn=mini(m,n-k)
+ mn=min(m,n-k)
else
mn=min(m+k,n)
end
polynomial matrix <literal>Mp</literal> . <literal>C</literal> is partitioned
as <literal>C=[C0,C1,...,Ck]</literal>
where the <literal>Ci</literal> are arranged in increasing order
- <literal>k = maxi(degree(Mp))</literal></para>
+ <literal>k = max(degree(Mp))</literal></para>
<para><literal>C=coeff(Mp,v)</literal> returns the matrix of coefficients with
degree in <literal>v</literal> . (<literal>v</literal> is a row or column vector).</para>
</refsection>
of <literal>W</literal>.</para>
<para>
The default value of <literal>k</literal> is the smallest power of 2 which is larger
- than <literal>n*maxi(degree(W))</literal>.</para>
+ than <literal>n*max(degree(W))</literal>.</para>
<para>
Method (Only if W size is greater than 2*2) : evaluate the determinant of <literal>W</literal> for the Fourier frequencies
and apply inverse FFT to the coefficients of the determinant.</para>
matrice de polynômes <literal>Mp</literal>. <literal>C</literal> est
partitionnée comme <literal>C=[C0,C1,...,Ck]</literal>
où les <literal>Ci</literal> sont arrangés dans l'ordre décroissant .
- <literal>k = maxi(degree(Mp))</literal>
+ <literal>k = max(degree(Mp))</literal>
</para>
<para><literal>C=coeff(Mp,v)</literal> renvoie la matrice des coefficients avec les
degrés dans <literal>v</literal>.
</para>
<para>
La valeur par défaut de <literal>k</literal> est la plus petite
- puissance de 2 plus grande que <literal>n*maxi(degree(W))</literal>.
+ puissance de 2 plus grande que <literal>n*max(degree(W))</literal>.
</para>
<para>
Méthode (pour les matrices dont la taille est supérieure à 2*2) : évaluation du déterminant de <literal>W</literal> aux
<literal>Mp</literal> . <literal>C</literal> é particionada como
<literal>C=[C0,C1,...,Ck]</literal> onde os <literal>Ci</literal> estão
dispostos em ordem crescente, <literal>k =
- maxi(degree(Mp))</literal></para>
+ max(degree(Mp))</literal></para>
<para><literal>C=coeff(Mp,v)</literal> retorna a matriz de coeficientes
com graus em <literal>v</literal> . (<literal>v</literal> é um vetor linha
<literal>W</literal>.</para>
<para>O valor padrão de <literal>k</literal> é a menor potência de 2 que é
- maior que <literal>n*maxi(degree(W))</literal>.</para>
+ maior que <literal>n*max(degree(W))</literal>.</para>
<para>Método (apenas se o tamanho de W for maior que 2*2) : avalia o
determinante de W para as freqüências de Fourier e aplica a TRF inversa
//upper bound of the determinant degree
- maj = n1*maxi(degree(W))+1;
+ maj = n1*max(degree(W))+1;
if argn(2)==1 then
k=1;
A=clean(A);
[m,n]=size(A);U=eye(n,n);
l1=n+1;
- for l=m:-1:maxi((m-n),1)
+ for l=m:-1:max((m-n),1)
l1=l1-1;
if l1<>0 then
Al=A(l,1:l1);
k0=0;k1=0;tol=norm(coeff(A),1);
v=[];w=[];
for k=1:n
- if maxi(abs(coeff(A(:,k)))) <= sqrt(%eps)*tol then
+ if max(abs(coeff(A(:,k)))) <= sqrt(%eps)*tol then
k0=k0+1;v=[v,k];
else
k1=k1+1,w=[w,k];
case 'polynomial' then //POLYNOMIAL MATRIX
[m,n]=size(h);
if m<>n then error(20),end
- ndeg=maxi(degree(h));
+ ndeg=max(degree(h));
if ndeg==1 then //MATRIX PENCIL
E=coeff(h,1);A=-coeff(h,0);
if norm(E-eye(E),1) < 100*%eps then
while %T
wkk=w(kk);
if abs(imag(wkk))<=%eps then
- [themin,which]=mini([abs(wkk),1/(abs(wkk))]);
+ [themin,which]=min([abs(wkk),1/(abs(wkk))]);
if which==2 then g=-g*real(wkk);end
resn(k)=poly(sign(real(wkk))*themin,varn(pol));
kk=kk+1;k=k+1;
// Ds = C (sN-Eye)^-1 B
//!
if type(Ds)==1 then Ds=Ds+0*poly(0,'s')*Ds;end
-dg=maxi(degree(Ds))+1;
+dg=max(degree(Ds))+1;
[nout,nin]=size(Ds);
[Sl]=markp2ss(coeff(Ds),dg,nout,nin);
N=Sl(2);B=-Sl(3);C=Sl(4)
//test if all size of the ndim dimension of input
//port of the source block is positive
- if mini(ww)>0 then
+ if min(ww)>0 then
//test if the dimension of the target port
//is positive
//test if all size of the ndim dimension of output
//port of the target block is positive
- if mini(ww)>0 then
+ if min(ww)>0 then
//test if the dimension of the source port
//is positive
if nout(1,ndim)>0 then
if (nout(1,ndim)==0) then
if ndim==1 then
ww=bllst(blkout).in(:)
- if mini(ww)>0 then
+ if min(ww)>0 then
bllst(blkout).out(portout)=sum(ww)
ok=%f
end
elseif ndim==2 then
ww=bllst(blkout).in2(:)
- if mini(ww)>0 then
+ if min(ww)>0 then
bllst(blkout).out2(portout)=sum(ww)
ok=%f
end
end
outoini=[];jj=0
for j=ii
-// m=int32(maxi(find(inpptr<=int32(j))))
- m=maxi(find(inpptr<=j))
+// m=int32(max(find(inpptr<=int32(j))))
+ m=max(find(inpptr<=j))
n=j-inpptr(m)+1
outoini=[outoini;[m,n]]
jj=jj+1
//[lhs,rhs]=argn(0)
if prt_in <> -1 then //two connected blocks
- lp=mini(size(path_out,'*'),size(path_in,'*'))
+ lp=min(size(path_out,'*'),size(path_in,'*'))
k=find(path_out(1:lp)<>path_in(1:lp))
path=path_out(1:k(1)-1) // common superbloc path
path_out=path_out(k(1)) // "from" block number
//** hilite_obj(scs_m.objs(path_out))
//** if or(path_in<>path_out) then hilite_obj(scs_m.objs(path_in)),end
else
- mxwin=maxi(winsid())
+ mxwin=max(winsid())
//*****************************************
for k=1:size(path,'*')
//** hilite_obj(scs_m.objs(path(k))) //**
//** hilite_obj(scs_m.objs(path_out)) //** clear
unhilite_obj(path_out) ;
else
- mxwin=maxi(winsid())
+ mxwin=max(winsid())
for k=1:size(path,'*')
//** hilite_obj(scs_m.objs(path(k))) //**
hilite_obj(path(k)) ; //**
for k=blks
path=[path k];
xx=[xx,[x0;xlk]];yy=[yy,[y0;y0-1]]
- larg=maxi(xlk,larg)
+ larg=max(xlk,larg)
lp($+1)=path
if scs_m.objs(k).model.sim=='super' then
y0s=y0;x0s=x0;x0=xlk;y0=y0-1
function primary=discardprimary(primary)
// discard
- mma=maxi(primary(:,2))+1
+ mma=max(primary(:,2))+1
con=mma*primary(:,1)+primary(:,2)
[junk,ind]=gsort(-con);con=-junk
primary=primary(ind,:)
if exe_cons<>[] then
clkconnectj=exe_cons
- mma=maxi(clkconnectj(:,2))+1
+ mma=max(clkconnectj(:,2))+1
con=mma*(clkconnectj(:,1))+clkconnectj(:,2)
[junk,ind]=gsort(-con);con=-junk
clkconnectj=clkconnectj(ind,:)
//store unconnected outputs, if any, at the end of outtb
unco=find(outlnk==0);
for j=unco
- m=maxi(find(outptr<=j))
+ m=max(find(outptr<=j))
n=j-outptr(m)+1
nm=bllst(m).out(n)
if nm<1 then
lnksz($+1,1)=bllst(m).out(n);
lnksz($,2)=bllst(m).out2(n);
lnktyp($+1)=bllst(m).outtyp(n);
- outlnk(j)=maxi(outlnk)+1
+ outlnk(j)=max(outlnk)+1
end
//store unconnected inputs, if any, at the end of outtb
unco=find(inplnk==0);
for j=unco
- m=maxi(find(inpptr<=j))
+ m=max(find(inpptr<=j))
n=j-inpptr(m)+1
nm=bllst(m).in(n)
if nm<1 then
lnksz($+1,1)=bllst(m).in(n);
lnksz($,2)=bllst(m).in2(n);
lnktyp($+1)=bllst(m).intyp(n);
- inplnk(j)=maxi([inplnk;maxi(outlnk)])+1
+ inplnk(j)=max([inplnk;max(outlnk)])+1
end
endfunction
end
outoini=[];jj=0
for j=ii
- m=maxi(find(inpptr<=j))
+ m=max(find(inpptr<=j))
n=j-inpptr(m)+1
outoini=[outoini;[m,n]]
jj=jj+1
//of the output ports of the target block
if ndim==1 then
ww=find(bllst(connectmat(jj,3)).out==0)
- if (ww<>[]&mini(bllst(connectmat(jj,3)).in(:))>0) then
+ if (ww<>[]&min(bllst(connectmat(jj,3)).in(:))>0) then
bllst(connectmat(jj,3)).out(ww)=sum(bllst(connectmat(jj,3)).in(:))
end
elseif ndim==2 then
ww=find(bllst(connectmat(jj,3)).out2==0)
- if (ww<>[]&mini(bllst(connectmat(jj,3)).in2(:))>0) then
+ if (ww<>[]&min(bllst(connectmat(jj,3)).in2(:))>0) then
bllst(connectmat(jj,3)).out2(ww)=sum(bllst(connectmat(jj,3)).in2(:))
end
end
//of the input ports of the source block
if ndim==1 then
ww=find(bllst(connectmat(jj,1)).in==0)
- if (ww<>[]&mini(bllst(connectmat(jj,1)).out(:))>0) then
+ if (ww<>[]&min(bllst(connectmat(jj,1)).out(:))>0) then
bllst(connectmat(jj,1)).in(ww)=sum(bllst(connectmat(jj,1)).out(:))
end
elseif ndim==2 then
ww=find(bllst(connectmat(jj,1)).in2==0)
- if (ww<>[]&mini(bllst(connectmat(jj,1)).out2(:))>0) then
+ if (ww<>[]&min(bllst(connectmat(jj,1)).out2(:))>0) then
bllst(connectmat(jj,1)).in2(ww)=sum(bllst(connectmat(jj,1)).out2(:))
end
end
//test if all size of the ndim dimension of input
//port of the source block is positive
- if mini(ww)>0 then
+ if min(ww)>0 then
//test if the dimension of the target port
//is positive
if nin(1,ndim)>0 then
//test if all size of the ndim dimension of output
//port of the target block is positive
- if mini(ww)>0 then
+ if min(ww)>0 then
//test if the dimension of the source port
//is positive
if nout(1,ndim)>0 then
bllst(connectmat(jj,1)).in2(ww)=ninnout(1,2)
//
ww=find(bllst(connectmat(jj,1)).in==0)
- if (ww<>[]&mini(bllst(connectmat(jj,1)).out(:))>0) then
+ if (ww<>[]&min(bllst(connectmat(jj,1)).out(:))>0) then
bllst(connectmat(jj,1)).in(ww)=sum(bllst(connectmat(jj,1)).out)
end
ww=find(bllst(connectmat(jj,1)).in2==0)
- if (ww<>[]&mini(bllst(connectmat(jj,1)).out2(:))>0) then
+ if (ww<>[]&min(bllst(connectmat(jj,1)).out2(:))>0) then
bllst(connectmat(jj,1)).in2(ww)=sum(bllst(connectmat(jj,1)).out2)
end
//
bllst(connectmat(jj,3)).out2(ww)=ninnout(1,2)
//
ww=find(bllst(connectmat(jj,3)).out==0)
- if (ww<>[]&mini(bllst(connectmat(jj,3)).in(:))>0) then
+ if (ww<>[]&min(bllst(connectmat(jj,3)).in(:))>0) then
bllst(connectmat(jj,3)).out(ww)=sum(bllst(connectmat(jj,3)).in(:))
end
ww=find(bllst(connectmat(jj,3)).out2==0)
- if (ww<>[]&mini(bllst(connectmat(jj,3)).in2(:))>0) then
+ if (ww<>[]&min(bllst(connectmat(jj,3)).in2(:))>0) then
bllst(connectmat(jj,3)).out2(ww)=sum(bllst(connectmat(jj,3)).in2(:))
end
end
return
end
- lp=mini(size(path_out,'*'),size(path_in,'*'))
+ lp=min(size(path_out,'*'),size(path_in,'*'))
k=find(path_out(1:lp)<>path_in(1:lp))
path=path_out(1:k(1)-1) // common superbloc path
if (k <> []) then
path_in=path_in(k(1)) // "to" block number
end
if isdef('Code_gene_run') then
- mxwin=maxi(winsid())
+ mxwin=max(winsid())
path=path+1 // Consider locally compiled superblock as a superblock
for k=1:size(path,'*')
//hilite_obj(all_scs_m.objs(numk(k)))
end
unhilite_obj(kk)
else
- mxwin=maxi(winsid())
+ mxwin=max(winsid())
kk=[];
for k=1:size(path,'*')
//hilite_obj(scs_m.objs(path(k)))
//store unconnected outputs, if any, at the end of outtb
for unco=find(outlnk==0);
- outlnk(unco)=maxi(outlnk)+1
+ outlnk(unco)=max(outlnk)+1
end
//store unconnected inputs, if any, at the end of outtb
for unco=find(inplnk==0);
- inplnk(unco)=maxi([inplnk;maxi(outlnk)])+1
+ inplnk(unco)=max([inplnk;max(outlnk)])+1
end
endfunction
endfunction
function clkconnect=cleanup(clkconnect)
- mm=maxi(clkconnect)+1
+ mm=max(clkconnect)+1
cc=clkconnect(:,4)+mm*clkconnect(:,3)+clkconnect(:,2)*mm^2+..
clkconnect(:,1)*mm^3
[cc1,ind]=gsort(-cc)
endfunction
//function mat=cleanup1(mat)
-// mm=maxi(mat)+1
+// mm=max(mat)+1
// cc=mat(:,1)*mm
// [cc1,ind]=gsort(-cc)
// mat=mat(ind,:)
while ~done1
done1=%t
[clkr,clkc]=size(clkconnect);
- mm=maxi(clkconnect)+1;
+ mm=max(clkconnect)+1;
cll=clkconnect(:,1)*mm+clkconnect(:,2);
[cll,ind]=gsort(-cll);
clkin=int(clkin(:));nclkin=size(clkin,1);
if nclkin>0 then
- if mini(clkin)<1 then
+ if min(clkin)<1 then
message('Event input ports sizes must be positive')
ok=%f
return
clkout=int(clkout(:));nclkout=size(clkout,1);
if nclkout>0 then
- if mini(clkout)<1 then
+ if min(clkout)<1 then
message('Event output ports sizes must be positive')
ok=%f
return
cmap = options.Cmap
d = gh_winc.color_map
for k = 1:size(cmap,1)
- [mc,kk] = mini(abs(d-ones(size(d,1),1)*cmap(k,:))*[1;1;1])
+ [mc,kk] = min(abs(d-ones(size(d,1),1)*cmap(k,:))*[1;1;1])
if mc > .0001 then
d = [d ; cmap(k,:)]
end
end
- maxpal = -mini([-200;windows(:,1)]) ; //** look for the last valid palette
+ maxpal = -min([-200;windows(:,1)]) ; //** look for the last valid palette
kpal = maxpal+1 ; //** add one
gh_axes = gca();
o_size = size(gh_axes.children);
gr_k = get_gri(K, o_size(1)) ;
- gh_axes.children(gr_k).children(1).thickness = maxi(scs_m.objs(K).thick(1) , 1) * maxi(scs_m.objs(K).thick(2), 1) ;
+ gh_axes.children(gr_k).children(1).thickness = max(scs_m.objs(K).thick(1) , 1) * max(scs_m.objs(K).thick(2), 1) ;
drawnow();
end
if size(scs_m(1)(1),'*') <4 then scs_m(1)(1)=[scs_m(1)(1),0,0],end //compatibility
-scs_m(1)(1)(2)=maxi(scs_m(1)(1)(2),450)
+scs_m(1)(1)(2)=max(scs_m(1)(1)(2),450)
if size(scs_m(1))<6 then
options=default_options()
doc=list() //documentation structure
label=[]
gr_i=['b1=xstringl(0,0,''e'');';
'b2=xstringl(0,0,''-Ts'');';
- 'h=-b1(2)+maxi(0,sz(2)-0.5*b1(4)+b2(4))/2;';
- 'w=maxi(0,sz(1)-b1(3)-b1(4))/2;';
+ 'h=-b1(2)+max(0,sz(2)-0.5*b1(4)+b2(4))/2;';
+ 'w=max(0,sz(1)-b1(3)-b1(4))/2;';
'xstring(orig(1)+w,orig(2)+h,''e'');';
'xstring(orig(1)+w+b1(3)/2,orig(2)+h+b1(4)*0.5,''-Ts'');']
case 'DLRADAPT_f' then
gr_i=['rpar=model(8);n=size(rpar,''*'')/2;';
'thick=xget(''thickness'');xset(''thickness'',2);';
'xx=rpar(1:n);yy=rpar(n+1:2*n);';
- 'mnx=mini(xx);xx=xx-mnx*ones(xx);mxx=maxi(xx);';
+ 'mnx=min(xx);xx=xx-mnx*ones(xx);mxx=max(xx);';
'xx=orig(1)+sz(1)*(1/10+(4/5)*xx/mxx);';
- 'mnx=mini(yy);yy=yy-mnx*ones(yy);mxx=maxi(yy);';
+ 'mnx=min(yy);yy=yy-mnx*ones(yy);mxx=max(yy);';
'yy=orig(2)+sz(2)*(1/10+(4/5)*yy/mxx);';
'xpoly(xx,yy,''lines'');';
'xset(''thickness'',thick);']
gr_i=['rpar=model.rpar;n=size(rpar,''*'')/2;';
'thick=xget(''thickness'');xset(''thickness'',2);';
'xx=rpar(1:n);yy=rpar(n+1:2*n);';
- 'mnx=mini(xx);xx=xx-mnx*ones(xx);mxx=maxi(xx);';
+ 'mnx=min(xx);xx=xx-mnx*ones(xx);mxx=max(xx);';
'xx=orig(1)+sz(1)*(1/10+(4/5)*xx/mxx);';
- 'mnx=mini(yy);yy=yy-mnx*ones(yy);mxx=maxi(yy);';
+ 'mnx=min(yy);yy=yy-mnx*ones(yy);mxx=max(yy);';
'yy=orig(2)+sz(2)*(1/10+(4/5)*yy/mxx);';
'xpoly(xx,yy,''lines'');';
'xset(''thickness'',thick);']
xpoly(o.xx, o.yy,'lines') ; //** draw the polyline "Link"
gh_e = gce() ;
- gh_e.thickness = maxi( o.thick(1) , 1) * maxi(o.thick(2), 1) ; //** thickness
+ gh_e.thickness = max( o.thick(1) , 1) * max(o.thick(2), 1) ; //** thickness
gh_e.foreground = o.ct(1) ; //** link color
gh_e.mark_size_unit = "point" ;
gh_e.mark_size = mark_size ; // size of the square selection boxes
r=gce();r.foreground=-1;
while rep(3)==-1 do
rep=xgetmouse()
- r.data=[mini(xc,rep(1)),maxi(yc,rep(2)),abs(xc-rep(1)),abs(yc-rep(2))]
+ r.data=[min(xc,rep(1)),max(yc,rep(2)),abs(xc-rep(1)),abs(yc-rep(2))]
end
case 2 then //Segment
r=gce();r.foreground=-1;
while rep(3)==-1 do
rep=xgetmouse()
- r.data=[mini(xc,rep(1)),maxi(yc,rep(2)),abs(xc-rep(1)),abs(yc-rep(2)),0,360]
+ r.data=[min(xc,rep(1)),max(yc,rep(2)),abs(xc-rep(1)),abs(yc-rep(2)),0,360]
end
end
xc1 = xc + wid ;
yc1 = yc - hei ;
- ox = mini(xc, xc1) ;
- oy = maxi(yc, yc1) ;
+ ox = min(xc, xc1) ;
+ oy = max(yc, yc1) ;
w = abs(xc - xc1) ;
h = abs(yc - yc1) ;
ok = %t ;
//** get split type
[xout,yout,typout] = getoutputports(scs_m.objs(from(1)));
clr = ct(1);
- [m,kp1] = mini((yc1-yout)^2+(xc1-xout)^2);
+ [m,kp1] = min((yc1-yout)^2+(xc1-xout)^2);
k = kp1 ;
typo = ct(2) ;
xout= xxx(1,:);
yout= xxx(2,:);
- [m,kp1] = mini((yc1-yout)^2+(xc1-xout)^2) ;
+ [m,kp1] = min((yc1-yout)^2+(xc1-xout)^2) ;
k = kp1 ;
xo = xout(k); yo = yout(k);
typo = typout(k) ;
theta*%pi/180,...
[orig(1)+sz(1)/2;orig(2)+sz(2)/2]);
xin = xxx(1,:); yin = xxx(2,:);
- [m,kp2] = mini((ye-yin)^2+(xe-xin)^2);
+ [m,kp2] = min((ye-yin)^2+(xe-xin)^2);
k = kp2 ;
xc2 = xin(k); yc2 = yin(k);
typi = typin(k);
//** further check for warning message about "size"
need_warning = %f ; //** flag initialization
- if (szin(1)<>szout(1)) & mini([szin(1) szout(1)])>0 then
+ if (szin(1)<>szout(1)) & min([szin(1) szout(1)])>0 then
need_warning = %t ;
end
szin2 = szin(2);
end
- if (szin2<>szout2) & mini([szin2 szout2])>0 then
+ if (szin2<>szout2) & min([szin2 szout2])>0 then
need_warning = %t
end
typpto='in'
szin = getportsiz(o2,port_number,'in')
- if szin<>szout & mini([szin szout])>0 then
+ if szin<>szout & min([szin szout])>0 then
messagebox(["Warning :';
"Selected ports don''t have the same size";
"The port at the origin of the link has size "+string(szout);
typpto='out'
szin=getportsiz(o2,port_number,'out')
- if szin<>szout & mini([szin szout])>0 then
+ if szin<>szout & min([szin szout])>0 then
messagebox(["Warning :";
"Selected ports don''t have the same size";
"The port at the origin of the link has size " + string(szout);
typpto = 'evtin';
szin = getportsiz(o2,port_number,'evtin');
- if szin<>szout & mini([szin szout])>0 then
+ if szin<>szout & min([szin szout])>0 then
messagebox(["Warning :";
"Selected ports don''t have the same size"
"The port at the origin of the link has size " + string(szout);
//** get split type
[xout,yout,typout] = getoutputports(scs_m.objs(from(1)));
clr = ct(1);
- [m,kp1] = mini((yc1-yout)^2+(xc1-xout)^2);
+ [m,kp1] = min((yc1-yout)^2+(xc1-xout)^2);
k = kp1 ;
typo = ct(2) ;
xout= xxx(1,:);
yout= xxx(2,:);
- [m,kp1] = mini((yc1-yout)^2+(xc1-xout)^2) ;
+ [m,kp1] = min((yc1-yout)^2+(xc1-xout)^2) ;
k = kp1 ;
xo = xout(k); yo = yout(k);
typo = typout(k) ;
theta*%pi/180,...
[orig(1)+sz(1)/2;orig(2)+sz(2)/2]);
xin = xxx(1,:); yin = xxx(2,:);
- [m,kp2] = mini((ye-yin)^2+(xe-xin)^2);
+ [m,kp2] = min((ye-yin)^2+(xe-xin)^2);
k = kp2 ;
xc2 = xin(k); yc2 = yin(k);
typi = typin(k);
//** further check for warning message about "size"
need_warning = %f ; //** flag initialization
- if (szin(1)<>szout(1)) & mini([szin(1) szout(1)])>0 then
+ if (szin(1)<>szout(1)) & min([szin(1) szout(1)])>0 then
need_warning = %t ;
end
szin2 = szin(2);
end
- if (szin2<>szout2) & mini([szin2 szout2])>0 then
+ if (szin2<>szout2) & min([szin2 szout2])>0 then
need_warning = %t
end
typpto='in'
szin = getportsiz(o2,port_number,'in')
- if szin<>szout & mini([szin szout])>0 then
+ if szin<>szout & min([szin szout])>0 then
messagebox(["Warning :';
"Selected ports don''t have the same size";
"The port at the origin of the link has size "+string(szout);
typpto='out'
szin=getportsiz(o2,port_number,'out')
- if szin<>szout & mini([szin szout])>0 then
+ if szin<>szout & min([szin szout])>0 then
messagebox(["Warning :";
"Selected ports don''t have the same size";
"The port at the origin of the link has size " + string(szout);
typpto = 'evtin';
szin = getportsiz(o2,port_number,'evtin');
- if szin<>szout & mini([szin szout])>0 then
+ if szin<>szout & min([szin szout])>0 then
messagebox(["Warning :";
"Selected ports don''t have the same size"
"The port at the origin of the link has size " + string(szout);