Pulling in data exported from the Data Inspector into another model
1 view (last 30 days)
Show older comments
I am trying to export a set of signals as Timeseries data using the Simulation Data Inpector (Matlab R2017b) to be used as an input to a Simulink model running R2022b. My current solution is to save it as a .mat file. I then want to use this data as an input for the model that I have updated to Matlab R2022b. I have tried using the 'signal editor block' to bring them in from the .mat loaded into the workspace, but that triggers the data incorrectly. I have tried using the 'from file' and 'from workspace' blocks but the .mat data saved from the Simulation Data Inspector has other data besides the signals and timeseries data. I know I could write a script to remove the unwanted data then use the 'from workspace' block, but I wanted to know if there is a quicker way to do this with the data as formated.
0 Comments
Answers (1)
Sulaymon Eshkabilov
on 8 Jan 2024
There are a few options that can be used to store simulation data from a Simulink model:
(1) [To File] to store data in .mat file: Timeseries or Array
(2) [To Workspace] and data type can be specified: Timeseries (by default), Array, Structure time series, Structure or Array
(3) [Scope]: Configuration Properties --> Logging --> Log data to workspace: Dataset, Structure time series, Structure or Array
You can choose which one best suits for your model.
See Also
Categories
Find more on Sources in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!