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

Geoff Hayes
Geoff Hayes 2018년 2월 20일
편집: Geoff Hayes 2018년 2월 20일
Komal - where is odd_flag used in your above code example? Unless you are referring back to https://www.mathworks.com/matlabcentral/answers/383455-need-to-insert-following where the attached m code has a variable named odd_flag which is never used. It is probably safe to remove this unused variable...
Komal Gaikwad
Komal Gaikwad 2018년 2월 20일
ok Mr.Geoff Hayes thnx for your response and time ,but what does ii mean
John D'Errico
John D'Errico 2018년 2월 20일
편집: John D'Errico 2018년 2월 20일
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 2018년 2월 20일
편집: Stephen23 2018년 2월 20일
"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:

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

도움말 센터File Exchange에서 Graph and Network Algorithms에 대해 자세히 알아보기

태그

질문:

2018년 2월 20일

편집:

2018년 2월 20일

Community Treasure Hunt

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

Start Hunting!

Translated by