Convert dSPACE ControlDesk measurements to MATLAB/Simulink timeseries (updated)
- With this updated MATLAB script, multiple dSPACE ControlDesk measurements can be imported with a single execution
- The result is saved as a tscollection (collection of timeseries) and all signals are saved with their corresponding name
- Access imported data with Simulink ‘From Workspace’ block and, e.g., dsp_tscs{1}.my_signal
Convert dSPACE ControlDesk measurement to MATLAB timeseries that can be used in Simulink
- dSPACE ControlDesk can export measurements to mdf4 files or mat files
- mat file exports can be converted to timeseries with this MATLAB script
- The timeseries can then be imported into Simulink with the ‘From Workspace’ blog
- Multiple signals can be imported at once
Example output:
>> import_dspace_mat_to_simulink_ts --Imported dSPACE mat file C:\Users\Nicolai\Nextcloud\foo.mat into workspace variable dsp_ts --Time: 0.000000 s to 42.399572 s, 423980 steps --2 variables are in dsp_ts: 'In1' 'In1_1'