Prev: actxcontrol
Next: Image which retains size on axes zoom
From: Andres R Rovira on 13 May 2010 07:13 I am solving the eigenvalue problem for a vibration analysis for a damped system. I construct the matrices [A] = [CG,MG;MG,0] and [B] = [KG,0;0,-MG], being all the submatrices sparse, and MG and KG the mass and stiffness matrices coming from a FEM model. The damping matrix CG is also 0. The dimension of these matrices is 3000x3000 I call the eigs command to calculate 10 values with this options options.tol=1e-200;options.issym=1;options.isreal=1; [V,D]=eigs(B,-A,10,0,options); The program does not return an error, but the result is not precise. Recalling the same program, each time it returns a different solution. Do you know how to solve this problem? Thank you in advance. Andres R.
From: John D'Errico on 13 May 2010 08:00 "Andres R Rovira" <anrocar(a)gmail.com> wrote in message <hsgms0$ccn$1(a)fred.mathworks.com>... > > I am solving the eigenvalue problem for a vibration analysis for a damped system. I construct the matrices [A] = [CG,MG;MG,0] and [B] = [KG,0;0,-MG], being all the submatrices sparse, and MG and KG the mass and stiffness matrices coming from a FEM model. The damping matrix CG is also 0. The dimension of these matrices is 3000x3000 > > I call the eigs command to calculate 10 values with this options eig can solve the problem. It is not too large to compute at all. > options.tol=1e-200;options.issym=1;options.isreal=1; Why do people do this? Setting a tolerance of 1e-200 is silly. You are working in double precision here. 16 digits of floating point precision is all you have. So to set a tolerance that small is meaningless. When you set the tolerance that low, it is the mathematical equivalent of your boss demanding that you do something that is theoretically impossible, then insisting that you try harder when you have done everything conceivably possible. Feel free to demand as loudly as you wish, but eigs cannot give you what you ask to do. > [V,D]=eigs(B,-A,10,0,options); > > The program does not return an error, but the result is not precise. Recalling the same program, each time it returns a different solution. > Since eigs uses a random start point, what do you expect? > Do you know how to solve this problem? 1. Don't use eigs. Use eig instead. or ... 2. Learn to accept a result that will vary with the start point. or ... 3. Read the help for eigs, and see how to provide a fixed starting vector. John
|
Pages: 1 Prev: actxcontrol Next: Image which retains size on axes zoom |