SVD and RREF don't give same result

Hi All,
I am having a problem with SVD. The function rref works fine for solving a set of overdefined linear equations AX=b; but I am having a trouble to get the same result using SVD.
For rref, i was using the synatx solution=rref([A,b]) and it gave correct result
For SVD, i was using the syntax [u, s, v]=svd(A,0) and then solution=v*((u'*b)./diag(s))
However, the solutions are completely different. What should I do for achieving the same result
Thanks in advance Sudipta

6 comentarios

Matt J
Matt J el 23 de Mayo de 2014
Beware RREF. It was designed for classroom use only, as discussed here
and not for serious problem solving. I don't know if they've made it more robust since then, but I doubt it.
Matt J
Matt J el 23 de Mayo de 2014
Editada: Matt J el 23 de Mayo de 2014
However, the solutions are completely different. What should I do for achieving the same result
Convince us that this really happens. Attach a .mat file with your A,b data so we can try to reproduce what you see.
Sudipta Sinha
Sudipta Sinha el 23 de Mayo de 2014
Thank you very much for your answer. I appreciate it. Please find the attached file. The matrix A, b and some associated results are there. please have a look on it
Matt J
Matt J el 23 de Mayo de 2014
Editada: Matt J el 23 de Mayo de 2014
That is not a .mat file. It appears to be a text file. It also appears to be a duplicate of the data you provided in this post
which we already know is not over-determined.
Sudipta Sinha
Sudipta Sinha el 24 de Mayo de 2014
yes, that is my data. i need to solve this one. none of the methods are giving reasonable result. how do i generate a .mat file
Matt J
Matt J el 24 de Mayo de 2014
Use the SAVE command to save variables to a .mat file (and the LOAD command to reload them).

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Numerical Integration and Differential Equations en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 23 de Mayo de 2014

Comentada:

el 24 de Mayo de 2014

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by