#1




large matrix calculation
Hello,
I use MATLAB for computing and I have to handle the matrices in the order of thousands. I try to do my computations using full matrices but the program can not solve, the inversion for example. So that I need an algorithm that enables to calculate only one value of a large matrix, for example (3,5) of a (2000X2000) matrix. The calculations include both +,,*,inverse,/,\. Can anyone have ever dealed with such large matrices. Thank you. Sertaç 
#2




Dear Sertac, you wrote
>I use MATLAB for computing and I have to handle the matrices in the order of >thousands. I try to do my computations using full matrices but the program can not >solve, the inversion for example. So that I need an algorithm that enables to calculate >only one value of a large matrix, for example (3,5) of a (2000X2000) matrix. The >calculations include both +,,*,inverse,/,\. > >Can anyone have ever dealed with such large matrices. > >Thank you. It is hard to believe that you really need so large dense matrices. And it is hard to believe that you really need to compute the inverse of so large matrices. Basically dense matrices larger than...say 100x100 are difficult to "manage". Increasing the matrix dimension the time required to compute the inverse will be not acceptable, the roundoff error becomes important and with large n the memory required to store the matrix will be not available. For example solving Ax=b (liner system) requires O(n**3) floating point multiplication and O(n**2) memory locations. In addition to solve that system the inverse matrix is not required, at all. Basically large matrices are sparse, i.e. a lot of element are equal to zero or very close to zero. In that case there are more intelligent algorithms and storage schemes. Using the sparse property you can try to use only O(n) operation and memory locations . Unfortunately the product of two sparse matrices (with a small sparsity coefficient) can be not sparse (i.e. the final matrix is dense). Which is your problem? Homework? Just curiosity? In most cases large matrices are used in discretization of partial differential equations, I don't think you are working on that problem. Usually people working on numerical PDE solution know very well the issue. My final, humble, suggestion is to study some NA textbook book You can start with NR (chapter 2) reading the material about sparse linear system. Hope this helps Max 
#3




Dear Max,
I need to calculate in MATLAB sert=1; for ww=0:0.1:100 fun=MStiffnessww^2*MMass; burc=(Stiffnessww^2*Mass+i*ww*Damping)\I; alpha=(I+burc*fun)\burc; oto(sert)=burc(r1,r2); bus(sert)=alpha(r1,r2); sert=sert+1; end Stiffness, Mass, Damping, MMass and MStiffness are all large matrices stored as sparse matrices but I need only one of the element of resultant matrix. By the way I is identity matrix. This is about my thesis, structural modification. I could not find a solution for a long time. Thank you. Sertaç 
#4




MatrixMultiplicationOrderProblem
Quote:
Hello Comrade In order to detrmine the best order in which to to carry out matrix multiplication algorithm.we use ordinary algorithmThus to multiply p*q matrix & q*r matrix we do pqr elementwise multiplication There are two observations to be made. one we get the same rresult no matter in which order the multiplications are done,since it is associative:ie A(BC)=(AB)C Second the order can make a big difference in the amount of work done(ie its cost) Contextualy the following algorithm I tried in C++ may please be reviewed for the concept comprehension. Quote:

Thread Tools  
Display Modes  

