Plot two graphs in one scope
6 次查看(过去 30 天)
显示 更早的评论
I am having two Simulink files, I have to run both the files and compare the results. Is it possible to plot both the outputs in a single plot. If its a single file we can use mux and merge them to plot in a single scope but how to do that for 2 different files. I have tried by exporting the scopes and using plot and simplot functions but nothing worked. Can anyone help me with this?
0 个评论
回答(2 个)
Paulo Silva
2011-4-15
Try exporting to workspace and join both data simulations in a cell like this:
data = {run1, run2};
simplot(data)
2 个评论
Paulo Silva
2011-4-15
that's the data created by the To Workspace block, cells and arrays should work.
Rob Graessle
2011-4-15
You could use Model Referencing to include the two models in a single parent model. Then you can use a Mux and scope block to plot the outputs of the two submodels on a single scope.
2 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Programmatic Model Editing 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!