I am using a code my TA gave us to use for our lab report (had to edit some of his code to make it work so far) and he wants us to use the inv command and I have no experience with this. Any ideas on what to adjust to make it work?

5 comentarios

madhan ravi
madhan ravi el 18 de Oct. de 2018
Upload your code
James Tursa
James Tursa el 18 de Oct. de 2018
Editada: James Tursa el 18 de Oct. de 2018
Do not paste pictures of code in your question. Paste the actual code as text and format it with the { } Code button.
Matt J
Matt J el 18 de Oct. de 2018
Well, I hope this question doesn't seem too random, but why is RHS not square?
madhan ravi
madhan ravi el 18 de Oct. de 2018
Maybe P1 and P2 are vectors resulting in rectangular matrix.
Anthony Voccia
Anthony Voccia el 18 de Oct. de 2018
P1 and P2 vectors are taken directly out of an excel document that have already had everything created. The TA we have doesn't always give us the best methods to use. I will use the code command next time

Iniciar sesión para comentar.

 Respuesta aceptada

James Tursa
James Tursa el 18 de Oct. de 2018
Editada: James Tursa el 18 de Oct. de 2018

0 votos

Normally the inv is applied to the left hand side coefficients, since people usually write the "A" matrix on the left and the "b" vector on the right in an Ax=b linear system. So I am guessing you need to change the inv( ) calculation to this:
V = inv(LHS)*RHS;

1 comentario

Anthony Voccia
Anthony Voccia el 18 de Oct. de 2018
Reversing it did make it work, maybe the TA gave it to use backwards?

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Etiquetas

Preguntada:

el 18 de Oct. de 2018

Comentada:

el 18 de Oct. de 2018

Community Treasure Hunt

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

Start Hunting!

Translated by