if with 2 conditions

9 visualizaciones (últimos 30 días)
james sinos
james sinos el 19 de Sept. de 2021
Comentada: Image Analyst el 19 de Sept. de 2021
i used this statement conditions before it worked well,
but this time Matlab says it work with logic condition only:
how to recover ?
thanks

Respuestas (1)

Image Analyst
Image Analyst el 19 de Sept. de 2021
What does this say
whos Ree
It's probably a vector, not a scalar.
  2 comentarios
james sinos
james sinos el 19 de Sept. de 2021
yes you have write , i must make a loop i forgot that .
i hope for a scalar it does work.
thanks
Image Analyst
Image Analyst el 19 de Sept. de 2021
You might want to use any or all():
if any(Ree > 100000 & Ree < 1000000) % Check if any of them is in range.
if all(Ree > 100000 & Ree < 1000000) % Checks that ALL of them are in range.

Iniciar sesión para comentar.

Categorías

Más información sobre MATLAB Parallel Server en Help Center y File Exchange.

Productos


Versión

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by