On Mon, 11 May 2009, Sebastiano Putoto wrote: > Dear Gretl users, > > I know my question may seem (it actually is) very banal, but I can't figure > out a way to check if two matrices are equal. > > The point is verifying idempotence and symmetry for an orthogonal projector. > The mathematical proof isn't required here: the point is showing that the > actual calculated > matrices are orthogonal projectors and therefore have the specified > properties; I got to show the numbers are the same. And apart from arbitrary > extraction of submatrices to > prove they get out same, I can't think of anything 'scientific'. > > Hope you will be able to help me with the matter. > > Regards, >
How about check = sumc(sumr(abs(mat1-mat2))) < 1.0e-07 or something similar? Riccardo (Jack) Lucchetti Dipartimento di Economia Università Politecnica delle Marche r.lucchetti(a)univpm.it http://www.econ.univpm.it/lucchetti