Simulink: 2-D lookup table using 2 vectors as input and a matrix as lookup data and
Show older comments
Hi,
I have: (1) a 2-D matrix of data - Z, 2D_data_matrix (2) a vector of independent data - x, input_vect_#1_50pts (3) a vector of dependent data - y, input_vect_#2_50pts
For each time step, I want to run a 2-D lookup on the 50 pairs of x,y data where each individual x-y data pair queries the 2-D matrix of data, i.e. I want to do the equivalent of this matlab code:
output_vector_50pts=interp2(2D_data_matrix, input_vect#1_50pts, input_vect_#2_50pts)
What is the most efficient way to do this? Can I use inbuilt Simulink blocks or do I have to user-define them? What blocks do I use? Do I have to use an initialize function in the model to load my 2-D data?
I have used a buffer and while that works it is not a long term solution....
Thanks a million for any help.
Answers (0)
Categories
Find more on Array and Matrix Mathematics in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!