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

조회 수: 1 (최근 30일)
Shaonong Wei
Shaonong Wei 2020년 11월 25일
댓글: Walter Roberson 2020년 11월 25일
  댓글 수: 2
John D'Errico
John D'Errico 2020년 11월 25일
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 2020년 11월 25일
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)

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 MATLAB에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by