Minimal Path - 02 - MATLAB Cody - MATLAB Central

Problem 45457. Minimal Path - 02

Difficulty:Rate

Given a matrix, find the minimal path from the top left to the bottom right by only moving to the right and down so that the summation is minimum.

Use linear index to show the path.

For example,

 x=[ 2     2     2     2     2
    10    10    10     1     2
    20    20    20     1     2
    30    30    30    30     2]

The minimal path is -- [1 5 9 13 14 15 19 20]

Solution Stats

26.0% Correct | 74.0% Incorrect
Last Solution submitted on Apr 09, 2023

Problem Comments

Solution Comments

Show comments
PIVlab surpasses 100K all-time File Exchange downloads
During the past twelve months, PIVlab, a MATLAB Community Toolbox for particle...
3
5
LLMs with MATLAB updated to support the latest OpenAI Models
Large Languge model with MATLAB, a free add-on that lets you access...
2
4

Problem Recent Solvers11

Suggested Problems

More from this Author165

Problem Tags

Community Treasure Hunt

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

Start Hunting!
Go to top of page