why there is a difference in the calculation result
Show older comments
h2 =[0.4000 0.6000 0.8000 1.0000 1.2000 1.4000 1.6000 1.8000];
tsqr =[0.0424 0.0628 0.0834 0.1026 0.1250 0.1452 0.1666 0.1871];
>>h2./tsqr
ans =
_9.4229_ 9.5541 9.5939 9.7494 9.6011 9.6445 9.6038 9.6198
>>0.4000/0.0424
ans =
9.4340
Answers (2)
Roger Stafford
on 26 Nov 2013
0 votes
There is no reason those quotients should be equal. The quantities h2 and tsqr are not proportional to one another. For one thing the successive differences in h2 appear to all be the same whereas those in tsqr are certainly not the same.
Walter Roberson
on 26 Nov 2013
Your values might not be exactly what was printed out. You should use
format long g
before displaying h2 and tsqr
Categories
Find more on Simulink in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!