Effacer les filtres
Effacer les filtres

How to give discrete input from workspace to simulink?

3 vues (au cours des 30 derniers jours)
Anirudh TOPIWALA
Anirudh TOPIWALA le 14 Déc 2017
Réponse apportée : RobF le 25 Jan 2018
I already tried using O2.time=[]; O2.signals.values=[0;30;60 ]; O2.signals.dimension=1; Where O2 is my variable.
The error I am getting is "Invalid continuous sample time specified for 'kukanew/From Workspace1'. Continuous sample time is not permitted when the input from workspace is a structure with no time data. To eliminate this error, select a discrete sample time or change the input data to include time data"
Can someone please help me resolve the error?

Réponses (1)

RobF
RobF le 25 Jan 2018
Hello Anirudh,
it seems like your time vector is empty.
To be able to use data from your workspace in Simulink, one solution is to create timeseries (TS) objects. Find more information here:
>> doc timeseries
or

Catégories

En savoir plus sur Programmatic Model Editing dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by