I am fairly new to the signal processing world and that being said I have little to no experience. The problem that I am having is that I am not quite sure how to use
dsp.RLSFilter. So far I have only used highpass filter and it was straight forward - I had to just decide on the cutting frequency, type of highpass and sampling frequency, whereas for the RLS filter I have a ton of parameters to choose from. For example, how to decide on the method to calculate the filter coefficients? Furthermore, in the documentation it is stated:
Call step to filter each channel of the input according to the properties of dsp.RLSFilter. The behavior of step is specific to each object in the toolbox.
and in the example
step is not used:
rls1 = dsp.RLSFilter(11, 'ForgettingFactor', 0.98); filt = dsp.FIRFilter('Numerator',fir1(10, .25)); % Unknown System x = randn(1000,1); % input signal d = filt(x) + 0.01*randn(1000,1); % desired signal [y,e] = rls1(x, d); w = rls1.Coefficients; subplot(2,1,1), plot(1:1000, [d,y,e]); title('System Identification of an FIR filter'); legend('Desired', 'Output', 'Error'); xlabel('time index'); ylabel('signal value'); subplot(2,1,2); stem([filt.Numerator; w].'); legend('Actual','Estimated'); xlabel('coefficient #'); ylabel('coefficient value');
So what is the difference between using step and using the method in the example? When I try using the same the same way as in the example I get the following error message:
Array formation and parentheses-style indexing with objects of class 'dsp.RLSFilter' is not allowed. Use objects of class 'dsp.RLSFilter' only as scalars or use a cell array. I tried using
num2cell on x and d, however, I had 0 success.