Accepted Answer

David Goodmanson
David Goodmanson on 29 Mar 2017

1 vote

Hi jay, It looks like I is giving you the number of columns and J the number of rows. But i is your row index and j is your column index. So you have to reverse the definitions of I and J.

1 Comment

jay Florence
jay Florence on 29 Mar 2017
Thank you so much this was the problem and it all works perfectly now!

Sign in to comment.

More Answers (0)

Categories

Find more on Loops and Conditional Statements in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!