Error occurred for zp2sos while generating C code from matlab code

1 次查看(过去 30 天)
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
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 CenterFile Exchange 中查找有关 Digital Filter Analysis 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by