Lookup tables in Matlab

2 次查看(过去 30 天)
Dear All,
I want to use lookup tables in Matlab to replace computation of complicated functional relations. The goal is to speed up computations. In the SIMULINK environment, I found a set of tools that perfectly matches my needs: the blocks '1-D lookup table', '2-D lookup table', 'Prelookup' etc.
My questions are: - Is a comparable set of tools or functions available in MATLAB? So far I have found approaches using interp1. Is this the fastest approach or are there better ways? And: So far I have not found a way to pass to interp1 the index of the previous search as search entry point (which speeds up things when changes between calls are small). - Can I use the mentioned SIMULINK blocks in Matlab? And if yes: how, and will it makes sense if computational speed is an issue?
Uwe

采纳的回答

Walter Roberson
Walter Roberson 2015-12-4
  1 个评论
Uwe Ehret
Uwe Ehret 2015-12-7
Thanks for pointing me to interp1qr! I tested interp1q (build-in Matlab function), interp1qr, and nakeinterp1 (a .mex function provided in http://www.mathworks.com/matlabcentral/newsreader/view_thread/258413). - interpqr is ~ 3x faster than interp1q - nakeinterp1 is ~ 10x faster than interp1q --> If there are no other alternatives, I will use the .mex function for now. Uwe

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Lookup Tables 的更多信息

标签

产品

Community Treasure Hunt

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

Start Hunting!

Translated by