Best score without using Neural Net Toolbox is 38
It took me half an hour to solve test 4.
function [index1 index2] = nearestNumbers(A)
Huh, using indices within each other actually worked.
Worlds longest solution winner please, cody!
Wow this is long haha. Congrats!
This Solution works perfectly on MATLAB. Why not here? Need help
my solution passes all the tests in matlab R2011a
function [index1, index2] = nearestNumbers(A)
for i = 1:length(A)-1
for j= 1:length(A)-i
This passed all of the test cases when using MATLAB on my computer, yet it fails here. Anyone know what's wrong with it? I'd appreciate it!
Hard, but doable!
I really liked this problem and although I provided a lot of code to solve it I am pleased with the thought process that took me to it.
This solution is working on my computer.
I don't understand why it is not working
why is this not working? gives correct solution to all test cases on my computer
Another unreadable statement. Does anyone else have trouble using backspace in the "comment on solution box"?
This only works if you have the Neural Network Toolbox
Until they are banned like other functions, many people are using these. It is interesting that only a subset of functions work.
I am partial to dist, it's such a useful function...
Is dist() still available on Cody?
I thought it required one of multiple toolboxes
Make the vector [1 2 3 4 5 6 7 8 9 10]
Filter AC, pass DC
Back to basics 15 - Benchmark
Divide by 4
Find the longest sequence of 1's in a binary sequence.
Swap the first and last columns
Find the peak 3n+1 sequence value
Find the numeric mean of the prime numbers in a matrix.
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