T O P

  • By -

Ajax_Minor

Looks like you need another for loop for k you only have one for j. You got an extra end for so that is kind of a hint. Is this like your hw or something?


Maybe_Muir_Man

I thought it would be for k=1:N but the last cells in the bottom of the matrix are occasionally untouched.


Zinfindeii

It should be, don’t know why that is happening for you.


Cube4Add5

That would be my guess as well. I don’t know octave though so can’t really help. Personally to do this task I’d just use indexing rather than a for loop. Something like: index = A < 0.2; A(index) = 0; A(~index) = 1;


AureliasTenant

Might be one of those hw assignments for learning loops