How to save fvtool diagram as a matlab figure??

조회 수: 23 (최근 30일)
Brasco , D.
Brasco , D. 2014년 10월 30일
댓글: Craig 2019년 12월 9일
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?

채택된 답변

Brasco , D.
Brasco , D. 2014년 10월 30일
편집: Brasco , D. 2014년 10월 30일
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
Craig
Craig 2019년 12월 9일
Thank you for taking the time to follow up and post your own answer, I found it useful.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Filter Design에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by