Skip to Main Content Skip to Search
Product Documentation

Example

About the Example

This example uses a Simulink software demo engine model. It involves two parts — first creating a print frame, and then printing the engine model with that print frame. The result looks similar to the figure below.

Create the Print Frame

  1. At the MATLAB prompt, type frameedit.

    The PrintFrame Editor window appears.

  2. Set up the page:

    1. Select Page Setup from the File menu.

      The PrintFrame Page Setup dialog box opens.

    2. For Paper Type, select a size that is appropriate for your printer.

    3. For this example, keep the Paper Orientation as Landscape and the Margins set to 0.75 inches.

    4. Click the OK button.

      The dialog box closes. The print frame you see in the PrintFrame Editor window will reflect your changes.

  3. Add the information entries %<blockdiagram>, %<fullsystem>, and %<page>.

    1. Click within the upper row in the print frame.

    2. From the bottom right list box, select Block Diagram, then click Add. The %<blockdiagram> appears in the row.

    3. Click within the lower left cell in the print frame.

    4. From the bottom right list box, select Full System Name, then click Add. The %<fullsystem> appears in the cell.

    5. Click within the lower right cell in the print frame.

    6. From the bottom right list box, select Page Number, then click Add. The %<page> appears in the cell.

  4. Add a row at the top.

    1. Click within the upper row in the print frame, the row that contains the %<blockdiagram> entry.

      Be sure that handles appear on all four corners of the row.

    2. Click the add row button.

      A new row appears at the top, above the row you selected.

  5. Make the new row shorter.

    1. Click on the horizontal line that separates the top row (the row you just added) from the row beneath it (the row containing the %<blockdiagram> entry).

      Be sure that only two handles appear, one at each end of the line. If you see four handles in either row, click directly on the horizontal line and the other two handles disappear.

    2. Drag the line up until the top row is about the same height as the row at the bottom of the print frame.

  6. Add information in the top row.

    1. Click anywhere within the top row (the row you just added).

    2. Select Text from the information list box.

    3. Click the Add button.

      An edit box appears in the cell.

    4. Type Engine Division, press the Enter key to advance the cursor to the next line, and then type Advanced Design Group.

      Click the zoom in button if you need to magnify the entry.

    5. Click outside of the edit box to end editing mode.

  7. In the left cell of the bottom row, align the information on the left.

    1. Click the zoom out button if you need to.

    2. Click within the left cell of the bottom row to select it.

    3. Click the left alignment button.

    The entry moves to the left.

  8. Make the information in the top row appear in italics.

    1. Right-click on the entry in the row.

    2. Select Font Style from the pop-up menu.

      If the pop-up menu for font properties does not appear, you are in editing mode. Click outside of the edit box to end editing mode and then right-click the text to access the pop-up menu.

    3. From the Font Style pop-up menu, select italic.

    The entry in the cell appears in italics and the information will appear in italics when the print frame is printed with a Simulink diagram.

  9. Add the total number of pages to the right cell in the bottom row.

    1. Click within the cell to select it.

    2. Add the total pages entry: select Total Pages from the information list box and click the Add button.

      The %<npages> entry appears after the %<page> entry. If you need to, zoom in to see the entry.

    3. Add the text of after the page number entry. Click the cursor after the %<page> entry, and then type of (type a space before and after the word).

    The information in the cell now is: %<page> of %<npages>.

  10. Save the print frame: select Save As from the File menu. In the Save Frame dialog box, type engdivl for the File name. Click the Save button.

    The print frame is saved as a figure file.

  11. You can close the PrintFrame Editor window by clicking the close box.

Print the Block Diagram with the Print Frame

  1. To view the Simulink engine model, type sldemo_engine at the MATLAB prompt.

    The engine model appears in a Simulink window.

  2. Double-click the Throttle & Manifold block.

    The Throttle & Manifold subsystem opens in a new window.

  3. In the Throttle & Manifold window, select Print from the File menu.

    The Print Model dialog box opens with the default settings as shown here.

  4. In the Print Model dialog box, set the page orientation to landscape. This example uses the techniques for computers running the Microsoft Windows operating system. Use the methods for your own platform to change the page orientation for printing.

    1. Click the Properties button.

      The Document Properties dialog box opens.

    2. Go to the Page Setup tab.

    3. For Orientation, select Landscape.

    4. Click OK.

      The Document Properties dialog box closes.

  5. In the Print Model dialog box, under Options, select Current system and below.

    This specifies that the Throttle & Manifold block diagram and its subsystems will print.

  6. Check the Frame check box.

  7. Specify the print frame to use.

    1. Click the ... button.

    2. In the Frame File Selection dialog box, find the file name of the print frame you just created, engdivl.fig, and select it.

    3. Click the Open button.

      The path and file name appear in the Frame edit box.

  8. Click OK in the Print Model dialog box.

    The Throttle & Manifold block diagram prints with the print frame; it should look similar to the figure shown at the start of this example.

    In addition, the Throttle block diagram and the Intake Manifold block diagram print because you specified printing of the current system and its subsystems. These block diagrams also print with the engdivl print frame, but note that their variable information in the print frame is different.

  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

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