Can't run simulink with inport

조회 수: 8 (최근 30일)
Lisa Collins
Lisa Collins 2011년 10월 21일
I want to use an inport with simulink rather than a "from workspace" or "constant" block as I want to use the control and estimation dialog box to optimise the input in order to minimise a cost function. I copy and paste my data for the input from excel (24 cells in a column)called P, and do the same for the time stamp (1 to 24 hours, 1 hour intervals) in a separate variable called time. In the configure parameters dialog box I have ticked inputs and typed in [P,time] but this does not work -What am I doing wrong? I want the model to be discrete, one output per hour for 24 hours.

채택된 답변

Fangjun Jiang
Fangjun Jiang 2011년 10월 21일
Assume both time and P are column vector, you need to put it as [time,P]. The time stamp is always the first column. The second column, third column, etc. will be the Inport data.

추가 답변 (0개)

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by