필터 지우기
필터 지우기

I am getting this error despite having signal processing tool downloaded. very limited coding / matlab knowledge so any guidance appreciated!!

조회 수: 8 (최근 30일)
Error using butter
Expected Wn to be finite.
Error in butter>butterImpl (line 81)
validateattributes(Wn,{'numeric'},{'vector','real','finite','nonempty'},'butter','Wn');
Error in butter (line 59)
[varargout{1:nargout}] = butterImpl(n,Wn,varargin{:});
Error in Kinetisense_Validation_2 (line 344)
[D1 D2] = butter(order_D, fc_D/(Fs/2), 'low'); %Low pass filter for D with 1st order

답변 (1개)

Zuber
Zuber 2023년 4월 12일
Hi,
I understand that you are getting an error,
Error using butter.
Expected Wn to be finite.
As per the error message, the input argument 'Wn' of the butter function needs to be finite while it is not. Specifically, there is an error in the code line where ‘butter’ function with arguments (order_D, fc_D/(Fs/2), 'low') is called.
The general syntax of ‘butter’ function is as follows:
[b,a] = butter(n,Wn,ftype)
where
  • n: Filter Order,
  • Wn: Cutoff Frequency
  • ftype : Filter Type.
It is used to design a lowpass, highpass, bandpass, or bandstop Butterworth filter, depending on the value of ftype’.
There are certain checks you can do to rectify the issue:-
  • Ensure that ‘order_D’, ‘fc_D’ and ‘Fs’ are well defined. 'order_D’ should be a positive integer while ‘fc_D’ and ‘Fs’ need to be positive real numbers.
  • Check that the value of fc_D/(Fs/2) is finite. If Fs/2 is zero or fc_D is not specified properly, the resulting value may be NaN or Inf which could cause the ‘butter’ function to throw an error.
For any further information on ‘butter’ function, please refer to the documentation www.mathworks.com/help/signal/ref/butter.html
I hope it helps.

카테고리

Help CenterFile Exchange에서 Robust Control Toolbox에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by