how can I put xls data in to 2D lookup table toolbox in simulink

hi... can help me to put this data in to 2D lookup table /simulink toolbox
flow pressure
0 5.00202
3.01724 5.00202
7.75862 4.93193
12.5 4.83193
16.8103 4.73193
21.9828 4.63193
28.0172 4.52185
35.3448 4.42185
41.3793 4.31176
50.431 4.20168
59.0517 4.10168
66.3793 4.009

2 Comments

That looks like a 1D table to me, relating flow (input) to pressure (output)
I have model circut design should using 2D not 1D... When open the 2Dlookup tables want from me to put tabledata, breakpoibts1, breakpoints2 I have this table above. How can i put them in 2DLookup table

Sign in to comment.

 Accepted Answer

You'd need to employ:
(1) [From Spreadsheet] block in order to read your data in MS Excel file. Note that you can specify in your MS Excel data file Column 1 to be time series or skip (select from drop down options of the block), and Column 2 to be signal 1. SImilarly, you'd specify for signal 2.
(2) [2D Lookup Table] block from Simulink Library.
How to handle parameter specifications of [From Spreadsheet] block see - https://www.mathworks.com/help/simulink/slref/fromspreadsheet.html#buvhvaj-2
Good luck.

9 Comments

Note that in your case, you may need to create two seprate Sheets each of which should contain time series in Column 1 and Signal in Column 2. Sheet 1 contains Signal 1 and Sheet 2 contains Signal 2.
ok then can i connect them with 2Dlookup table or skip???
can I connect with you for more details plz?????
See the attached image shows how 2D look up table block is associated with two MS Excel data files reading data from Sheet1 (D_Excel.xlsx) and Sheet1(D_Excel2.xlsx).
iI want to connect like the design of attached image.
Either you can create two separate MS Excel file one of which is containing Column 1 of time data and Column 2 of signal 1. The other is containg Column 1 of time data and Column 2 of signal 2.
An alternative way:
You can create one MS Excel file containg two sheets of data one of which is containing Column 1 of time data and Column 2 of signal 1. The other sheet is containg Column 1 of time data and Column 2 of signal 2.
You can see how parameters are chosen in MS Excel data file.
There is no point doing that. In order to use 2D lookup, you need two independent variables and one dependent variable. When you only have a flow vector and a pressure vector, you are missing one variable.
Unless, that is, the two vectors are datapoints for a scattered interpolation ? I do not see any Simulink scattered interpolation block, other than using a MATLAB Function Block.
i have flow and pressure depend on angular speed value that constant as 10Krmp then the first 2Dlookup table connect to another 2Dlookup table contain torque data with flow also depend on angular speed 10Krpm
WIth the angular speed being constant, you do not have two independent variables and one dependent variable.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!