Sponsored links: Algebra eBooks
 

Related

[abs,define,float,matrix,plot2d,ratsimp,transpose]

Run Example
(%i1)k1:8.86e8;
(%o1)                               8.86E+8
(%i2) k2:1.709e6;
(%o2)                              1709000.0
(%i3) k3:1.0132e3;
(%o3)                               1013.2
(%i4) m1:942.576;
(%o4)                               942.576
(%i5) m2:884.472;
(%o5)                               884.472
(%i6) m3:354.917;
(%o6)                               354.917
(%i7) a:-(k1+k2+k3)/m1;
(%o7)                         - 941791.4451460679
(%i8) b:k2/m1;
(%o8)                          1813.116395919268
(%i9) c:k3/m1;
(%o9)                          1.07492658416934
(%i10) d:k2/m2;
(%o10)                         1932.226232147541
(%i11) e:-k2/m2;
(%o11)                        - 1932.226232147541
(%i12) f:0;
(%o12)                                 0
(%i13) g:k3/m3;
(%o13)                         2.854751956091143
(%i14) h:0;
(%o14)                                 0
(%i15) i:-k3/m3;
(%o15)                        - 2.854751956091143
(%i16) A:matrix([a,b,c],[d,e,f],[g,h,i]);
       [ - 941791.4451460679   1813.116395919268    1.07492658416934   ]
       [                                                               ]
(%o16) [  1932.226232147541   - 1932.226232147541           0          ]
       [                                                               ]
       [  2.854751956091143            0           - 2.854751956091143 ]
(%i17) B:transpose(matrix([k1/m1,0,0]));
                             [ 939977.2538235644 ]
                             [                   ]
(%o17)                       [         0         ]
                             [                   ]
                             [         0         ]
(%i18) s2I:matrix([s^^2,0,0],[0,s^^2,0],[0,0,s^^2]);
                             [  <2>             ]
                             [ s      0     0   ]
                             [                  ]
(%o18)                       [        <2>       ]
                             [  0    s      0   ]
                             [                  ]
                             [              <2> ]
                             [  0     0    s    ]
(%i19) A2:s2I - A;
                [  <2>                     ]
                [ s    + 941791.4451460679 ]
(%o19)  Col 1 = [                          ]
                [   - 1932.226232147541    ]
                [                          ]
                [   - 2.854751956091143    ]
              [   - 1813.116395919268    ]         [    - 1.07492658416934    ]
              [                          ]         [                          ]
      Col 2 = [  <2>                     ] Col 3 = [            0             ]
              [ s    + 1932.226232147541 ]         [                          ]
              [                          ]         [  <2>                     ]
              [            0             ]         [ s    + 2.854751956091143 ]
(%i20) C:matrix([0,s^^2,0]);
(%o20)                          [     <2>    ]
                                [ 0  s     0 ]
(%i21) C.(A2^^-1).B;

rat: replaced 941791.4451460679 by 8476123/9 = 941791.4444444445

rat: replaced -1813.11639591927 by -342679/189 = -1813.1164021164

rat: replaced -1.07492658416934 by -11348/10557 = -1.07492658899309

rat: replaced -1932.22623214754 by -427022/221 = -1932.22624434389

rat: replaced 1932.226232147541 by 427022/221 = 1932.226244343892

rat: replaced -2.85475195609114 by -4776/1673 = -2.85475194261805

rat: replaced 2.854751956091143 by 4776/1673 = 2.854751942618051
                           <2>                  <2>
(%o21) (939977.2538235644 s    (52794022455594 s    + 150713838163728))
                <2> 3                       <2> 2                         <2>
/(27322898967 (s   )  + 25785344507095047 (s   )  + 49698847414245761144 s
 + 141667579603671086016)
(%i22) g(s):=(s^^2)*(939977.2538235644*(52794022455594*s^^2 + 150713838163728)) /(27322898967 *s^^6 + 25785344507095047*s^^4 + 49698847414245761144*s^^2 + 141667579603671086016);
                 <2>                                     <2>
