Wrapper around GriddedInterpolant in Simulink

7 ビュー (過去 30 日間)
Ondrej Holub
Ondrej Holub 2013 年 11 月 7 日
編集済み: Ondrej Holub 2013 年 11 月 7 日
I need 4-D to 10-D LUTs in Simulink. The GriddedInterpolant object seems to be the right way to do it. Currently I do the following:
1. initialize the object:
F = griddedInterpolant({1:5,1:4,1:3,1:2},reshape((1:120),[5 4 3 2]),'linear','nearest');
2. use it inside an Intepreted MATLAB Fcn block by calling:
F(u(1),u(2),u(3),u(4))
I would like to wrap a masked subsystem around the Intepreted MATLAB Fcn so that it would simplify the configuration of such n-D LUT. Can anybody help with doing that?
Ideally, user would only specify the number of input signals, respective breakpoints, and the n-D surface. The subsystem would itself initialize the object, adjust number of its input ports and the F(..) command of the Interpreted MATLAB Fcn.
I do not insist on the Interpreted MATLAB Fcn block - I would be glad to learn an even faster way to do that.
Many thanks, Ondrej

採用された回答

Sean de Wolski
Sean de Wolski 2013 年 11 月 7 日
Any reason why you don't want to use the nd-lookup table block in Simulink?
  1 件のコメント
Ondrej Holub
Ondrej Holub 2013 年 11 月 7 日
編集済み: Ondrej Holub 2013 年 11 月 7 日
Oops, I was too shy to type in the pop-up of the N-D LUT block. According to the error message, it can handle up to 30 dimensions... Many thanks!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMultirate and Multistage Filters についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by