How can I extract the x and y values of the phase- and magnitude graph of a .fig file plotted with bodeplot() or bode()?
    5 visualizaciones (últimos 30 días)
  
       Mostrar comentarios más antiguos
    
    Hansi K
 el 12 de Dic. de 2023
  
    
    
    
    
    Comentada: Hansi K
 el 18 de Dic. de 2023
            I got a myBodeplot.fig file with two subplots and want to extract the x and y values for magnitude and phase.
Respuesta aceptada
  Paul
      
      
 el 16 de Dic. de 2023
        
      Editada: Paul
      
      
 el 16 de Dic. de 2023
  
      sys = tf(1,[1 1]);
bode(sys);
hf = gcf;
hax = hf.Children
hax(2).Children  % the first child is the phase plot
hax(2).Children(1)
hax(2).Children(1).Children
w   = hax(2).Children(1).Children.XData;
phase = hax(2).Children(1).Children.YData;
figure
semilogx(w,phase),grid
figure
semilogx(w,phase),grid
xlim([0.01 100])
Repeat for magnitude plot.
Más respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!





