For loop "end" not turning blue

7 views (last 30 days)
Jason
Jason on 31 Aug 2014
Answered: Image Analyst on 31 Aug 2014
It's pretty self explanatory, at the end of a for loop the end won't turn blue and produces an error due to the statement being incomplete. typing "end" anywhere else produces the expected result however.

Answers (1)

Image Analyst
Image Analyst on 31 Aug 2014
It's not clear how to fix it unless you include the code. Obviously you don't have a simple 3-line for loop - you probably have an extra "end" line in there somewhere. For example are some of your function definitions concluding with "end" and some don't?

Categories

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

Tags

Community Treasure Hunt

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

Start Hunting!