Use spreadsheet time input for simulation timestep?

1 Ansicht (letzte 30 Tage)
Gazebo
Gazebo am 12 Dez. 2018
Kommentiert: Fangjun Jiang am 13 Dez. 2018
Hi all,
I am importing data from several spreadsheets, as would like to use the Time column of one of them to act as a 'master' time from which the simulation will be run from. In other words I'd like the time output of the simulation to exactly match the time column of the spreadsheet.
How would I go about implementing this?
Thanks
  2 Kommentare
Adam Danz
Adam Danz am 12 Dez. 2018
What do you need help with (you haven't asked a question)?
Here are some tips on how to get help here:
Gazebo
Gazebo am 12 Dez. 2018
Bearbeitet: Gazebo am 12 Dez. 2018
I need help with using a spreadsheet time column as the simulation time.
My question would be
How do I use a spreadsheet time column for the simulation time?
Many thanks

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Fangjun Jiang
Fangjun Jiang am 12 Dez. 2018
Theoritically you can't specify the exact simulation time as it is determined by other factors such as accuracy or tolerance. The time vector in your Excel file could have non-zero start time, large time step, etc.
Practically, you can set up your solver to match your desired time vector, if it is starting from zero, having a fixed time step.
More generically, you can run your simulation, get the output, and then re-sample the output to match your time vector. See Simulation, Model Configuration Parameters, Solver and Data Import/Export.
  4 Kommentare
Gazebo
Gazebo am 13 Dez. 2018
Apologies, I meant that the main issue is the result of the previous execution is fed into the next ( I need to use a lot of memory blocks).
Fangjun Jiang
Fangjun Jiang am 13 Dez. 2018
You can save the output and state of a simulation and use that to continue another simulation. Or, if the simulation is confinuously running, use Merge block to merge multiple conditionally executed subsystmes. Anyway, trying to specify the simulation time vector seems in the wrong direction.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Programmatic Model Editing finden Sie in Help Center und File Exchange

Produkte


Version

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by