This solution is outdated. To rescore this solution, sign in.
-
1 Comment
dymaxwell
on 22 Aug 2018
Because of the floating point arithmetic, the last elsement of vector b may be different from the right answer(usually 1 smaller than it). So I add 1e-4 at last to mend it.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!