Filter löschen
Filter löschen

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

2 Ansichten (letzte 30 Tage)
Shaonong Wei
Shaonong Wei am 25 Nov. 2020
Kommentiert: Walter Roberson am 25 Nov. 2020
  2 Kommentare
John D'Errico
John D'Errico am 25 Nov. 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 am 25 Nov. 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)

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Mathematics finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by