The way the combination "Solution-Scratch pad" works, is confusing and awful.
These are trivial problems, and still (!), in submitting them - by the way Cody and it's solution check-out works, make them frustrating to solve - one is asking why they don't work. Even if you make a fast-running error as I did (the square of g was omitted in the first few attempts, the solution is exact (with wrong formula) for the 1st test: bank(1,1)....).... You should delete the wrong solutions as they don't have any value: nor for new solvers, nor for the ones when they "solve" the problem.
I understand, You tried to de-incentivize people to submit wrong answers - many times, but by keeping them listed (wrong solutions), you give not even a marginally statistically worth information - it's crap and garbage, based on may subjective factors for errors, especially taken into account the way the Solution-Solver scratchpad work. And, they are nor user-friendly, nor similar to true MATLAB environment.
Interesting question 😁
Project Euler: Problem 8, Find largest product in a large string of numbers
Construct an index vector from two input vectors in vectorized fashion
Given a matrix, swap the 2nd & 3rd columns
03 - Matrix Variables 5
Find the index of the largest value in any vector X=[4,3,4,5,9,12,0,4.....5]
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