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

3 visualizaciones (últimos 30 días)
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 comentario
Walter Roberson
Walter Roberson el 12 de Nov. de 2021
Editada: Walter Roberson el 13 de Nov. de 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.

Iniciar sesión para comentar.

Respuesta aceptada

Bjorn Gustavsson
Bjorn Gustavsson el 12 de Nov. de 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 comentarios
Bjorn Gustavsson
Bjorn Gustavsson el 15 de Nov. de 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 el 15 de Nov. de 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".

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Parallel Computing Fundamentals en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by