[Scilab-users] advices in optimizing matrix calculations

Paul Carrico paul.carrico at free.fr
Mon Sep 24 22:46:53 CEST 2012


Dear all,

 

 

May I ask some advice in matrix calculation issue, in order to optimize the
code ?

 

The matrix hereafter is the first trial in treating a (m x 6) matrix where :

-          The first line is the upper part of a symmetrical 6x6 tensor (the
3 first components are the diagonal terms)

-          m may correspond to millions of lines

-          (each line is independent from the other)

 

I had a look in some function (such as schur, spec, bdiag and so on) in
order to see if I can use this symmetrical specificity 
 but I don’t see
anything è Am I wrong ?

 

Several calculations will be done: Eigen values calculation for each
submatrix, summation, multiplication and so on 


 

Vectorization can be useful to improve speedup ?

 

Any advices ?

 

Thanks in advance

 

Paul

 

PS : M is made from a text file 
 its structure can be change in order to be
as efficient as possible 


 

Mat = [

    9.315        9.315        28.41  - 0.0000999  - 3.169      - 3.169     ;

    2.945        2.945        28.45    0.04826    - 3.175      - 3.175
;
    8.486        9.341        25.73    0.0101     - 3.179      - 3.189
;
    2.043        2.939        25.73    0.038      - 3.185      - 3.182
;
    9.341        8.486        25.73    0.0101     - 3.189      - 3.179
;
    2.939        2.043        25.73    0.038      - 3.182      - 3.185
;
    8.492        8.492        23.      0.02036    - 3.179      - 3.179
;
    2.018        2.018        22.97    0.02779    - 3.172      - 3.172     ;
    9.108        8.179        25.01    0.01326    - 3.197      - 1.608     ;
    4.695        2.302        25.04    0.0905     - 3.199      - 1.61
;
    8.271        8.186        22.27    0.02824    - 3.212      - 1.601     ;

    3.842        2.302        22.29    0.07548    - 3.214      - 1.599     ;

    9.134        8.128        24.91    0.01554    - 3.278      - 1.61      ;

    4.675        2.145        24.9     0.08819    - 3.276      - 1.612     ;


    


    
   
    8.291        8.129        22.16    0.03055    - 3.263      - 1.598  ] ;

    sub11        sub22       sub33    sub12        sub23       sub13 
 where
sub is a submatrix == 1 line

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20120924/24af536a/attachment.htm>


More information about the users mailing list