필터 지우기
필터 지우기

Calling a Matlab Function in Simulink which integrates Data from Excel when Stateflow State is active

조회 수: 1 (최근 30일)
Hey Guys,
i am trying to build a Simulink model of a manufacturing line. As powerload profiles are of interest i tried to simulate the current power used by the machines, therefore i developed a stateflow chart with five states (off,deactivated,standby,operational,working). Each state is associated to a typical load profile which was measured and stored in severel excel sheets. I now try to develop a function which is called when, for example, working state is active. The function shall read the first row and second column of the associated excel data(first column is time, not equal to simulation time!) in the first time step when state working is active and the second value in the second time step of simulation etc... Do you guys know how to do it? I tried programming a matlab function using if,while,for loops, but non of these worked because the only read out the first value of the data sheet.
Kind regards, Vincent

답변 (1개)

Vignesh
Vignesh 2017년 12월 19일
I think it might be easier to read the file using From SpreadSheet block and passing the values as input or storing them in Data Store Memory blocks.

카테고리

Help CenterFile Exchange에서 Simulink Functions에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by