error with using filter command

Hello Guys,
Am trying to run this piece of code but i end up getting a throw out error with the "filter" function.
Am using Matlab R2018a. Is it a problem with my Matlab version.
A = [1 -2.7607 3.8106 -2.6535 0.9238];
y = filter(1,A,0.2*randn(1024,1)); %Throw out Error: Too many input arguments.
arcoeffs = arcov(y,4)
Any solution will be appreciated... Thanks in advance

5 件のコメント

Walter Roberson
Walter Roberson 2021 年 3 月 15 日
It works on my system. What shows up for
which filter(1)
Evans Gyan
Evans Gyan 2021 年 3 月 15 日
It looks like the filter command does not work for me. Do I need to install some add ons? I have tried again and i keep getting the same error
"Error using filter
Too many input arguments."
Walter Roberson
Walter Roberson 2021 年 3 月 15 日
No, filter is basic MATLAB, at least with those kinds of input arguments. https://www.mathworks.com/help/matlab/ref/filter.html
What output do you see when you invoke
which filter
Evans Gyan
Evans Gyan 2021 年 3 月 15 日
I get a path to a directory file. Unfortunately i had a file named "filter" in my matlab directory hence the error. I move it to another folder. The throwback error no longer exist.
Thank you very much for your assistance.
Bjorn Gustavsson
Bjorn Gustavsson 2021 年 3 月 15 日
@Evans Gyan: An (unrequested) advice: After cases where I started running into name-clashes like this I decided to put my matlab-directories at the end of the matlab-path - that made sure that basic matlab-functions never were shaded, and that I instantly understood that my new functions were shaded so I had to change names asap.

サインインしてコメントする。

回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeStartup and Shutdown についてさらに検索

質問済み:

2021 年 3 月 15 日

コメント済み:

2021 年 3 月 15 日

Community Treasure Hunt

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

Start Hunting!

Translated by