Block Error: Loading matlab workspace table data in Simulink model 2-D Lookup Table?

조회 수: 10 (최근 30일)
Hi,
Guess it might be a novice level question.
I have numeric data stored in 24x12 table in matlab workspace (See attacehd fig.1). Data was imported from an excel sheet.
Each column corresponds to a month of the year and each row to an hour of the day.
Intention is to use the numeric data from this table stored in matlab workspace, and utilise it in a simulink model through a 2-D lookup table based on the calculated month and hour (See attached fig.2).
However, receiving compilation error as shown in attached fig.3.
Would appreciate some guidance.
Thanks in advance!

채택된 답변

Fangjun Jiang
Fangjun Jiang 2022년 8월 24일
The data in your MATLAB workspace is in an Table object. see class(ELSE2021New).
Simulink doesn't recognize this type of object.
If you could move the data to an ordinary 2-D matrix, then the error should disappear.
  댓글 수: 2
Joydeep
Joydeep 2022년 8월 24일
Ok, but by default the data got stored in a Table object, when i imported data from excel sheet to matlab (through 'Import Data' button at the top).
So do you mean that it always needs to be 2 step process ? first excel to table and then table to matrix ?
Fangjun Jiang
Fangjun Jiang 2022년 8월 24일
specify output type as "numeric matrix" if using "Import Data"

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

추가 답변 (0개)

카테고리

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

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by