How to hold the extrapolated values using time series object

I am not able to hold the last known value of the data point between Simulation time?

 Réponse acceptée

In order to hold the last value during simulation, the customer needs to use the setinterpmethod to "zero-order hold" in case of data import (either from excel file or to signal builder). The sample code for setInterpmethod is given below:
>> ts = timeseries(rand(100,1),1:100);
>> ts = setinterpmethod(ts,'zoh');
Save the above data in MAT file and use this to import data into the Signal builder. This will make sure that the last value is held in the plot during the sample time period.
Please note that when using a From Workspace block to get the timeseries data into Simulink, you will need to Turn-off the option "Interpolate Data".

Plus de réponses (0)

Catégories

En savoir plus sur View and Analyze Simulation Results dans Centre d'aide et File Exchange

Produits

Version

R2018a

Tags

Aucun tag saisi pour le moment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by