why there are two different comands for calculating convolution of two vectors?

4 vues (au cours des 30 derniers jours)
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 commentaire
Walter Roberson
Walter Roberson le 12 Nov 2021
Modifié(e) : Walter Roberson le 13 Nov 2021
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.

Connectez-vous pour commenter.

Réponse acceptée

Bjorn Gustavsson
Bjorn Gustavsson le 12 Nov 2021
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 commentaires
Bjorn Gustavsson
Bjorn Gustavsson le 15 Nov 2021
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
Walter Roberson le 15 Nov 2021
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".

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Startup and Shutdown dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by