FREQZ の振幅応答を CSV ファイルに保存する方法はありますか?

3 views (last 30 days)
MathWorks Support Team
MathWorks Support Team on 25 Oct 2013
FREQZ の振幅応答をカンマ区切りのファイル形式である CSV ファイルに落とす方法を教えてください。

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 25 Oct 2013
FREQZ 関数に出力引数を指定して、周波数応答をデータで取得した後、CSVWRITE 関数で CSV ファイルとして出力することで可能です。
下記にプログラム例を紹介します。
f=[0:0.001:1.000];
a=sqrt(2*pi()*f);
b=a/2.506628274631000;
coefficient=fir2(64,f,b,hann(65));
[h,f]=freqz(coefficient); % 出力引数を付けて実行
SS=20*log10(abs(h)); % 振幅応答
csvwrite('aaa.csv',[f,SS]); % ファイル保存

More Answers (0)

Categories

Find more on 2 次元および 3 次元プロット in Help Center and File Exchange

Products


Release

R2012a

Community Treasure Hunt

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

Start Hunting!