solutions are rounded in a somewhat arbitrary fashion...
Your value of pi is wrong.
The problem should specify that the used value for pi is 3.1416 (since this is not its true value), and that we need to use floor with precision of 4 decimal places.
07 - Common functions and indexing 3
332 Solvers
Rounding off numbers to n decimals
1219 Solvers
337 Solvers
Rotate a matrix for 180 degree
122 Solvers
1360 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!