my code is giving output " Index exceeds matrix dimension" and its mentioning the line number, i cannot understand how to solve this problem, please help!

the output result is :
the code is:

2 Comments

use the debug tool and go through the function. Eventually you'll see which step in the forloop has the issue and where you're indexing more than available. is index pairs empty for some reason.

Answers (0)

This question is closed.

Asked:

on 6 Jul 2015

Closed:

on 20 Aug 2021

Community Treasure Hunt

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

Start Hunting!