Skip to Main Content Skip to Search
Product Documentation

Text - Format and insert text into report

Description

This component formats and inserts text into the report. It must have the Paragraph component as its parent.

Properties

Text to include in report: Specifies text to include in the report.

%<VariableName> Notation

You can enter %<VariableName> in this field (and in any field where the text appears blue) to include the value of a variable from the base MATLAB workspace. You cannot enter more than one variable in %<>. If you enter an invalid variable name, the report includes the text %<VariableName> instead of the value of the variable.

Example

  1. Enter the following text:

    I have a %<ObjName> and it has %<NumLeaves> leaves. 
    The word '%<ObjName>' has %<size(ObjName)> letters.
    
  2. Set ObjName = "plant" and NumLeaves = 3.

  3. Generate the report. It looks as follows:

    I have a plant and it has 3 leaves.
    The word 'plant' has 5 letters.
    

Style

Insert Anything into Report?

Yes. Text.

Class

rptgen.cfr_text

See Also

Chapter/Subsection, Empty Component, Image, Link, List, Paragraph, Table, Title Page

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS