Error occurred for zp2sos while generating C code from matlab code

1 回表示 (過去 30 日間)
632541 2021 年 4 月 12 日
編集済み: 632541 2021 年 9 月 15 日
Hi ,
I am geeting error at zp2sos function while converting c code from matlab using coder .
Function 'zp2sos' not supported for code generation.
Above line is the error I got .
Any alternative way to solve this?
I want to convert this zp2sos to c code .
Or should I change the method of converting matlab code to c.
I want to use the C code in other application.
Please answer this.
Thank you
  1 件のコメント
632541 2021 年 4 月 12 日
This is the piece of code
[n,Ws] = cheb2ord(Wp,Ws,Rp,Rs); % Filter Order
[z,p,k] = cheby2(n,Rs,Ws); % Filter Design, Sepcify Bandpass
[sos,g] = zp2sos(z,p,k); % Convert To Second-Order-Section For Stability
%freqz(sos, 2^16, Fs) % Filter Bode Plot
x_data = filtfilt(sos, g, x); % Filter Signal


回答 (0 件)


Help Center および File ExchangeDigital Filter Analysis についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by