02-14-2014 02:49 PM
02-14-2014 07:56 PM
Hi guys,
Thanks for the replies and discussion so far. It seems to me that the Wrapper DLL is a safer option, but I still wanted to know how it's done in LV - this is not for production code, but for quick prototyping and testing of some data processing algorithms. Hence, @nathand, would it be ok if I sent you the files to your Email rather here?
Cheers,
E
02-14-2014 10:35 PM
02-15-2014 07:54 AM
Hi nathand,
Sure. Attached.. The prototype of the DLL function is in the dll.h file (calculateRowingPattern). The data type is emxArray_real_T and defined in the "rowingPattern_types.h" file. Let me know if you need anything else. Thanks for looking at this.
Cheers,
E
02-15-2014 11:06 AM
Again, I need documentation explaining how the struct elements are used. Is size an array, or more likely a scalar? What is allocatedSize? It's not simply a matter of matching data types. Without more information, I can't help.
02-15-2014 11:18 AM
02-15-2014 05:37 PM
HI guys,
Can this help out?
Table "C Code Interface for Structure Fields" outlines a description of the structure.
Cheers,
E
02-15-2014 10:45 PM
That's a start but not enough. What does the global_locs parameter need to contain before calling the function? Does it need to be initialized to an array of a particular size, or does the CalculateRowingPatterns function initialize it? Does it need to contain any values or is it an empty array? It seems like the easiest thing to do is to use the appropriate emxCreate function described in your link. What are the dimensions of the global_locs array? What data do you need to get out of it?
02-15-2014 11:15 PM
Yep. Global_locs is an empty array and it returns the locations of peaks found in the data - the number of peaks will obviously change according to the data set.
Cheers
02-15-2014 11:27 PM - edited 02-15-2014 11:28 PM
Still not enough information. Is it a 1D array, 2D, or more dimensions? Does the function allocate memory for the data, or does that need to be done in advance, and if so how many array elements need to be allocated?
EDIT: do you perhaps have an example showing how to call this function from C?