Thank you very much Mr Lucchetti. Mr Cottrell also replied and suggested another way, using

scalar meq = (m1=m2) with values 1 if right, NA if wrong.

I'll be checking with both, then.

Thank you very much!


2009/5/11 Riccardo (Jack) Lucchetti <r.lucchetti@univpm.it>
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@univpm.it
http://www.econ.univpm.it/lucchetti
_______________________________________________
Gretl-users mailing list
Gretl-users@lists.wfu.edu
http://lists.wfu.edu/mailman/listinfo/gretl-users



--
Cordiali saluti/Salutations/Best Regards

Sebastiano Putoto