MATLAB: I have Parse error at ‘<' :usage might be invalid syntax

parse error

Here is my code
for j < maxc

Best Answer

You are using C or C++ syntax. MATLAB syntax is either
for variable = expression
or
while expression
You should probably be using
for j = 1 : maxc
or possibly
for j = 1 : maxc - 1
Related Question