In R2012a, most methods for importing and exporting data to and from a model have been standardized to use MATLAB Timeseries.
For example, if you open the dialog of the To Workspace, you will see that timeseries is now the default save format:
Using MATLAB timeseries offers a lot of advantages as I described in a previous post on the dataset logging format.
Importing Bus Data
Let's say I want to import bus data, I create a structure of timeseries:
Then I specify the name of the variable or file, and the bus object in the From Workspace or From File dialog.
and we have a model importing buses!
Exporting Bus data
To export bus data, all you need to do do is connect the bus signal to a To Workspace or To File block and ensure the block is configured to use timeseries as save format (the default).
Once the data is in the MATLAB Workspace, you can use all timeseries methods to process your data.
For example, I can quickly detrend, filter and plot a random signal "b", contained inside bus "busOut":
Now its your turn
Are you going to include these new methods of loading and saving bus data in your workflow? Which is be best block pair for loading/saving buses? Let us know by leaving a comment here
コメントを残すには、ここ をクリックして MathWorks アカウントにサインインするか新しい MathWorks アカウントを作成します。