필터 지우기
필터 지우기

Saving successive simulations in Simulink

조회 수: 1 (최근 30일)
John F
John F 2011년 7월 13일
I'm using a Signal Builder block to create several input scenarios for my simulation. When I use "Run All" to simulate all the groups, I need to save all the outputs from each simulation, not just the last simulation. How can I do this?

답변 (3개)

Fangjun Jiang
Fangjun Jiang 2011년 7월 14일
I am not aware of a direct method. You could do it if you are willing to write some scripts. The signalbuilder() function is the command line interface to the Simulink signal builder block. It can be used to query and set the active group used in simulation. So you can go through a loop, set the active group one at a time, use sim() command to run the simulation and then save the output data.

Sreeram Mohan
Sreeram Mohan 2011년 7월 14일
By Saving what do u expect ?
If you are fine with storing the simulation results in variable them you could say
SimOut_Run1 = sim('mdlname'); or [SimOut_t, SimOut_x, SimOut_y] = sim('mdlname');
--sreeram
  댓글 수: 1
Fangjun Jiang
Fangjun Jiang 2011년 7월 14일
Sreeram, take a look at the Simulink Signal Builder block and you'll understand John's need.

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


John F
John F 2011년 7월 14일
This is what I thought. I just wasn't sure if there was an automatic way. I'll whip up a script for it. Thanks.

카테고리

Help CenterFile Exchange에서 Prepare Model Inputs and Outputs에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by