DWDataReader needs better support for MATLAB

  • Developers
  • DWDataReader needs better support for MATLAB
Simon Ghionea

Posted on 27.09.2012 17:28
In the DWDataReader library, there are methods like DWGetTextChannelList, DWGetEventList, and DWGetHeaderEntryList. There is no way to use these methods in MATLAB because MATLAB only supports simple structure arrays, whereas the DWChannel structure has elements that are character arrays. To compensate for this, I see that Dewesoft has added a method DWGetChannelListItem which is employed by the accompanied MATLAB example with the library. Can you also create such an "item" method for the TextChannelList, EventList, HeaderEntryList, and ArrayInfoList?? Alternatively, can you post an example of how to read a text channel from a D7D file? Thanks, Simon
Dewesoft Developer

Posted on 04.10.2012 10:10
Hello, there is an document in the DWDataReader_v3_0_0_7.zip you downloaded from the web page. In the document all this features are described. From the mail I see that you know how to program in Matlab so I think it shouldn't be a problem to try to use the documentation and produce the result that you need. The functions you need are already in the library (DWDataReaderLib.h): - DWGetHeaderEntryTextF - DWGetEventTextF - ... Best regards, Tilen.
Harm -

Posted on 13.11.2012 21:57
Hi, I was struggling with the same problem. The "F" functions are not described in the .doc file. For reading the events list, you could use: [event_count] = calllib('DWDataReaderLib', 'DWGetEventListCount'); % reads teh number of events And then, using a for loop with i as index: [EventTime] = calllib('DWDataReaderLib', 'DWGetEventTimeF', i); % gives the event time of event number "i" [DWStatus, EventText] = calllib('DWDataReaderLib', 'DWGetEventTextF', i, blanks(200), 200); % the evnttext of event nr "i" It appears that the last "200" in the function call is the number of characters you wish to read; the maximum is 200 so that reads the full event text. Regards, Harm
Login to reply to this topic. If you don't have account yet, you can signup for free account .