How to us variable as an if statement condition?
Mostrar comentarios más antiguos
I want to use an if statement that its condition depends on a variable to give the following conditions (<= or >=). For example:
if condiotion
a = '<=';
else
a = '>=';
end
if 4 a 9 %I want to use variable a to give the condition, this will minimize the size of my code
do something
end
I will appreciate your help Thanks.
2 comentarios
KSSV
el 23 de Mzo. de 2017
Question is not clear..
Warith Sheibany
el 23 de Mzo. de 2017
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Whos en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!