x greater than y by some value
    7 visualizaciones (últimos 30 días)
  
       Mostrar comentarios más antiguos
    
    Caroline
 el 18 de En. de 2020
  
    
    
    
    
    Comentada: Caroline
 el 19 de En. de 2020
            Hi!
I have a problem with the syntax, I want to write an if loop that: if x is greater than y by 10 then .. I only know how to write that x is greater than y and the action, but how to write that is 10 greater?
The solution is probably easy but I have no idea ..
Thank you for your help!
0 comentarios
Respuesta aceptada
  Cameron B
      
 el 18 de En. de 2020
              if x - y > 10
         disp(’greater than 10’)
      else
         disp(‘less than or equal to 10’)
      end
Más respuestas (0)
Ver también
Categorías
				Más información sobre Loops and Conditional Statements en Help Center y File Exchange.
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!