Sponsored links: Algebra eBooks
 

Related

sublist

Run Example
(%i1)sublist([[1,2],[3,3]], lambda([x], first(x)!=second(x)));
(%o1)                                 []
(%i2) 
Run Example
fpprintprec: 2;
(%o1)                                  2
(%i2) declare(Vgs,real);
(%o2)                                done
(%i3) assume(Vgs<
0,Vgs>
Vp);
(%o3)                         [Vgs < 0, Vgs > Vp]
(%i4) e1: id = idss*(1-Vgs/Vp)^2;
                                            Vgs 2
(%o4)                        id = idss (1 - ---)
                                            Vp
(%i5) e2: id = (Vg-Vgs)/Rs;
                                      Vg - Vgs
(%o5)                            id = --------
                                         Rs
(%i6) e3: solve(eliminate([e1,e2],[id]),Rs);
                                                 2
                                    (Vgs - Vg) Vp
(%o6)            [Rs = - ------------------------------------]
                                2                           2
                         idss Vp  - 2 idss Vgs Vp + idss Vgs
(%i7) e4: solve(e1,Vgs);
               sqrt(id idss) Vp - idss Vp        sqrt(id idss) Vp + idss Vp
(%o7) [Vgs = - --------------------------, Vgs = --------------------------]
                          idss                              idss
(%i8) [ idss, Vp, Vg ]: [10e-03,-2.2,0];
(%o8)                          [0.01, - 2.2, 0]
(%i9) vgslst: map(rhs,ev(e4,id=idss/2));
(%o9)                           [- 0.6, - 3.8]
(%i10) vgslst: sublist(vgslst,lambda([x],is(x>
Vp) and is(x<
0)));
(%o10)                              [- 0.6]
(%i11) vgsq: first(vgslst);
(%o11)                               - 0.6
(%i12) c1: e3,Vgs=vgsq;
(%o12)                            [Rs = 130.]
(%i13) ev(e2,[Rs=560]);
                                         Vgs
(%o13)                            id = - ---
                                         560
(%i14) ev([e1,e2],c1);
                                         2
(%o14)           [id = 0.01 (0.5 Vgs + 1) , id = - 0.008 Vgs]
(%i15) p:append( [ev(e2,[Rs=560])], ev([e1,e2],c1) );
                   Vgs                         2
(%o15)     [id = - ---, id = 0.01 (0.5 Vgs + 1) , id = - 0.008 Vgs]
                   560
(%i16) plot2d(map(rhs,p),[Vgs,Vp,0],[legend,"Rs=560","Id","Rs=optimal"]);
plotplot2d(map(rhs,p),[Vgs,Vp,0],[legend,"Rs=560","Id","Rs=optimal"]);
Run Example
L: [1, 7, 2, 9];
(%o1)                            [1, 7, 2, 9]
(%i2)  sublist (L, evenp);
(%o2)                                 [2]
(%i3) 

Related Help

Help for Sublist