first of all, nice problem.
But there might be a problem with the 5th test case. At one point the 61 is further away from the mean than the 65.
I agree: it looks like the two 61's in correct_data should be 65's.
Fixed. Thanks for catching.
58.5 should be 53.5 a few places in the description. Also, I'm getting weird behavior with this problem: I can get my function to pass all the test cases on my local machine, but all test cases are failed on the Cody server no matter what I've tried to far.
Fixed the typos, thanks for noticing. I'm not sure why your code may not be working. I'd suggest checking you aren't using something like iqr which is only in the Statistics (I think?) Toolbox.
That was it. I wish that Cody would give a warning that an unsupported function was being used. Better yet, I wish the Cody computer had all the toolboxes activated.
But why, in your example< do you say that 1.5 * (54-50.5)= 4.5 ? shouldn't this be 5.25?
Encode Roman Numerals
Find the biggest empty box
Add more zeros
Narcissistic number ?
Combine Data With Gaps
Find the treasures in MATLAB Central and discover how the community can help you!
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office