Effacer les filtres
Effacer les filtres

what does odd_flag=1 mean

1 vue (au cours des 30 derniers jours)
Komal Gaikwad
Komal Gaikwad le 20 Fév 2018
Modifié(e) : Stephen23 le 20 Fév 2018
i tried to find in documentation but couldn't found also what does ii means
odd_flag=1;
for j=1:im_sz(2)
for ii=1:im_sz(1)
  4 commentaires
John D'Errico
John D'Errico le 20 Fév 2018
Modifié(e) : John D'Errico le 20 Fév 2018
odd_flag = 1
assigns the value 1 to the variable odd_flag.
What it means is probably nothing, since it is apparently just an unused variable. Odds are whoever wrote that code used a variable called odd_flag before, but then changed to code to no longer use it, and forgot to delete that line.
You need to understand that you can name a variable virtually ANYTHING you want. There is nothing special about that choice of name. And if it is unused, then it does noting at all, except waste a few CPU cycles to create it.
Stephen23
Stephen23 le 20 Fév 2018
Modifié(e) : Stephen23 le 20 Fév 2018
"also what does ii means"
Very basic concepts like this are explained very well in the introductory tutorials, which are highly recommended for all beginners:

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Logical dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by