Solving a over determined system in MATLAB

5 visualizaciones (últimos 30 días)
Kyathari Hrushikesh
Kyathari Hrushikesh el 6 de Feb. de 2020
Comentada: Kyathari Hrushikesh el 6 de Feb. de 2020
I have 4 equations and 3 variables. I know that 3 equations are sufficient but my instructor said that the equations make a overdetermined system. My equations are:
e1=(x*(a-principle_stress(1,1)))+(p*y)+(r*z);
e2=(y*(b-principle_stress(1,1)))+(p*x)+(q*z);
e3=(r*x)+(q*y)+(z*(c-principle_stress(1,1)));
eqn4 = (x^2) + (y^2) + (z^2) == 1;
What I did earlier was
eqns=[e1,e2,eqn4];
S = solve(eqns,[x y z]);
The above method matched with the actual answer but is it the correct way of solving a overdetermined system?
Will using
eqns=[e1,e2,e3,eqn4]
solve my problem?

Respuesta aceptada

John D'Errico
John D'Errico el 6 de Feb. de 2020
Is it the correct way? perhaps it might be, except that you have a typo in e3. Perhaps that is why you decided to try it with only 3 equations. Look carefully at e3. Does it contain y at all? (NO.) TYPO.
It looks like you are trying to solve an eigenvector problem, thus you have an eigenvalue of a 3x3 stress matrix, well, you call it a principle stress. It is still one of three eigenvalues of that 3x3 matrix.
How should you solve the problem? Best is just to use eig, which will give you both the desired stresses and the eigenvectors directly. Trying to use solve at all here is a bad idea, because it forces you to face a numerical problem.
If you already know the value of the principle stress, then you can use null to give the desired vector directly.
Of course, since this is homework, I assume you are not allowed to use either null or eig anyway.
Sigh.
  3 comentarios
John D'Errico
John D'Errico el 6 de Feb. de 2020
I'm not sure what is your problem. Part of it is you apparently do not understand null, since it already returns a result that is normalized to have unit norm, thus implicitly satisfying the 4th equation.
So, why do you feel the need to "prove" the 4th equation is satisfied by the result of null?
I'd suggest you would be further ahead removing what appear to be the typo from your code. If you try to solve the correct equations, using the correct tools (here, null) then you will get the necessary result.
Finally, I would point out that symbolic tools are entirely overkill in all of this.
Kyathari Hrushikesh
Kyathari Hrushikesh el 6 de Feb. de 2020
I didn't knew that null returns a normalized unit norm, thanks for your time and patience

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Stress and Strain en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by