Problem 61036. The MATLAB Treasure Hunt – Cross the River of Ratios by Finding Successive Proportions in the Data Stream

Following the glowing script, you arrive at the River of Ratios — a flowing stream of numbers.
A carved message on the rocks reads: “Only those who know the balance between every pair shall cross.”
Given a numeric vector a, calculate the ratio of each element to the previous one.
Return a vector r such that r(i) = a(i+1)/a(i) for all valid i.
This will reveal the rhythm of the river and guide your next step!

Solution Stats

77.78% Correct | 22.22% Incorrect
Last Solution submitted on Oct 23, 2025

Solution Comments

Show comments