0

I need some information about "sfix_look1_dyn.mex32" file. Currently I am using this mex file, with the help of masked s function block. I am using this block only for 1 D look up related calculations. But if I want to use similar kind of logic for 2 D Look up table then is it possible to use same mex file ? Basically I want to know is there any way out so that, for 2 D lookup I can give values of Table Data as Inputs.

P0W
  • 46,614
  • 9
  • 72
  • 119

1 Answers1

0

AFAIK you can't use same mex file or tlc for 2-D lookup, its for Dynamic lookup 1D Block

However, you can use n-D Lookup Table block

enter image description here

P0W
  • 46,614
  • 9
  • 72
  • 119
  • Thanks a lot for your reply. My problem is I want n-D look up table to which I can input the Values which we assign in Table Data, Breakpoints etc. I want to give those parameter as inputs. Here that is not possible. The Main reason behind doing this is, I want to use N- D lookup Table for enumerated parameters. If I use those Parameters inside N-D look up Table, It gives an error as it requires numeric type Data. If I get something like "sfix_look1_dyn.mex32" then can convert enumerated parameters to integer and then can pass to Look up table. "sfix_look1_dyn.mex32" does it for 1 D Lookup. – Swapnil Jul 11 '14 at 07:24
  • @Swapnil, you can always mask n-d lookup block inside a Atomic Subsytem see [this](http://stackoverflow.com/a/24680462/1870232) answer, you may also have to play around with Simulink API inside Parameter Dialog callback if that's sounds too complex, I'd suggest writing your own s-function to perform desired operation, but that's the last thing you have to do. – P0W Jul 11 '14 at 09:48
  • Thanks for your suggestion. But here the problem is when I use masked subsystem and its callbacks to convert my enumerated parameters, I loose the tunability of parameters that may cause a problem after code generation. – Swapnil Jul 14 '14 at 07:17