(%o22) g(s) := (s    (939977.2538235644 (52794022455594 s
                                    <6>                      <4>
 + 150713838163728)))/(27322898967 s    + 25785344507095047 s
                         <2>
 + 49698847414245761144 s    + 141667579603671086016)
(%i23) define(gain(w), ratsimp(abs(g(%i*w))));

rat: replaced 939977.2538235644 by 3759909/4 = 939977.25
                           ! <2>! !                <2>                  !
(%o23) gain(w) := (3759909 !w   ! !52794022455594 w    - 150713838163728!)
                     <6>                      <4>                         <2>
/(4 abs(27322898967 w    - 25785344507095047 w    + 49698847414245761144 w
 - 141667579603671086016))
(%i24) float(gain(0.27*3.14*2));
(%o24)                         2.878894655122825
(%i25) float(gain(7*6.28));
(%o25)                         937627.4673307502
(%i26) float(gain(0.628));
(%o26)                         0.39446490544059
(%i27) g2(s):=(s^^2)*(k2/m2)/(s^^2+k2/m2);
                                        <2>  k2
                                       s    (--)
                                             m2
(%o27)                        g2(s) := ---------
                                        <2>   k2
                                       s    + --
                                              m2
(%i28) define(gain2(w), ratsimp(abs(g2(%i*w))));

rat: replaced -1932.22623214754 by -427022/221 = -1932.22624434389

rat: replaced 1932.226232147541 by 427022/221 = 1932.226244343892
                                              ! <2>!
                                       427022 !w   !
(%o28)                  gain2(w) := -------------------
                                    !     <2>         !
                                    !221 w    - 427022!
(%i29) plot2d([gain(w),gain2(w)],[w,30,60]);
plotplot2d([gain(w),gain2(w)],[w,30,60]);
Run Example
k1:8.86e8;
(%o1)                               8.86E+8
(%i2) k2:1.709e6;
(%o2)                              1709000.0
(%i3) k3:1.0132e3;
(%o3)                               1013.2
(%i4) m1:942.576;
(%o4)                               942.576
(%i5) m2:884.472;
(%o5)                               884.472
(%i6) m3:354.917;
(%o6)                               354.917
(%i7) a:-(k1+k2+k3)/m1;
(%o7)                         - 941791.4451460679
(%i8) b:k2/m1;
(%o8)                          1813.116395919268
(%i9) c:k3/m1;
(%o9)                          1.07492658416934
(%i10) d:k2/m2;
(%o10)                         1932.226232147541
(%i11) e:-k2/m2;
(%o11)                        - 1932.226232147541
(%i12) f:0;
(%o12)                                 0
(%i13) g:k3/m3;
(%o13)                         2.854751956091143
(%i14) h:0;
(%o14)                                 0
(%i15) i:-k3/m3;
(%o15)                        - 2.854751956091143
(%i16) A:matrix([a,b,c],[d,e,f],[g,h,i]);
       [ - 941791.4451460679   1813.116395919268    1.07492658416934   ]
       [                                                               ]
(%o16) [  1932.226232147541   - 1932.226232147541           0          ]
       [                                                               ]
       [  2.854751956091143            0           - 2.854751956091143 ]
(%i17) B:transpose(matrix([k1/m1,0,0]));
                             [ 939977.2538235644 ]
                             [                   ]
(%o17)                       [         0         ]
                             [                   ]
                             [         0         ]
(%i18) s2I:matrix([s^^2,0,0],[0,s^^2,0],[0,0,s^^2]);
                             [  <2>             ]
                             [ s      0     0   ]
                             [                  ]
(%o18)                       [        <2>       ]
                             [  0    s      0   ]
                             [                  ]
                             [              <2> ]
                             [  0     0    s    ]
(%i19) A2:s2I - A;
                [  <2>                     ]
                [ s    + 941791.4451460679 ]
