what is the difference between dsp.Maximum and max function in Matlab

1 vue (au cours des 30 derniers jours)
serwan Bamerni
serwan Bamerni le 3 Août 2015
Commenté : Walter Roberson le 5 Août 2015
Hi everyone
In the latest version of Matlab R2015a, I found many new function in the DSP System Toolbox, some of these function can be achieved using other function as I think.
now my question, is there a difference between such function (dsp.Maximum) and (max)? and many other like function

Réponses (1)

Walter Roberson
Walter Roberson le 4 Août 2015
dsp.maximum is a System Object, optimized for reducing memory access, especially for use with code generation.
  2 commentaires
serwan Bamerni
serwan Bamerni le 5 Août 2015
but why it give us the same number of input vector as in the example in the web document for dsp.maximum
Walter Roberson
Walter Roberson le 5 Août 2015
dsp.Maximum does not accept any vector inputs. dsp.Maximum accepts only property / value pairs:
H = dsp.Maximum('PropertyName',PropertyValue,...) returns a maximum-finding object, H, with each specified property set to the specified value.
The result is a System Object, which is a routine optimized for reducing memory access, especially when generating code. You have to step() the System Object returned by dsp.Maximum, and that System Object will return the outputs selected at the time the System Object was configured. The default is to return the maximum value and the index because that is a common operation; the user can configure other choices.
Suppose you are interfacing MATLAB with a DSP and you have some values that are currently stored on the DSP. If you use max() of the values then it is necessary to transfer the values from the DSP to MATLAB and perform the max() at MATLAB, and it would be common that the result would have to be transferred back to the DSP for a later operation. If you use dsp.Maximum class, then to save I/O, the maximum will be taken right on the DSP, so the data does not have to be transferred to MATLAB and the result does not have to be transferred back to the DSP.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Get Started with DSP System Toolbox dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by