2
$\begingroup$

I have used the Simulation Data Inspector in Simulink to log a dataset of two time varying signals. The only option I see concerning exporting is to .mat or to workspace, which basically produce the same type of output:

Simulink.sdi.Dataset

I have no way of opening this file or dataset, and I need to export it to Excel or to a simple text file with this format:

Time  Var1  Var2
0  53  34
1  47  78
2  67  24
3  54  87
4  45  54

(tab separated values).

My goal is to use the logged data in LaTeX for a report, but as of now I am stuck with a 1x1 Dataset in the Workspace which I cannot use or read. I have checked the MATLAB manual online, but the export-function they refer to does not work with this simulink.sdi.dataset:

>> export(voutyngve2,'XLSfile','data.xls')
Undefined function 'export' for input arguments of type 'Simulink.sdi.Dataset'.

Can someone please give me a tip?

$\endgroup$
3
  • $\begingroup$ OK, it seems like when I select a group for trends, it will only export the actual name of the trend. I have to click the curve and then press export to get a data set of time and values - albeit only values for the curve i highlighted. Now i have started using the workspace-block in simulink to gather the variables. The latest problem is that i get too many datapoint and it takes forever to process. (7000ish datapoints for 10ms simulation where one trend is a square wave is too much) $\endgroup$
    – fluxmodel
    Nov 19 '15 at 17:54
  • $\begingroup$ I have the same Problem and now I am trying out this tool provided on Matlab Central: de.mathworks.com/matlabcentral/fileexchange/… It seems to be working OK, although it is quite slow (I think writing to Excel is just slow in General.) Can you try it out and give some Feedback? Kind regards, Hugo $\endgroup$
    – user7773
    Aug 25 '16 at 11:36
  • $\begingroup$ Hi hugo, I changed my modus operandi and added blocks in simulink which writes a timeseries which could be copy pasted into a simple text file which LaTeX used to create decent plots. $\endgroup$
    – fluxmodel
    Aug 26 '16 at 11:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.