Problem: Undefined function 'zpk' for input arguments of type 'double'.
6 次查看(过去 30 天)
显示 更早的评论
I am using MATLAB R2012b and trying to do a function that uses zero pole gain parameter. The problem occured when I tried to uses the zero pole gain function. It produces "Undefined function 'zpk' for input arguments of type 'double'." error. Basically, the input (value of z, p and k) are in the form of array but in this case (from my understanding), it detects as double. Below is my coding that may involved in this problem:
n = 1;
w = 2*pi*f1;
[z, p, k] = butter(n,w, 'high', 's'); % Zero-Pole-Gain design
hp = zpk(z,p,k); % creates a continuous-time zero-pole-gain model
I've tried to troubleshoot it quite a lot of times already but it produces the same result. Hope anyone can solve this problem can come forward. Thanks.
0 个评论
回答(1 个)
Star Strider
2015-3-1
I don’t understand what you’re trying to do.
Your filter is already in ‘z,p,k’ form. The zpk function is designed to take the output of the designfilt function and produce a ‘z,p,k’ representation from it.
From there, you can use the ‘z,p,k’ representation in filtfilt, or if you want to produce the most stable filter representation, use the zp2sos function and use the ‘sos’ and ‘g’ output as your filter parameters in filtfilt.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Digital Filtering 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!