i am using from workspae in simulink..i have to load 1by4096 vector,but i am getting 1by4095 ,i am missing first element.what should i do to get that one?
4 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
i am using from workspae in simulink..i have to load 1by4096 vector,but i am getting 1by4095 ,i am missing first element.what should i do to get that one?
0 Commenti
Risposte (1)
Walter Roberson
il 14 Giu 2017
When you use From Workspace or From File to load arrays, then the first column is always interpreted as the timestamp. To avoid this you need to use the timeseries or struct input possibilities so you can supply the time information.
4 Commenti
Dillan
il 29 Mar 2024
As Walter said, you should use a separate column for the time. Please see this doc page for loading array data into the simulation using the "From Workspace" block: https://www.mathworks.com/help/simulink/ug/load-data-using-the-from-workspace-block.html#:~:text=Input%20Data.-,Load%20Array%20Data,-You%20can%20use
The issue is that you need 1 column of time values, and 1 column of data values for the simulator to behave as expected.
Christoph Aistleitner
il 2 Mag 2024
If the values are constant and not time dependent, you could just use the Constant block.
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!