Importing Data to Simulink with Dates

조회 수: 3 (최근 30일)
Klaudia Kello
Klaudia Kello 2023년 10월 26일
답변: Varun 2023년 10월 31일
I have an Excel spreadsheet that contains data for a full year, detailing both solar production and consumption values for specific dates.
How can I import this data into Simulink? Within Simulink, I intend to perform subtraction on these two parameters.
The primary objective is to utilize solar energy to charge a battery storage system and monitor its capacity to determine when it's fully charged.
I've attached the Excel file and the relevant Simulink blocks for your reference.
Thank you for your assistance

답변 (1개)

Varun
Varun 2023년 10월 31일
Hi Klaudia,
I understand that you want to import an excel spreadsheet in the Simulink that contains data for a full year, detailing both solar production and consumption values for specific dates.
To accomplish this task, you can use "From Spreadsheet" block in Simulink. Ensure that you change datatype of date in excel to number, as date formats are not supported. The "From Spreadsheet" block reads data from Microsoft® Excel® (all platforms) or CSV (Microsoft Windows® platform with Microsoft Office installed only) spreadsheets and outputs the data as a signal.
To learn more about "From Spreadsheet" block, please refer to the following documentation:
You can also refer to this nice blog "Importing Data From Excel" using "From Spreadsheet" block.

카테고리

Help CenterFile Exchange에서 MATLAB Functions in Microsoft Excel에 대해 자세히 알아보기

제품


릴리스

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by