| Contents | Index |
| On this page… |
|---|
To import data for a discrete signal, specify a signal-only structure as the input value. Do not specify a time vector.
Set the sample time for the Inport, Trigger, or From Workspace block.
For the data that you want to import, specify a structure variable that does not include a time vector. For example, for the variable called import_var:
import_var.time = []; import_var.signals.values = [0; 1; 5; 8; 10]; import_var.signals.dimension = 1;
The input for the first time step is read from the first element of an input port value array. The value for the second time step is read from the second element of the value array, and so on.
For details about how to specify the signal value and dimension data, see Specifying Signal Data.
In the block parameters dialog box for the block that imports the data, clear the Interpolate data parameter.
If you are using a From Workspace block to import data, set the Form output after final data value by parameter to a value other than Extrapolation.
![]() | Importing Data to Model a Continuous Plant | Importing Data to Create an Input Test Case | ![]() |

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 |