Import constants to Simulink from Excel file

12 Ansichten (letzte 30 Tage)
ryan muddiman
ryan muddiman am 18 Nov. 2020
Kommentiert: ryan muddiman am 18 Nov. 2020
I am running a simulation in Simulink that requires some constants that change every run. These constants are in an excel file (Uvalues, Area). I would like to import these constants in to a constant block or other for use.
I understand the Simulink from Spreadsheet block treats rows as time which is preventing me from setting constants easily.
I have tried using the MATLAB function block as a source, but it doesn't support xlsread.
Any help is appreciated.

Akzeptierte Antwort

cr
cr am 18 Nov. 2020
Setup a model callback InitFcn function in which you call a script that loads the xls file using xlsread()

Weitere Antworten (0)

Kategorien

Mehr zu Data Import from MATLAB finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by