Freehand signal data is data that you add graphically. Signal Editor allows you to add
freehand signal data using a mouse or touchscreen (if available and supported). While using
a touchscreen, use common multi-touch gestures such as tap, pan, pinch, and double-tap
(select all). By default, freehand signal data is in
To add freehand signal data, in the Signal Editor tab, select Signal > Draw Signal option. A Draw tab opens.
You can draw your own signal lines or points, use MATLAB® expression to enter data, move signal lines or points across the canvas, take an image of the lines of the canvas, and add the data to the Signal Editor.
To create signal data, in the Edit section:
Insert a single data point by clicking Point and then clicking in the graph area. If you add additional points, the tool connects the points.
Insert a signal line by clicking Line and then clicking in the graph area. To extend the line, click on the endpoints of the line and draw the extension.
When you insert signals or signal lines, the canvas adds a shaded area bound by the leftmost and rightmost endpoints. While in Insert Line mode, you cannot add more points within this shaded area. You add additional line points outside the shaded area.
Draw a signal freehand by clicking Draw.
Draw a signal using MATLAB expressions by clicking Expression (, Ctrl+E). Enter time and data values that create signal points that are scalars or vectors whose number of points match the time points.
To select or move signal data, in the Signal section:
Select a point or line by clicking Select and then selecting the point or area to be selected.
Move a point or line by clicking Move.
To edit or remove the signal data, in the Edit section:
Change the data of a point by clicking Edit Point. In the Edit Point dialog box, enter the new Time and Data values. These values must be scalar.
To work with the canvas, use the tools in the Align, Show, and Zoom sections.
Snap the canvas graph to various grids using the tools in the Align section. Snapping to grid helps you better control data accuracy while drawing signals. For example, consider snapping to the x-grid to uniformly sample signal values or snapping to the y-grid to control the amplitude of a ramp signal.
Toggle the display of data points, grid lines, and data markers in the canvas, explore the commands in the Align and Show sections. To zoom in and out of the canvas, see Zoom & Pan. These actions are touchscreen supported with the pan and pinch gestures. For more information, see Create Signals and Signal Data.
To work with signal properties, use the parameters in the Signal Properties section. For example, to see the changed values of your signal as you change data types in the Data type parameter, select the Show result of cast to data type. The original line is blue, the changed values are represented by the black line. This graphic illustrates a signal line with negative double values recast as uint8.
To capture an image of the signal data, in the Capture section, click Screenshot (). In the Save a screenshot dialog box, specify a name and graphic type for the file.
When you are done drawing the signal, in the Insert section:
To add the signal to the Signal Editor, click Insert signal ().
To return to the main Signal Editor window and check that the signal has been added, click Close draw tab (). Signal Editor discards any noninserted signal data.
To observe the drawn signal data In Signal Editor, click the signal name in the hierarchy.
For an example of how to add a freehand ramp signal, see Draw a Ramp Using Snap to Grid for Accuracy.