
I was trying to solve look up table for the dat below, but i am getting an error message, so what shall i do?
1 view (last 30 days)
Show older comments

the error is like this

And the command warining

0 Comments
Answers (1)
Gayathri
on 4 Feb 2025
The issue arises because the "Table data" and "Breakpoints" are in table format as shown in the screenshot attached. This is due to the way in which the excel file has been loaded to read the "OCV" and "SOC" columns.
We need to make sure that "Table data" and "Breakpoints" are arrays of size 1xN for a "1-D Lookup Table". This can be achieved by loading the excel file using the "readtable" function as shown below.
% Specify the file name or path
filename = 'battery_exp.xlsx';
% Read the Excel file into a table
dataTable = readtable(filename);
SOC=(dataTable.SOC)'
OCV=(dataTable.OCV)'
And now if you pass the "SOC" and "OCV" to the "Lookup Table", then the "Block Parameters" tab will be be as shown below. The error will be resolved using this approach.

For more information on the "readtable" function, please refer to the below documentation link.
Hope you find this information helpful!
0 Comments
See Also
Categories
Find more on Nonlinearity in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!