(%o19)  Col 1 = [                          ]
                [   - 1932.226232147541    ]
                [                          ]
                [   - 2.854751956091143    ]
              [   - 1813.116395919268    ]         [    - 1.07492658416934    ]
              [                          ]         [                          ]
      Col 2 = [  <2>                     ] Col 3 = [            0             ]
              [ s    + 1932.226232147541 ]         [                          ]
              [                          ]         [  <2>                     ]
              [            0             ]         [ s    + 2.854751956091143 ]
(%i20) C:matrix([0,s^^2,0]);
(%o20)                          [     <2>    ]
                                [ 0  s     0 ]
(%i21) C.(A2^^-1).B;

rat: replaced 941791.4451460679 by 8476123/9 = 941791.4444444445

rat: replaced -1813.11639591927 by -342679/189 = -1813.1164021164

rat: replaced -1.07492658416934 by -11348/10557 = -1.07492658899309

rat: replaced -1932.22623214754 by -427022/221 = -1932.22624434389

rat: replaced 1932.226232147541 by 427022/221 = 1932.226244343892

rat: replaced -2.85475195609114 by -4776/1673 = -2.85475194261805

rat: replaced 2.854751956091143 by 4776/1673 = 2.854751942618051
                           <2>                  <2>
(%o21) (939977.2538235644 s    (52794022455594 s    + 150713838163728))
                <2> 3                       <2> 2                         <2>
/(27322898967 (s   )  + 25785344507095047 (s   )  + 49698847414245761144 s
 + 141667579603671086016)
(%i22) g(s):=(s^^2)*(939977.2538235644*(52794022455594*s^^2 + 150713838163728)) /(27322898967 *s^^6 + 25785344507095047*s^^4 + 49698847414245761144*s^^2 + 141667579603671086016);
                 <2>                                     <2>
(%o22) g(s) := (s    (939977.2538235644 (52794022455594 s
                                    <6>                      <4>
 + 150713838163728)))/(27322898967 s    + 25785344507095047 s
                         <2>
 + 49698847414245761144 s    + 141667579603671086016)
(%i23) define(gain(w), ratsimp(abs(g(%i*w))));

rat: replaced 939977.2538235644 by 3759909/4 = 939977.25
                           ! <2>! !                <2>                  !
(%o23) gain(w) := (3759909 !w   ! !52794022455594 w    - 150713838163728!)
                     <6>                      <4>                         <2>
/(4 abs(27322898967 w    - 25785344507095047 w    + 49698847414245761144 w
 - 141667579603671086016))
(%i24) float(gain(0.27*3.14*2));
(%o24)                         2.878894655122825
(%i25) float(gain(7*6.28));
(%o25)                         937627.4673307502
(%i26) float(gain(0.628));
(%o26)                         0.39446490544059
(%i27) g2(s):=(s^^2)*(k2/m2)/(s^^2+k2/m2);
                                        <2>  k2
                                       s    (--)
                                             m2
(%o27)                        g2(s) := ---------
                                        <2>   k2
                                       s    + --
                                              m2
(%i28) define(gain2(w), ratsimp(abs(g2(%i*w))));

rat: replaced -1932.22623214754 by -427022/221 = -1932.22624434389

rat: replaced 1932.226232147541 by 427022/221 = 1932.226244343892
                                              ! <2>!
                                       427022 !w   !
(%o28)                  gain2(w) := -------------------
                                    !     <2>         !
                                    !221 w    - 427022!
