I think you have your W and H mixed up in your example and test suite.
Thanks James, I've fixed it now.
I also used round, but I not seen to be the best solution.
36.6/20.6==16/9 is false.
The values from the test suite are also inaccurate.
Return the 3n+1 sequence for n
6205 Solvers
Who knows the last digit of pi?
560 Solvers
Find the index of the largest value in any vector X=[4,3,4,5,9,12,0,4.....5]
300 Solvers
456 Solvers
2430 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!