Modify or adding data in SimulationOutput
3 次查看(过去 30 天)
显示 更早的评论
Hello,
my request is related to the Simulink results that are written in Simulink.SimulationOutput. Is there a possibility to modify it, add something etc. via Matlab code?
Background:
I've designed a WebApp in which I've integrated a Simulink model. I've used a template that is described here: Generate and Deploy a MATLAB App with SimAppTemplate for a Model - MATLAB & Simulink - MathWorks Deutschland
I've also integrated an FMU model (although this information is probably rather unimportant at this point). The overall model and app/webapp runs fine. The results of the simulation are written to app.SimulationHelper.InputOutput.SimulationOutput and processed further by the app. Everything works fine.
Challenge:
Is there a way to cache a previous simulation call (that works) and then write it back to the "SimulationOutput" workspace? Apparently this is write-protected and this is not possible without further ado.
The background is that I want to display (plot) several different simulation runs and compare them (e.g. if I have changed a parameter).
My first idea (but it doesn't work yet):
Caching the results of the first simulation run. Perform the second simulation run. Load the previous results into SimulationOutput (however, this is read-only...).
I would be grateful for your ideas.
0 个评论
回答(1 个)
Fangjun Jiang
2023-12-9
"Caching the results of the first simulation run. Perform the second simulation run."
If you can do both of the above, then you have the access to both simulation results. You don't need to read one to "over-write" another. Just read both results and plot them together.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Event Functions 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!