find in for loop

5 visualizaciones (últimos 30 días)
Volkan Yangin
Volkan Yangin el 29 de Nov. de 2015
Comentada: Star Strider el 29 de Nov. de 2015
Hi everbody
I want to find the "Ne" values which are greater than the "tum_veriler_tamyukgucvolkan" values.
I have 1724 "Ne" values and i can't solve this problem with using simple methods. I must use for loop.
for i=1:1:numel(Ne);
greater_values=find(Ne(1,i)>tum_veriler_tamyukgucvolkan)
end
I have no idea where i have made false things.
Thanks.

Respuestas (2)

Star Strider
Star Strider el 29 de Nov. de 2015
Guessing here since I can’t run your code, but saving the ‘greater_values’ as a cell array could work:
for i=1:1:numel(Ne);
greater_values{i} = find(Ne(1,i)>tum_veriler_tamyukgucvolkan);
end
  2 comentarios
Volkan Yangin
Volkan Yangin el 29 de Nov. de 2015
thanks a lot for your answer Star Strider, your cell array solution is very helpful now. :-)
Star Strider
Star Strider el 29 de Nov. de 2015
My pleasure!

Iniciar sesión para comentar.


Walter Roberson
Walter Roberson el 29 de Nov. de 2015
greater_values = Ne(Ne > tum_veriler_tamyukgucvolkan);
With no loop.
  1 comentario
Volkan Yangin
Volkan Yangin el 29 de Nov. de 2015
Editada: Volkan Yangin el 29 de Nov. de 2015
thanks for your answer Walter Roberson :-)

Iniciar sesión para comentar.

Categorías

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

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by