Conv() not working

23 次查看(过去 30 天)
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 个评论
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
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
  5 个评论
Constantino Carlos Reyes-Aldasoro
ah I see that you accepted Steven's.






Community Treasure Hunt

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

Start Hunting!

Translated by