(%i29) plot2d([gain(w),gain2(w)],[w,42,45],[y,1e5,1e6],[nticks,50]);
plotplot2d([gain(w),gain2(w)],[w,42,45],[y,1e5,1e6],[nticks,50]);3.14159*2.0*7.0;
(%o30)                             43.98226
(%i31) 
Run Example
k1:8.86e8;
(%o1)                               8.86E+8
(%i2) k2:1.709e6;
(%o2)                              1709000.0
(%i3) k3:1.0132e3;
(%o3)                               1013.2
(%i4) m1:942.576;
(%o4)                               942.576
(%i5) m2:884.472;
(%o5)                               884.472
(%i6) m3:354.917;
(%o6)                               354.917
(%i7) a:-(k1+k2+k3)/m1;
(%o7)                         - 941791.4451460679
(%i8) b:k2/m1;
(%o8)                          1813.116395919268
(%i9) c:k3/m1;
(%o9)                          1.07492658416934
(%i10) d:k2/m2;
(%o10)                         1932.226232147541
(%i11) e:-k2/m2;
(%o11)                        - 1932.226232147541
(%i12) f:0;
(%o12)                                 0
(%i13) g:k3/m3;
(%o13)                         2.854751956091143
(%i14) h:0;
(%o14)                                 0
(%i15) i:-k3/m3;
(%o15)                        - 2.854751956091143
(%i16) A:matrix([a,b,c],[d,e,f],[g,h,i]);
       [ - 941791.4451460679   1813.116395919268    1.07492658416934   ]
       [                                                               ]
(%o16) [  1932.226232147541   - 1932.226232147541           0          ]
       [                                                               ]
       [  2.854751956091143            0           - 2.854751956091143 ]
(%i17) B:transpose(matrix([k1/m1,0,0]));
                             [ 939977.2538235644 ]
                             [                   ]
(%o17)                       [         0         ]
                             [                   ]
                             [         0         ]
(%i18) s2I:matrix([s^^2,0,0],[0,s^^2,0],[0,0,s^^2]);
                             [  <2>             ]
                             [ s      0     0   ]
                             [                  ]
(%o18)                       [        <2>       ]
                             [  0    s      0   ]
                             [                  ]
                             [              <2> ]
                             [  0     0    s    ]
(%i19) A2:s2I - A;
                [  <2>                     ]
                [ s    + 941791.4451460679 ]
(%o19)  Col 1 = [                          ]
                [   - 1932.226232147541    ]
                [                          ]
                [   - 2.854751956091143    ]
              [   - 1813.116395919268    ]         [    - 1.07492658416934    ]
              [                          ]         [                          ]
      Col 2 = [  <2>                     ] Col 3 = [            0             ]
              [ s    + 1932.226232147541 ]         [                          ]
              [                          ]         [  <2>                     ]
              [            0             ]         [ s    + 2.854751956091143 ]
(%i20) C:matrix([0,1,0]);
(%o20)                            [ 0  1  0 ]
(%i21) C.(A2^^-1).B;

rat: replaced 941791.4451460679 by 8476123/9 = 941791.4444444445

rat: replaced -1813.11639591927 by -342679/189 = -1813.1164021164

rat: replaced -1.07492658416934 by -11348/10557 = -1.07492658899309

rat: replaced -1932.22623214754 by -427022/221 = -1932.22624434389

rat: replaced 1932.226232147541 by 427022/221 = 1932.226244343892

rat: replaced -2.85475195609114 by -4776/1673 = -2.85475194261805

rat: replaced 2.854751956091143 by 4776/1673 = 2.854751942618051
                                           <2>
(%o21) (939977.2538235644 (52794022455594 s    + 150713838163728))
                <2> 3                       <2> 2                         <2>
/(27322898967 (s   )  + 25785344507095047 (s   )  + 49698847414245761144 s
 + 141667579603671086016)
(%i22) g(s):=(939977.2538235644*(52794022455594*s^^2 + 150713838163728)) /(27322898967 *s^^6 + 25785344507095047*s^^4 + 49698847414245761144*s^^2 + 141667579603671086016);
                                                   <2>
(%o22) g(s) := (939977.2538235644 (52794022455594 s    + 150713838163728))
               <6>                      <4>                         <2>
/(27322898967 s    + 25785344507095047 s    + 49698847414245761144 s
 + 141667579603671086016)
(%i23) define(gain(w), ratsimp(abs(g(%i*w))));

rat: replaced 939977.2538235644 by 3759909/4 = 939977.25
                           !                <2>                  !
(%o23) gain(w) := (3759909 !52794022455594 w    - 150713838163728!)
                     <6>                      <4>                         <2>
/(4 abs(27322898967 w    - 25785344507095047 w    + 49698847414245761144 w
 - 141667579603671086016))
