Error occurred for zp2sos while generating C code from matlab code

조회 수: 2 (최근 30일)
632541
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
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