nested conditions in forloop in matlab like c++ -
i new in matlab, coming c++ , not sure whether valid question ask. trying write c++ loop in matlab, did study matlab loops not able found such example illustrating:
for example in c++ write code like:
// simple example int a=1 , b=1; for(x=0, z=a; x<length; x++, z++){ for(y=0, w=b; w<length; y++,w++) a[x][y]= z*w; } }
now in matlab :
z=a; x=0:length y=0:length a(x,y)=z*w w++; // trying end z++; end
this trying wanna increment both 'w' , 'z'
there no w++
in matlab, need use
w = w+1
Comments
Post a Comment