(%i24) float(gain(0.27*3.14*2));
(%o24)                          1.0013339881521
(%i25) float(gain(7*6.28));
(%o25)                         485.1934773043894
(%i26) float(gain(0.628));
(%o26)                         1.000205143820726
(%i27) g2(s):=(k2/m2)/(s^^2+k2/m2);
                                          k2
                                          --
                                          m2
(%o27)                        g2(s) := ---------
                                        <2>   k2
                                       s    + --
                                              m2
(%i28) define(gain2(w), ratsimp(abs(g2(%i*w))));

rat: replaced -1932.22623214754 by -427022/221 = -1932.22624434389

rat: replaced 1932.226232147541 by 427022/221 = 1932.226244343892
                                          427022
(%o28)                  gain2(w) := -------------------
                                    !     <2>         !
                                    !221 w    - 427022!
(%i29) plot2d([gain(w),gain2(w)],[w,30,60],[y,2,4]);
plotplot2d([gain(w),gain2(w)],[w,30,60],[y,2,4]);
[abs,acos,asin,atan2,expand,float,linsolve,matrix,pi,rhs,sqrt,time] [abs,acos,asin,expand,float,linsolve,matrix,pi,rhs,sqrt,time] [abs,carg,float,invert,matrix,polarform,ratsimp,rectform] [abs,define,diff,expand,find_root,float,plot2d,realroots] [abs,define,diff,expand,find_root,float,realroots] [abs,define,diff,find_root,float,pi,plot2d] [abs,define,diff,find_root,float,realroots] [abs,define,diff,float,pi,plot2d] [abs,define,diff,float,pi] [abs,define,diff,float] [abs,define,find_root,float,realroots] [abs,define,find_root,plot2d,realroots] [abs,define,find_root,plot2d] [abs,define,float,matrix,plot2d,ratsimp,transpose] [abs,define,float,plot2d,realroots] [abs,define,float,realroots] [abs,define,float] [abs,define,plot2d,realroots] [abs,define,plot2d] [abs,display2d,factor,false,float,plot2d,sqrt] [abs,exp,float,plot2d] [abs,float,plot2d] [abs,floor,fullmap,matrix,mod,numer,transpose] [abs,floor,matrix,mod,numer,simp,transpose] [abs,log,matrix,plot2d,ratsimp] [args,asin,atan2,block,cos,flatten,float,ident,length,make_random_state,makelist,matrix,set_random_state,sin,sqrt,subst,transpose] [args,asin,atan2,block,cos,flatten,float,ident,length,make_random_state,makelist,matrix,set_random_state,sin,sqrt,transpose] [asin,float,ident,mat_norm,matrix,sqrt,transpose] [atan2,collectterms,cos,expand,factor,float,log,plot2d,ratsimp,sin,solve,tan,trigexpand] [cos,define,diff,expand,find_root,float,log,plot2d] [cos,define,diff,expand,float,log,plot2d] [cos,define,diff,find_root,float,plot2d,sqrt] [cos,define,diff,float,plot2d,sqrt] [create_list,ev,float,length,load,matrix,plot2d] [define,diff,expand,find_root,float,plot2d,realroots] [define,diff,expand,float,plot2d,realroots] [define,diff,expand,float,plot2d,sin] [define,diff,float,plot2d,realroots] [define,exp,float,imagpart,integrate,plot2d,ratsimp,subst] [define,expand,float,plot2d,realroots] [define,float,pi,plot2d,realroots] [define,float,pi,plot2d] [define,float,plot2d,realroots] [define,float,plot2d] [determinant,float,invert,matrix,transpose] [eigenvalues,eigenvectors,load,matrix,ratsimp,sqrt,transpose] [expand,float,invert,matrix,pi,plot2d,realpart,rhs,solve,transpose] [float,invert,matrix,transpose] [float,kill,load,matrix,sqrt,transpose] [matrix,ratsimp,transpose]

Related Help

Help for Abs

Help for Define

Help for Float

Help for Matrix

Help for Plot2d

Help for Ratsimp

Help for Transpose