Sponsored links: Algebra eBooks

? matrix_size;

Calculate

? matrix_size;

Calculate

matrix_size

Run Example
```(%i1)nrm1(x) := block([ms],ms : matrix_size(x), lmax(makelist(sum(abs(x[i, j]), i, 1,ms[1]), j, 1,ms[2])));
(%o1) nrm1(x) := block([ms], ms : matrix_size(x),
lmax(makelist(sum(!x    !, i, 1, ms ), j, 1, ms )))
! i, j!          1           2
(%i2) preob(m) := block([s], n : length(m),(s : 1, for i : 1 while ((i <
n + 1) and (2*abs(m[i, i])) >
sum(abs(m[i, j]), j, 1, n)) do s : i),if s = n then "eSTX PREOBLADANIE DIG. \L."else "nET PREOBLADANIQ DIAG. \L.");
(%o2) preob(m) := block([s], n : length(m),
(s : 1, for i while (i < n + 1) and (2 !m    ! > sum(!m    !, j, 1, n))
! i, i!       ! i, j!
do s : i), if s = n then "eSTX PREOBLADANIE DIG. L."
else "nET PREOBLADANIQ DIAG. L.")
(%i3) ```
Run Example
```x: matrix ([17, 3], [-8, 11]);
[ 17   3  ]
(%o1)                             [         ]
[ - 8  11 ]
(%i2)  y: matrix ([%pi, %e], [a, b]);
[ %pi  %e ]
(%o2)                             [         ]
[  a   b  ]
(%i3) matrix_size(x+y);
(%o3)                               [2, 2]
(%i4) ```
Run Example
```kill(all);
(%o0)                                done
(%i1) load("vect");
(%o1)           /usr/share/maxima/5.21.1/share/vector/vect.mac
(%i2) ratprint:false;
(%o2)                                false
(%i3) l:1.1;
(%o3)                                 1.1
(%i4) d1:70e-3;
(%o4)                                0.07
(%i5) p:470;
(%o5)                                 470
(%i6) M1:350;
(%o6)                                 350
(%i7) d2:90e-3;
(%o7)                                0.09
(%i8) F1:570;
(%o8)                                 570
(%i9) E:205E9;
(%o9)                              2.05E+11
(%i10) Iz1:d1^4*%pi/64;
(%o10)                     3.7515625000000009E-7 %pi
(%i11) Iz2:d2^4*%pi/64;
(%o11)                     1.0251562499999998E-6 %pi
(%i12) omega : x^2*(x-5*l);
2
(%o12)                           (x - 5.5) x
(%i13) NapprMax:8;
(%o13)                                 8
(%i14) v:makelist(0,x,0,NapprMax);
(%o14)                    [0, 0, 0, 0, 0, 0, 0, 0, 0]
(%i15) phi:makelist(0,x,0,NapprMax);
(%o15)                    [0, 0, 0, 0, 0, 0, 0, 0, 0]
(%i16) B:omega;
2
(%o16)                           (x - 5.5) x
(%i17) B1:diff(B,x);
2
(%o17)                        x  + 2 (x - 5.5) x
(%i18) B2:diff(B1,x);
(%o18)                         4 x + 2 (x - 5.5)
(%i19) S:(integrate(Iz2*E*B2*B2,x,0,3*l)+integrate(Iz1*E*B2*B2,x,3*l,5*l));
(%o19)                     6.6079512296875007E+7 %pi
(%i20) Q:bfloat(integrate(-p*B,x,0,3*l)+(-F1)*subst(x=4*l,B)+(M1)*subst(x=3*l,B1));
(%o20)                        2.789936310645724b4
(%i21) A1:Q/S;
4.222089742598878b-4
(%o21)                       --------------------
%pi
(%i22) v[1]:B*A1;
2
4.222089742598878b-4 (x - 5.5) x
(%o22)                 ---------------------------------
%pi
(%i23) phi[1]:B1*A1;
2
4.222089742598878b-4 (x  + 2 (x - 5.5) x)
(%o23)             -----------------------------------------
%pi
(%i24) for Nappr from 1 thru NapprMax do (    B:zeromatrix(Nappr+1,1),    for i from 1 thru Nappr+1 do B[i,1]:omega*x^(i-1),    Bt:transpose(B),    B1:diff(B,x),    B2:diff(B1,x),    B2t:transpose(B2),    S:(integrate(Iz2*E*B2.B2t,x,0,3*l)+integrate(Iz1*E*B2.B2t,x,3*l,5*l)),    Q:bfloat(integrate(-p*B,x,0,3*l)+(-F1)*subst(x=4*l,B)+(M1)*subst(x=3*l,B1)),    /*A1:(invert(S)).Q,*/A1:S,print(matrix_size(invert(S))),print(matrix_size(Q)),    v[Nappr+1]:Bt.A1,    phi[Nappr+1]:(transpose(B1).A1));
[2, 2]
[2, 1]
[3, 3]
[3, 1]
[4, 4]
[4, 1]
[5, 5]
[5, 1]
[6, 6]
[6, 1]
[7, 7]
[7, 1]
[8, 8]
[8, 1]
[9, 9]
[9, 1]
(%o24)                               done
(%i25) eredmeny:[subst(x=3*l,v),subst(x=3*l,phi)];
1.011528260531839b-2  [ - 2.550464779408371E+10 %pi  ]
(%o25) [[- --------------------, [                              ],
%pi           [ - 1.6293206871599591E+11 %pi ]
[ - 7.4256739728610596E+12 %pi ]
[ - 4.2339873769729858E+11 %pi ]  [                              ]
[                              ]  [ - 5.8564021470398266E+13 %pi ]
[ - 3.1409066683589746E+12 %pi ], [                              ],
[                              ]  [ - 3.8441143957898456E+14 %pi ]
[ - 1.9657651122026285E+13 %pi ]  [                              ]
[ - 2.3404841831084265E+15 %pi ]
[ - 2.447687566909924E+15 %pi  ]
[ - 1.3403889436727184E+14 %pi ]  [                              ]
[                              ]  [ - 1.9880126237379076E+16 %pi ]
[ - 1.0812503697860292E+15 %pi ]  [                              ]
[                              ]  [ - 1.364903708971379E+17 %pi  ]
[ - 7.297832216874646E+15 %pi  ], [                              ],
[                              ]  [ - 8.648859794753097E+17 %pi  ]
[ - 4.5475948200978672E+16 %pi ]  [                              ]
[                              ]  [ - 5.2445403418315295E+18 %pi ]
[ - 2.7180630079205584E+17 %pi ]  [                              ]
[ - 3.0970661171122684E+19 %pi ]
[ - 8.2100007244424704E+17 %pi ]
[ - 4.4837282970653024E+16 %pi ]  [                              ]
[                              ]  [ - 6.6726033916153395E+18 %pi ]
[  - 3.64578771494448E+17 %pi  ]  [                              ]
[                              ]  [ - 4.6694323022342152E+19 %pi ]
[ - 2.5312291789153137E+18 %pi ]  [                              ]
[                              ]  [ - 3.0247923110960313E+20 %pi ]
[ - 1.624052396624256E+19 %pi  ], [                              ],
[                              ]  [ - 1.8726354766235639E+21 %pi ]
[ - 9.9618012066040365E+19 %pi ]  [                              ]
[                              ]  [ - 1.1263226620312906E+22 %pi ]
[ - 5.941946996255819E+20 %pi  ]  [                              ]
[                              ]  [ - 6.6430383349843395E+22 %pi ]
[ - 3.479038100929523E+21 %pi  ]  [                              ]
[ - 3.8639331307906027E+23 %pi ]
[ - 1.5009210424640102E+19 %pi ]
[                              ]
[ - 1.2192308864316837E+20 %pi ]
[                              ]
[ - 8.583183390088482E+20 %pi  ]
[                              ]
[ - 5.6024432894192134E+21 %pi ]
[                              ]      1.532618576563391b-3
[ - 3.4947793549827099E+22 %pi ]], [- --------------------,
[                              ]              %pi
[ - 2.1166993780050613E+23 %pi ]
[                              ]
[ - 1.2562475729561803E+24 %pi ]
[                              ]
[ - 7.347471776296013E+24 %pi  ]
[                              ]
[ - 4.250760861490187E+25 %pi  ]
[ - 3.1254820105865271E+11 %pi ]
[ - 1.1113284465308187E+10 %pi ]  [                              ]
[                              ], [ - 2.3279047449366646E+12 %pi ],
[ - 7.1863381570771744E+10 %pi ]  [                              ]
[ - 1.4596556402552725E+13 %pi ]
[ - 1.8039359520042881E+14 %pi ]
[ - 7.7392037535050654E+12 %pi ]  [                              ]
[                              ]  [ - 1.4556822893593235E+15 %pi ]
[ - 6.1109996201644992E+13 %pi ]  [                              ]
[                              ], [ - 9.828848604108562E+15 %pi  ],
[ - 4.0145663506902356E+14 %pi ]  [                              ]
[                              ]  [ - 6.126666303249124E+16 %pi  ]
[ - 2.445575735395453E+15 %pi  ]  [                              ]
[ - 3.6627202260638451E+17 %pi ]
[ - 8.7531132329538208E+16 %pi ]
[ - 4.0364747161048475E+15 %pi ]  [                              ]
[                              ]  [ - 7.1173901909018048E+17 %pi ]
[ - 3.2787142068681056E+16 %pi ]  [                              ]
[                              ]  [ - 4.9420595197736827E+18 %pi ]
[ - 2.251497464045473E+17 %pi  ]  [                              ]
[                              ], [ - 3.1712297598182777E+19 %pi ],
[ - 1.4269500484897093E+18 %pi ]  [                              ]
[                              ]  [ - 1.945413033659623E+20 %pi  ]
[ - 8.6541620910055045E+18 %pi ]  [                              ]
[                              ]  [ - 1.1604927455206204E+21 %pi ]
[ - 5.111206371638263E+19 %pi  ]  [                              ]
[ - 6.7952644388134039E+21 %pi ]
[ - 3.839692777315278E+19 %pi  ]
[ - 1.8515374720422518E+18 %pi ]  [                              ]
[                              ]  [ - 3.1190546910669839E+20 %pi ]
[ - 1.5048158610274023E+19 %pi ]  [                              ]
[                              ]  [ - 2.1958594351897743E+21 %pi ]
[ - 1.0531272734574376E+20 %pi ]  [                              ]
[                              ]  [ - 1.4333677388266935E+22 %pi ]
[ - 6.8225481383309305E+20 %pi ]  [                              ]
[                              ], [ - 8.9417715426520956E+22 %pi ]]]
[ - 4.2241264500876069E+21 %pi ]  [                              ]
[                              ]  [ - 5.416073971203075E+23 %pi  ]
[ - 2.5408292565264535E+22 %pi ]  [                              ]
[                              ]  [ - 3.2145471435359998E+24 %pi ]
[ - 1.4986650364089038E+23 %pi ]  [                              ]
[                              ]  [ - 1.8801794830966938E+25 %pi ]
[ - 8.7174424389297528E+23 %pi ]  [                              ]
[ - 1.0877843116520715E+26 %pi ]
(%i26) eredmeny:float(eredmeny);
[ - 8.0125214142288498E+10 ]
(%o26) [[- 0.0032197944548158, [                          ],
[ - 5.1186619011236011E+11 ]
[ - 2.3328442801093238E+13 ]
[ - 1.3301463638890251E+12 ]  [                          ]
[                          ]  [ - 1.8398429961607809E+14 ]
[ - 9.867449314927748E+12  ], [                          ],
[                          ]  [ - 1.2076641545372145E+15 ]
[ - 6.175633235178893E+13  ]  [                          ]
[ - 7.352847915496541E+15  ]
[ - 7.689637278487292E+15  ]
[ - 4.210956058395195E+14  ]  [                          ]
[                          ]  [  - 6.24552585397878E+16  ]
[ - 3.3968482184110365E+15 ]  [                          ]
[                          ]  [ - 4.2879714649619456E+17 ]
[  - 2.29268160796643E+16  ], [                          ],
[                          ]  [ - 2.7171194393124454E+18 ]
[ - 1.4286690478322456E+17 ]  [                          ]
[                          ]  [ - 1.6476209409353234E+19 ]
[ - 8.5390467776774016E+17 ]  [                          ]
[ - 9.729720161201768E+19  ]
[ - 2.5792477961875343E+18 ]
[ - 1.4086047878753027E+17 ]  [                          ]
[                          ]  [ - 2.0962601795417088E+19 ]
[ - 1.1453579901817498E+18 ]  [                          ]
[                          ]  [ - 1.4669454217133885E+20 ]
[ - 7.9520909930324736E+18 ]  [                          ]
[                          ]  [ - 9.5026653031741836E+20 ]
[ - 5.1021110782796595E+19 ], [                          ],
[                          ]  [ - 5.883057856212209E+21  ]
[ - 3.129592148718918E+20  ]  [                          ]
[                          ]  [ - 3.538447000609202E+22  ]
[ - 1.866717703145722E+21  ]  [                          ]
[                          ]  [ - 2.0869720430702172E+23 ]
[ - 1.0929720539439174E+22 ]  [                          ]
[ - 1.2138903937653967E+24 ]
[ - 4.7152825206232687E+19 ]
[                          ]
[ - 3.8303267958435486E+20 ]
[                          ]
[ - 2.6964865882715912E+21 ]
[                          ]
[ - 1.7600594680192837E+22 ]
[                          ]
[ - 1.0979173147530957E+23 ]], [- 4.8784764466905649E-4,
[                          ]
[ - 6.6498072157987849E+23 ]
[                          ]
[ - 3.9466181462891437E+24 ]
[                          ]
[  - 2.30827633548699E+25  ]
[                          ]
[ - 1.3354159094624591E+26 ]
[ - 9.8189913233856897E+11 ]
[ - 3.4913412833465775E+10 ]  [                          ]
[                          ], [ - 7.3133284449498467E+12 ],
[ - 2.2576547160485663E+11 ]  [                          ]
[ - 4.5856434361968695E+13 ]
[ - 5.6672319343631812E+14 ]
[ - 2.4313425656646066E+13 ]  [                          ]
[                          ]  [ - 4.573160786212022E+15  ]
[ - 1.9198271512798806E+14 ]  [                          ]
[                          ], [ - 3.0878238567913752E+16 ],
[ - 1.261213215467723E+15  ]  [                          ]
[                          ]  [ - 1.9247489849283584E+17 ]
[ - 7.683002764115811E+15  ]  [                          ]
[ - 1.1506774954356922E+18 ]
[ - 2.7498716228687328E+17 ]
[ - 1.2680959314515934E+16 ]  [                          ]
[                          ]  [ - 2.2359940736469166E+18 ]
[ - 1.0300384465517326E+17 ]  [                          ]
[                          ]  [ - 1.5525937880924502E+19 ]
[ - 7.0732878926213069E+17 ]  [                          ]
[                          ], [ - 9.9627121162904257E+19 ],
[  - 4.48289578937487E+18  ]  [                          ]
[                          ]  [ - 6.1116952947429042E+20 ]
[ - 2.7187852048078176E+19 ]  [                          ]
[                          ]  [ - 3.6457954838718301E+21 ]
[ - 1.6057328388120107E+20 ]  [                          ]
[ - 2.1347952840176157E+22 ]
[ - 1.2062750621255467E+20 ]
[ - 5.8167765200141548E+18 ]  [                          ]
[                          ]  [ - 9.7987993036008181E+20 ]
[ - 4.727518454009086E+19  ]  [                          ]
[                          ]  [ - 6.8984958699080274E+21 ]
[ - 3.3084969055889352E+20 ]  [                          ]
[                          ]  [ - 4.5030575581905537E+22 ]
[ - 2.1433667110143171E+21 ]  [                          ]
[                          ], [ - 2.8091403788474094E+23 ]]]
[ - 1.3270484623429558E+22 ]  [                          ]
[                          ]  [ - 1.7015098199230477E+24 ]
[ - 7.9822505263295218E+22 ]  [                          ]
[                          ]  [ - 1.0098797690750751E+25 ]
[ - 4.7081950685740924E+23 ]  [                          ]
[                          ]  [ - 5.906758051526828E+25  ]
[  - 2.73866531242336E+24  ]  [                          ]
[ - 3.4173752021763777E+26 ]
(%i27) 1000*eredmeny[1];
[  - 8.01252141422885E+13  ]
(%o27) [- 3.219794454815775, [                          ],
[ - 5.1186619011236012E+14 ]
[ - 2.332844280109324E+16  ]
[ - 1.3301463638890252E+15 ]  [                          ]
[                          ]  [ - 1.8398429961607808E+17 ]
[ - 9.867449314927748E+15  ], [                          ],
[                          ]  [ - 1.2076641545372145E+18 ]
[ - 6.1756332351788928E+16 ]  [                          ]
[ - 7.3528479154965412E+18 ]
[ - 7.6896372784872919E+18 ]
[ - 4.2109560583951949E+17 ]  [                          ]
[                          ]  [ - 6.2455258539787796E+19 ]
[ - 3.3968482184110367E+18 ]  [                          ]
[                          ]  [ - 4.2879714649619458E+20 ]
[  - 2.29268160796643E+19  ], [                          ],
[                          ]  [ - 2.7171194393124452E+21 ]
[ - 1.4286690478322455E+20 ]  [                          ]
[                          ]  [ - 1.6476209409353235E+22 ]
[ - 8.5390467776774013E+20 ]  [                          ]
[ - 9.7297201612017682E+22 ]
[ - 2.5792477961875342E+21 ]
[ - 1.4086047878753028E+20 ]  [                          ]
[                          ]  [ - 2.0962601795417088E+22 ]
[ - 1.1453579901817498E+21 ]  [                          ]
[                          ]  [ - 1.4669454217133885E+23 ]
[ - 7.9520909930324736E+21 ]  [                          ]
[                          ]  [ - 9.5026653031741837E+23 ]
[ - 5.1021110782796598E+22 ], [                          ],
[                          ]  [ - 5.8830578562122089E+24 ]
[ - 3.1295921487189177E+23 ]  [                          ]
[                          ]  [ - 3.5384470006092019E+25 ]
[ - 1.8667177031457219E+24 ]  [                          ]
[                          ]  [ - 2.0869720430702172E+26 ]
[ - 1.0929720539439174E+25 ]  [                          ]
[ - 1.2138903937653967E+27 ]
[ - 4.7152825206232687E+22 ]
[                          ]
[ - 3.8303267958435486E+23 ]
[                          ]
[ - 2.6964865882715911E+24 ]
[                          ]
[ - 1.7600594680192837E+25 ]
[                          ]
[ - 1.0979173147530957E+26 ]]
[                          ]
[ - 6.6498072157987853E+26 ]
[                          ]
[ - 3.9466181462891436E+27 ]
[                          ]
[  - 2.30827633548699E+28  ]
[                          ]
[ - 1.3354159094624592E+29 ]
(%i28) float(eredmeny[2]*180/%pi);
[ - 2.0003912037554739E+12 ]
(%o28) [- 0.027951611084935, [                          ],
[ - 1.2935408682738914E+13 ]
[ - 1.3930566756309118E+15 ]
[ - 5.6258676190557484E+13 ]  [                          ]
[                          ]  [ - 1.0999799316296098E+16 ]
[ - 4.1902285408859969E+14 ], [                          ],
[                          ]  [ - 7.2262194312424256E+16 ]
[ - 2.6273801524594905E+15 ]  [                          ]
[ - 4.4020363237118157E+17 ]
[ - 7.2656544889887258E+17 ]
[ - 3.2470847136077188E+16 ]  [                          ]
[                          ]  [ - 5.9016855723625912E+18 ]
[ - 2.6202281208467824E+17 ]  [                          ]
[                          ]  [ - 4.0526954352818512E+19 ]
[ - 1.7691927487395412E+18 ], [                          ],
[                          ]  [ - 2.5685100872814769E+20 ]
[ - 1.1027999345848424E+19 ]  [                          ]
[                          ]  [ - 1.5577491763809907E+21 ]
[ - 6.5928964069149213E+19 ]  [                          ]
[ - 9.2001714689488726E+21 ]
[ - 3.3327674496760532E+20 ]
[ - 1.5755603819316877E+19 ]  [                          ]
[                          ]  [ - 2.7086685498493239E+21 ]
[ - 1.2811302343623249E+20 ]  [                          ]
[                          ]  [ - 1.8956290922233878E+22 ]
[ - 8.8957071355926282E+20 ]  [                          ]
[                          ]  [ - 1.2280586648995676E+23 ]
[ - 5.7082135676728996E+21 ], [                          ],
[                          ]  [ - 7.603427610157693E+23  ]
[ - 3.5017434605873214E+22 ]  [                          ]
[                          ]  [ - 4.5734926617476165E+24 ]
[ - 2.0888869419371167E+23 ]  [                          ]
[                          ]  [ - 2.6975970655360274E+25 ]
[ - 1.2231475989864127E+24 ]  [                          ]
[ - 1.5691396390073554E+26 ]
[ - 6.9114469991675006E+21 ]
[                          ]
[ - 5.6142984439205705E+22 ]
[                          ]
[ - 3.9525469833415934E+23 ]
[                          ]
[ - 2.5800619298880484E+24 ]
[                          ]
[ - 1.6095188776773772E+25 ]]
[                          ]
[ - 9.7489331481655355E+25 ]
[                          ]
[ - 5.7861848583647994E+26 ]
[                          ]
[ - 3.3843230695740493E+27 ]
[                          ]
[ - 1.9580117609737287E+28 ]
(%i29) ```

Related Help

Help for Matrix_size