Is it overflow? Why equ2 is such complex?How can I get the root?

1 visualización (últimos 30 días)
Shaonong Wei
Shaonong Wei el 25 de Nov. de 2020
Comentada: Walter Roberson el 25 de Nov. de 2020
  2 comentarios
John D'Errico
John D'Errico el 25 de Nov. de 2020
Would you PLEASE learn to use text, instead of pasting in a picture of your code????????
When you paste in a picture, you force anyone who wants to help you to retype your code from scratch.
And how is this question different from the last similar one you asked?
Walter Roberson
Walter Roberson el 25 de Nov. de 2020
equ3 involves the number 444.44 . In science, that means some undetermined value that is between 444435/1000 (inclusive) and 444445/1000 (exclusive) . It does not mean 44444/100 exactly, and MATLAB will not store 44444/100 exactly:
fprintf('%.999g\n', 444.44)
444.43999999999999772626324556767940521240234375
Considering that you have an indetermined number in your equations (whose range is known), it does not make sense to use solve(), as solve() is intended for calculating indefinitely precise closed-form solutions whenever possible. It is a "category error" to use a function intended for precision with input values that are known to not be precise.
You should be using vpasolve() instead, or you should be nailing down your coefficients to exact values, such as sym(400)/sym(9)

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre MATLAB 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