Error occurred for zp2sos while generating C code from matlab code

2 Ansichten (letzte 30 Tage)
632541
632541 am 12 Apr. 2021
Bearbeitet: 632541 am 15 Sep. 2021
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 Kommentar
632541
632541 am 12 Apr. 2021
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

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by