How to save fvtool diagram as a matlab figure??

23 visualizaciones (últimos 30 días)
Brasco , D.
Brasco , D. el 30 de Oct. de 2014
Comentada: Craig el 9 de Dic. de 2019
Hi guys,
I am new with this staff and have a problem about saving fvtool Magnitude Response plot as matlab figure.
You can export it as image formats(.jpeg, .png,.. ) but not in ".fig"
Anyone can help me?
Here is simple fvtool code;
filter_4_t =[0.2018 0.1189 0.1793 0.1793 0.1189 0.2018];
filter_5_t =[0.1716 0.1300 0.1984 0.1984 0.1300 0.1716];
filter_4_c =[0.2260 0.0772 0.1968 0.1968 0.0772 0.2260];
filter_5_c =[0.1921 0.0960 0.2119 0.2119 0.0960 0.1921];
bode=fvtool(filter_4_t,1,filter_5_t,1,filter_4_c,1,filter_5_c,1,'Fs',50);
legend(bode,'Taylor4','Taylor5','Chebyshev4','Chebyshev5');
I want to save the bode diagram as a figure.
Is there any way to do it?

Respuesta aceptada

Brasco , D.
Brasco , D. el 30 de Oct. de 2014
Editada: Brasco , D. el 30 de Oct. de 2014
I found an answer for my problem. it is abit long way but works for me.
I get the axis data of the figure object and redraw it as a matlab figure.
hfvt = fvtool(filterobj);
s = get(hfvt);
hchildren = s.Children;
haxes = hchildren(strcmpi(get(hchildren,'type'),'axes'));
hline = get(haxes,'children');
x = get(hline,'XData');
y = get(hline,'YData');
after this i can "plot (x,y)" and do whatever i can.
  1 comentario
Craig
Craig el 9 de Dic. de 2019
Thank you for taking the time to follow up and post your own answer, I found it useful.

Iniciar sesión para comentar.

Más respuestas (0)

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by