Problem 61087. How tall will my cactus be?

My Barbed Wire Cactus is a desert cactus that relies on just the right amount of rainfall to stay healthy. Given a 1×12 vector of monthly rainfall values (in mm), the cactus will die if any month has less than 10 mm of rain (too dry) or more than 150 mm (too wet). If it survives the year, the change in the average height of the cactus follows a realistic saturation model:
g = Gmax * (1 - exp(-r ./ k))
where Gmax⁡ = 5 cm is the maximum monthly growth and k = 40 mm controls how strongly rainfall influences growth. Find the final height if the initial height of my cactus is 140 mm. If my cactus dies, the height should be reported as 0.

Solution Stats

81.82% Correct | 18.18% Incorrect
Last Solution submitted on Dec 05, 2025

Problem Comments

Solution Comments

Show comments

Problem Recent Solvers9

Suggested Problems

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!