Hi Kay,
I have been looking through the src and I am a little confused on how to actually get the exported array data out. I see you have this iterator here to cycle through each value for each timestamp
final VType value = iter.next();
then you turn that VType into a double using
values.add(VTypeHelper.toDouble(value));
Does iter return the start of each array index if it’s an array of values or is it only returning the first index?
If Value is a VNumberArray is there a way to add it to the values list if I make it a List of Arrays instead of a List of Doubles?
Thanks
From: Kasemir, Kay <kasemirk at ornl.gov>
Sent: Friday, January 29, 2021 5:32 AM
To: tech-talk at aps.anl.gov; Manoussakis, Adamandios <manoussakis1 at llnl.gov>
Subject: Re: CS-Studio(Phoebus) Archive Viewer Matlab Export Issue
> spreadsheet data shows up just fine..
> matlab files seem to be exporting just a single index per record
Yes, the Matlab export code only handles scalars.
In case of array data, you get the first element.
The code in question is this for the Matlab 'text file' *.m export
and this for the Matlab 'binary' *.mat export
In both places you'll see that it calls VTypeHelper.toDouble to try and turn the sample which might be double, enum, int, short, ... into a scalar for export.
You could try to update that code to check for VNumberArray and then export all array elements.