Conv() not working

37 ビュー (過去 30 日間)
dinesh kumar mohan
dinesh kumar mohan 2020 年 10 月 8 日
I am trying to use Conv function to convolute two distributions. But the Conv function is not working, do I have to install any special tool for it to work. Isn’t it a built-in function?
  2 件のコメント
Ameer Hamza
Ameer Hamza 2020 年 10 月 8 日
編集済み: Ameer Hamza 2020 年 10 月 8 日
You don't need a toolbox to run this function. What is the error?
dinesh kumar mohan
dinesh kumar mohan 2020 年 10 月 8 日
I used this example as provided by mathworks: u = [1 0 1]; v = [2 7]; w = conv(u,v)
The error I am getting is: Attempt to execute SCRIPT conv as a function

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

採用された回答

Steven Lord
Steven Lord 2020 年 10 月 8 日
I'm guessing you have written your own script conv.m that's taking precedence over the built-in conv function. To check this run:
which -all conv
If my guess is correct, rename or remove your conv.m script.
  1 件のコメント
dinesh kumar mohan
dinesh kumar mohan 2020 年 10 月 8 日
Yes, I got it. Thank you very much

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

その他の回答 (1 件)

Constantino Carlos Reyes-Aldasoro
Constantino Carlos Reyes-Aldasoro 2020 年 10 月 8 日
Could it be that you tried with uppercase C as in Conv and not with lower case as in conv?
>> conv([1 1],[2 2])
ans =
2 4 2
>>
>> Conv([1 1],[2 2])
Cannot find an exact (case-sensitive) match for 'Conv'
The closest match is: conv in C:\Program
Files\MATLAB\R2019a\toolbox\matlab\datafun\conv.m
  5 件のコメント
Constantino Carlos Reyes-Aldasoro
Constantino Carlos Reyes-Aldasoro 2020 年 10 月 8 日
Great! If this is sorted, please accept the answer. If not, let me know.
Constantino Carlos Reyes-Aldasoro
Constantino Carlos Reyes-Aldasoro 2020 年 10 月 8 日
ah I see that you accepted Steven's.

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

カテゴリ

Help Center および File ExchangeLogical についてさらに検索

タグ

製品


リリース

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by