Plot two graphs in one scope

조회 수: 28 (최근 30일)
Venkata Harsha Vardhan chunduri
Venkata Harsha Vardhan chunduri 2011년 4월 15일
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?

답변 (2개)

Paulo Silva
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
Venkata Harsha Vardhan chunduri
Venkata Harsha Vardhan chunduri 2011년 4월 15일
Hi sir, what are these run1 and run2 here? Are they scope variable names?
Paulo Silva
Paulo Silva 2011년 4월 15일
that's the data created by the To Workspace block, cells and arrays should work.

댓글을 달려면 로그인하십시오.


Rob Graessle
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
Venkata Harsha Vardhan chunduri
Venkata Harsha Vardhan chunduri 2011년 4월 15일
Thank you sir, Where can I get this model referencing tool box from? Is it available in R2009B?
Paulo Silva
Paulo Silva 2011년 4월 15일
Simulink -> Ports & Subsystems -> Model

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Programmatic Model Editing에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by