why there are two different comands for calculating convolution of two vectors?
4 次查看(过去 30 天)
显示 更早的评论
What is the use of conv, when cconv can perform both linear as well as cicular convolution by choice of passing third argument.
Please guide
1 个评论
Walter Roberson
2021-11-12
编辑:Walter Roberson
2021-11-13
You have to know the padding requirements to use circular convolution as equivalent.
Also, for code generation, linear convolution is easier to generate code for, including potentially parallel HDL for some data types.
采纳的回答
Bjorn Gustavsson
2021-11-12
The answer to:
why
returned: "To please all."
That might be more of a matlab in-joke, but a true answer can only (possibly) be given by Mathworks and this seems unlikely to happen - for reasons of business-privacy reasons, and even if they tried it would likely not be a complete and correct answer due to the "fog of time". The two functions are in different toolboxes, cconv is in my signal-processing toolbox, while conv is in the datafun toolbox, this makes the former an add-on while the latter is included in even the most basic matlab-package. To my memory the conv-function is older than cconv which makes its existens if for no other reason an issue of backward compatibility. In addition conv also allows the setting of the output size by the flags 'same', 'valid' and 'full' which my version of cconv does not.
This answers your question.
As an advice for programming for other users that might not have the same toolboxes available check what toolboxes you are using by checking which functions you are using. You can do that by explicitly calling which:
which cconv -all
and get the full list of which cconv-functions you have, or after the completion of your function/script/toolbox you could use:
matlab.codetools.requiredfilesandproducts, or look at the following links:
HTH
4 个评论
Bjorn Gustavsson
2021-11-15
It is not a separate add-on pay-extra toolbox, it is in the core distribution which is still organized in a set of separate directories with conceptually similar function - which to my mind for the ease of description is indistinguishable from what a toolbox is.
Walter Roberson
2021-11-15
In my opinion, it isn't really a toolbox if it cannot be installed separately (assuming all prerequisites are present.)
Now... it does get a bit fuzzy as to what the difference is between a "toolbox" and a "support package".
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Startup and Shutdown 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!