フィルターのクリア

How to save fvtool diagram as a matlab figure??

14 ビュー (過去 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 Center および File ExchangeScopes and Data Logging についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by