matrix inversion in Ubuntu 14.04

  • Andres Cimino

    Andres Cimino - 2014-08-27

    I've just updated my ubuntu to the latest long term support version, and when I ran the following script in wxmaxima it kept calculating forever when it reached the inversion of the matrix l. Ubuntu 14.04 comes with wxmaxima 13.04.2, I tried reinstalling it from the software center

    l3: matrix([0,-alpha_scs,-alpha_fcfbeta_ysbx,-alpha_fcfbeta_zsbx,-alpha_fabeta_y/sqrt(rho),-alpha_fa*beta_z/sqrt(rho),alpha_s/rho]);
    l5: matrix([0,alpha_scs,alpha_fcfbeta_ysbx,alpha_fcfbeta_zsbx,-alpha_fabeta_y/sqrt(rho),-alpha_fa*beta_z/sqrt(rho),alpha_s/rho]);
    l4:matrix([1, 0,0,0,0,0,-1/a^2]);
    l6:matrix([0, 0,beta_z,-beta_y,-beta_zsbx/sqrt(rho),beta_ysbx/sqrt(rho),0]);
    l2:matrix([0, 0,-beta_z,beta_y,-beta_zsbx/sqrt(rho),beta_ysbx/sqrt(rho),0]);
    l: matrix(
    [l1[1,1] ,l1[1,2], l1[1,3], l1[1,4],l1[1,5],l1[1,6],l1[1,7]],
    [l2[1,1] ,l2[1,2], l2[1,3], l2[1,4],l2[1,5],l2[1,6],l2[1,7]],
    [l3[1,1] ,l3[1,2], l3[1,3], l3[1,4],l3[1,5],l3[1,6],l3[1,7]],
    [l4[1,1] ,l4[1,2], l4[1,3], l4[1,4],l4[1,5],l4[1,6],l4[1,7]],
    [l5[1,1] ,l5[1,2], l5[1,3], l5[1,4],l5[1,5],l5[1,6],l5[1,7]],
    [l6[1,1], l6[1,2], l6[1,3], l6[1,4],l6[1,5],l6[1,6],l6[1,7]],
    [l7[1,1] ,l7[1,2], l7[1,3], l7[1,4],l7[1,5],l7[1,6],l7[1,7]]


    I also tested this script in another computer with older versions of ubuntu and wxmaxima, and it worked well.
    Does anyone know what happened? thanks!

  • Andrej Vodopivec

    There were some changes in matrix inversion functions in recent versions of maxima. Maybe you need to change the call to invert with invert_by_adjoin.

  • Andres Cimino

    Andres Cimino - 2015-06-08

    Thanks! Sorry for the late reply. I ended up doing 1/determinant(l)*adjoint(l), and it worked. Also, it took less time to run


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks