Main Content

代码替换查看器

Explore content of code replacement libraries

Description

The Code Replacement Viewer displays the content of code replacement libraries and tables. You can use this tool to explore and choose a code replacement library or to view a predefined code replacement table. If you develop a custom code replacement library, you can use this viewer to verify table entries for the following properties:

  • Argument order is correct.

  • Conceptual argument names match code generator naming conventions.

  • 实现argument names are correct.

  • Header or source file specification is not missing.

  • I/O types are correct.

  • Relative priority of entries is correct (highest priority is 0, and lowest priority is 100).

  • Saturation or rounding mode specifications are not missing.

If you specify a library name when you open the viewer, the viewer displays the code replacement tables for that library. If you specify a table name when you open the viewer, the viewer displays the function and operator code replacement entries for that table. The viewer can only display code replacement tables that are defined. For more information on creating code replacement tables, seeDefine Code Replacement Library Optimizations(Embedded Coder).

Open the Code Replacement Viewer

Open from the MATLAB®command prompt usingcrviewer.

Examples

expand all

This example opens the registered code replacement libraryGNU C99 extensions.

crviewer('GNU C99 extensions')

This example opens a predefined code replacement tablecrl_table_sinfcn. To learn how to create this example table, seeDefine Code Replacement Library Optimizations(Embedded Coder).

crviewer(crl_table_sinfcn)

Related Examples

Programmatic Use

expand all

crviewer('library')opens the Code Replacement Viewer and displays the contents of图书馆, where图书馆is a character vector that names a registered code replacement library.

crviewer(table)opens the Code Replacement Viewer and displays the contents of a predefinedtable, wheretableis a MATLAB file that defines code replacement tables. The table must be user predefined and the file must be in the current folder or on the MATLAB path.

Introduced in R2014b