What can I call inline functions that are not inline?

table()is a standard feature in MATLAB with R2013b. As far as I can see from the documentation, there is nothing special table, compared to sum, cell, structor any other built-in function .

However, when I try to run the function using builtin('table',var1,...varN), I get an error message:

Error using built-in

Cannot find the built-in function 'table'

Investigating this further shows that it is not actually considered an inline function:

which('cell')
built-in (C:\Program Files\MATLAB\R2014b\toolbox\matlab\datatypes\cell)

which('table')
C:\Program Files\MATLAB\R2014b\toolbox\matlab\datatypes\@table\table.m  % table constructor
|
Not builtin

Further research:

which cell2mat
C:\Program Files\MATLAB\R2014b\toolbox\matlab\datatypes\cell2mat.m

which mat2cell
C:\Program Files\MATLAB\R2014b\toolbox\matlab\datatypes\mat2cell.m

which table2array
C:\Program Files\MATLAB\R2014b\toolbox\matlab\datatypes\table2array.m

which struct2cell
built-in (C:\Program Files\MATLAB\R2014b\toolbox\matlab\datatypes\@struct\struct2cell)  % struct method

which cell2struct
built-in (C:\Program Files\MATLAB\R2014b\toolbox\matlab\datatypes\@cell\cell2struct)  % cell method

So, cellbuilt in, but tablenot. cell2structbuilt in, but cell2matnot.

, , MATLAB?


, " ", , .

+4
2

:

allTables = which  ( '-all', 'table' )
allTables(cell2mat(strfind ( allTables, matlabroot )))

(, ) ...

+2

builtin :

MATLAB. MATLAB MATLAB. .m, .

+2

Source: https://habr.com/ru/post/1627304/


All Articles