Modify or adding data in SimulationOutput
29 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuestas (1)
Fangjun Jiang
el 9 de Dic. de 2023
"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.
1 comentario
Ver también
Categorías
Más información sobre General Applications en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!