simulink switch (for a single use)
    4 visualizaciones (últimos 30 días)
  
       Mostrar comentarios más antiguos
    
    theShield
      
 el 11 de Nov. de 2014
  
    
    
    
    
    Comentada: theShield
      
 el 12 de Nov. de 2014
            Hi guys I am new with Simulink and igot a problem about switch block.
I want to pass a signal once it reaches a certain value and doesn't matter if it drops or exceeds further.
Let me give an example.
Let say i have two signals 'h' (altitude of an aircraft) and 'v' (speed of that air craft).
Let say i want to pass 'v' signal once my altitude reaches 10000 ft. It doesnt matter if my altitude drops or exceeds 10000ft after i reach 10000ft. Is there any way to do this ?
0 comentarios
Respuesta aceptada
  Azzi Abdelmalek
      
      
 el 11 de Nov. de 2014
        
      Editada: Azzi Abdelmalek
      
      
 el 11 de Nov. de 2014
  
      y=function(h,v)
persistent m
if isempty(m)
  m=0
end
if h<=1000 & m==0
 y=h
else
 m=2000
 y=v
end
Más respuestas (0)
Ver también
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

