Hello,
I am currently creating a custom module with Audio Weaver, and I need to add a 2D array/matrix variable for my module.
According to the manual, the variables can be either scalar or array (which I managed to do) but I was wondering if there might be a way to do the same with 2D array.
Thanks for your answer,
Best,
Quentin
11:02am
Hello Quentin,
Yes Audio Weaver Variables can support 2D arrays. Section 3.7, starting on page 59 of our Audio Weaver Module Developer's Guide goes over the add_array.m function, which you can specify a 2D array in the data argument.
Thanks,
Kevin
11:16am
Hi Kevin,
Thanks for your answer. So if I understood well when creating a 2D array in Matlab, the memory allocation of the array in the ModModuleLib.c file (i.e for the target or native mode implementation) will be a 1D array, and elements are accessed columns by columns?
For instance M[i][j] will correspond to M[i*sizeJ + j], is that correct ?
Thanks for your answer,
Best,
Quentin
11:14am
Hello Quentin,
Yes, that is correct.
Thanks,
Kevin