Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

i need an if condition that analyzes data from a for loop

2 visualizaciones (últimos 30 días)
Omar Almahallawy
Omar Almahallawy el 23 de Abr. de 2019
Cerrada: MATLAB Answer Bot el 20 de Ag. de 2021
how can i express an if condition inside a for loop that expells numbers that are greater than a static number let's say 50
so i do not want to the resluts that are more than 50 to show up in my results

Respuestas (1)

Walter Roberson
Walter Roberson el 23 de Abr. de 2019
The easiest way is to filter after you have stored everything:
YourVariable(YourVariable>50) = [];
  1 comentario
Omar Almahallawy
Omar Almahallawy el 23 de Abr. de 2019
unfortunatly when i use this code, i end up with [ ] with the numbers that don't satisfy the condition

La pregunta está cerrada.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by