Look-up table with changing table

3 views (last 30 days)
SIMONE PARENTELA
SIMONE PARENTELA on 6 Jan 2021
I have two vectors with one row and 200 columns. The Torque vector is organised in an increasing way, while the velocity vector is not. This allows me to have the graph represented by the red line.
need to create a lookup table in simulink. I can't use the one in the library because I have to have the velocity vector organised in an increasing way. So I thought of creating this model in simulink. I sort the w_OOL data and use the sorted indexes to sort the T_OOL data. So with monotonically ordered vectors I can use the Lookup Table Dynamic block. The vector w_OOL is a vector of rpm ranging in an unordered fashion from 750 to 2479, whereas the vector T_OOL is ordered.
I don't understand why I get this error.
It is as if the sort block does not work. But if I replace the data with a vector xxx=rand(1,200) it works correctly. I don't understand how to get out of this problem. I repeat, I think the problem is between the w_OOL vector and the sort block, but I don't understand what the problem is.

Answers (0)

Community Treasure Hunt

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

Start Hunting!