Main Content

slreportgen.utils.isLookupTable

Check if lookup table block

Description

example

tf = slreportgen.utils.isLookupTable(obj) tests whether the obj is a lookup table block.

These lookup table blocks are supported:

Examples

collapse all

Use isLookupTable to test whether a block is a type of lookup table block.

Find blocks in a container, such as a model, and obtain its results.

blkfinder = slreportgen.finder.BlockFinder(model_name);
results = find(blkfinder);

Then, loop through the results and test whether each block is a lookup table block. For each result that is a lookup table block, create a LookupTable reporter, and add the reporter to the report.

for i=1:length(results)
   block = results(i).Object;
   if slreportgen.utils.isLookupTable(block)
      rptr = LookupTable(block);
      add(rpt,rptr);
   end
end

Input Arguments

collapse all

Simulink block to query for whether it is a lookup table block, specified as a string or character array of its block path or handle.

Output Arguments

collapse all

Whether input is a lookup table block, returned as 1 (true) if the input is a lookup table block. Otherwise, it returns 0 (false).

Introduced in R2018a