Example
Matlab function is shown below:
In this example, the data type is complex single precision and the size is 1 x infinite vector.
The main program (Xcode):
The emxArray_real32_T *a = emxCreate_real32_T(1,SIZE) means memory allocation, which is declared in XXX_types.h. Note that different data types have different declarations or definitions. For example, if the intended data type is double and complex, then we should replace real_32 T with creal_T (see rtwtypes.h).
Notice: We should at least include two head files, wise_product.h and wise_product_types.h before building the project.
The result is shown below:
沒有留言:
張貼留言