How can I set 'file name' and 'sheet name' as variables in 'from spreadsheet' block in simulink
13 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Kouta Amano
am 17 Mär. 2020
Bearbeitet: Monika Jaskolka
am 20 Mär. 2020
Hi,
I'm trying to import timeseries data saved as '.xlsx' to simulink.
As my first step, I have attempted to use 'from spreadsheet' block, then it works well.
Here, I wrote a real file name (ex. 'test.xlsx') in 'file name' box.
But, I want to define it as variable (ex. input_xlsx = 'test.xlsx', then input_xlsx in 'file name' box).
Is there any solution?
0 Kommentare
Akzeptierte Antwort
Monika Jaskolka
am 20 Mär. 2020
Bearbeitet: Monika Jaskolka
am 20 Mär. 2020
Is it not possible to do this from the GUI, but you can do it from the command line:
blk_pathname = 'testModel/From Spreadsheet';
input_xlsx = 'test.xlsx';
input_sheet = 'Sheet1';
set_param(blk_pathname, 'FileName', input_xlsx);
set_param(blk_pathname, 'SheetName', input_sheet);
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Data Import from MATLAB finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!