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

2 vues (au cours des 30 derniers jours)
Nguyen Hung
Nguyen Hung le 10 Oct 2017
Here is my code
for j < maxc

Réponse acceptée

Walter Roberson
Walter Roberson le 10 Oct 2017
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

Plus de réponses (1)

Catégories

En savoir plus sur Logical dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by