am i using while loop the right way?

1 visualización (últimos 30 días)
Kobi
Kobi el 4 de Feb. de 2014
Editada: Andrei Bobrov el 4 de Feb. de 2014
my code:
while size(row) > 1
[ CROP_THIS ] = remove_edges_from_matrix_function( CROP_THIS,1 );
end
i want the loop to run this function while the condition size(row) > 1 for some reason the matrix stay the same (the function do nothing), as if i never wrote those lines what am i doing wrong?
the function: https://www.dropbox.com/s/fj1e7mxos5tpfo7/remove_edges_from_matrix_function.m

Respuesta aceptada

Andrei Bobrov
Andrei Bobrov el 4 de Feb. de 2014
Editada: Andrei Bobrov el 4 de Feb. de 2014
out = CROP_THIS;
while min(size(CROP_THIS)) > 1
CROP_THIS = remove_edges_from_matrix_function( CROP_THIS,1 );
out = [out,{CROP_THIS}];
end

Más respuestas (0)

Categorías

Más información sobre Loops and Conditional Statements en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by