MATLAB: Meaning of this for-loop written ina mex file

for loopMATLABmex

Hi,
Can someone please shed some light about this particular for-loop that I came across.
for(ir = ir; ir<=temp; ir++){ }
The initial value seems to equal to each other !. What is the meaning of that ?

Best Answer

  • It is simply a bad programming style. The "ir = ir" can be omitted:
    for( ; ir <= temp; ir++) { }