You can call toolbox functions directly if they are supported for code generation. For a list of supported functions, see Functions and Objects Supported for C/C++ Code Generation — Alphabetical List.