Allow variables AND multiple datapaths
Following #49 (closed) there is an issue when "preformatting" a struct and a variable containing multiple datapaths to be handed to PlotID.Publish
datapaths = {'/path/to/file1.ext','/path/to/file2.ext'};
s.x = x; s.y=y;
PlotID.Publish({s,datapaths}, scriptPath, fig2)
will lead to an error, because in dataPath it is tested only for struct, or char, another layer of array cannot be handled.
This could be solved by:
- first transforming the cell array into one level, iterating through the entries of the "level 1 cell array", and if they are a cell array, remove the entry and add the entries from the deeper level on level 1
- for the iteration we'd have to look out to repeat the iteration where an exchange happened (if entry 3 was removed the new index on 3 still needs to be tested) and always test whether we reached the end at this point of time, since the array will get more entries
- call the iteration again until no swap happened
- manually add a test for a cell around line 31 and then again check for char
- create a function that tests for struct/cell/char and in case of cell array it calls itself recursively upon the entry of the array (most elegant), it might be an issue to handle multiple elements