the if statement with and/or

Is this right?
If a and b and c and d <= 100 {statement} end

2 comentarios

Chad Greene
Chad Greene el 17 de Jun. de 2014
Your question is not very clear. What do your data look like and what is your goal?
Geoff Hayes
Geoff Hayes el 17 de Jun. de 2014
No, that statement is incorrect. In the Command Window, type help if or doc if for details on constructing an if statement and how relational operators are used in compound expressions.

Iniciar sesión para comentar.

 Respuesta aceptada

Azzi Abdelmalek
Azzi Abdelmalek el 17 de Jun. de 2014
Editada: Azzi Abdelmalek el 17 de Jun. de 2014

0 votos

if a<100&b<100&c<100&d<100
%do
end
%or
if all([a b c d]<100)

Más respuestas (0)

Categorías

Más información sobre Modeling en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 17 de Jun. de 2014

Editada:

el 17 de Jun. de 2014

Community Treasure Hunt

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

Start Hunting!

Translated by