Motorola DSP Developer's Kit    

Instantiating Input and Output Objects

Mapping Arguments to Objects.   

To instantiate input and output objects you should use the macros defined as CREATE_INPUT_ARG and CREATE_OUTPUT_ARG in the <matlab>/toolbox/motdsp/motdspmex/include/headers/56k/motdsp_api.h file. Also, CREATE_NORM_INPUT_ARG is available if you are sure that the input will always be normalized. See Chapter 3, Motorola DSP MEX-File Programming Reference.

For example,

Once the mapping of arguments to objects is complete, all access to the MEX-file arguments is through these newly created objects (i.e., the input objects a and b, and output object y in this example).

Mapping String Arguments..   

For advanced MEX-files, use the CREATE_OPT_INPUT_ARG macro to create input objects from optional string input variables. For example, a filter function may require string inputs as optional arguments to indicate a high-pass or low-pass filter type. Implement this functionality by using code similar to


 Declaring Input and Output Objects Instantiating the Motorola DSP Simulator