find a root problem
이전 댓글 표시
syms hr;
Bo=2106192442915567908282078859207/4494983136974228414275670063706112 - (2106192442915567908282078859207*exp(-18446744073709551616/(1147831826363933*(81508471552582434684928/(3187597375937011*hr) + 22182.30127333101796019592417497))))/4494983136974228414275670063706112
hr1=solve(hr-661*230*Bo^0.5,hr)
I found a hr1=2.3145157172213798324089674315726e-40 - 1.8416117030019738856259409912694e-48*i through matlab
But It must be,true answers are 1997.001744 and 0,
I'm waiting your solutions pls Thanks,,
답변 (1개)
Walter Roberson
2013년 3월 26일
You are encountering round=off error. 2106192442915567908282078859207/4494983136974228414275670063706112 is being converted to floating point by MATLAB before the expression reaches MuPAD.
V2106 = sym('2106192442915567908282078859207');
V4494 = sym('4494983136974228414275670063706112');
Bo = V2106/V4494 - (V2106 * exp( sym('-18446744073709551616') / (sym('1147831826363933') * (sym('81508471552582434684928') / (sym('3187597375937011') * hr) + sym('22182.30127333101796019592417497'))))) / V4494;
hr1 = solve( hr - sym('661') * sym('230') * sqrt(Bo), hr)
댓글 수: 5
emre karakoc
2013년 3월 26일
Walter Roberson
2013년 3월 27일
You did not code them as symbolic values, not here and not in your duplicate question. If you are generating this code, then alter the generation routine to generate symbolic numbers.
Walter Roberson
2013년 3월 27일
Try using assume() to add the assumption that hr > 0.
emre karakoc
2013년 3월 28일
편집: emre karakoc
2013년 3월 28일
Walter Roberson
2013년 3월 28일
You are encountering round-off error, and the slope is very very steep near the 1997 solution. The program probably cannot isolate the root. You might need to increase Digits a fair bit (to 40 or so) to find the second root.
I do not have MuPAD, so I cannot test in MuPAD. The symbolic package I use does find the 1997-ish root.
카테고리
도움말 센터 및 File Exchange에서 Common Operations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!