Sponsored links: Algebra eBooks
 

Help Index

A

B

C

D

E

F

G

H

I

J

K

L

M

N

O

P

Q

R

S

T

U

V

W

X

Y

Z

The Maxima on-line user's manual

Algebra Calculator

Search:

Sublist Calculator

Sublist

Function: sublist (<list>, <p>) Returns the list of elements of <list> for which the predicate p returns true.

fpprintprec: 2;
declare(Vgs,real);
assume(Vgs<0,Vgs>Vp);
e1: id = idss*(1-Vgs/Vp)^2;
e2: id = (Vg-Vgs)/Rs;
e3: solve(eliminate([e1,e2],[id]),Rs);
e4: solve(e1,Vgs);
[ idss, Vp, Vg ]: [10e-03,-2.2,0];
vgslst: map(rhs,ev(e4,id=idss/2));
vgslst: sublist(vgslst,lambda([x],is(x>Vp) and is(x<0)));
vgsq: first(vgslst);
c1: e3,Vgs=vgsq;
ev(e2,[Rs=560]);
ev([e1,e2],c1);
p:append( [ev(e2,[Rs=560])], ev([e1,e2],c1) );
plot2d(map(rhs,p),[Vgs,Vp,0],[legend,"Rs=560","Id","Rs=optimal"]);

Example:

          (%i1) L: [1, 2, 3, 4, 5, 6];
          (%o1)                  [1, 2, 3, 4, 5, 6]
          (%i2) sublist (L, evenp);
          (%o2)                       [2, 4, 6]

There are also some inexact matches for sublist. Try ?? sublist to see them.

(%o1)                                true
(%i2) 

Sublist Example

Related Examples