MATLAB is a comprehensive software package that performs scientific and technical computations and simulations. It provides a host of tools to perform complex data analyses. In MATLAB a system is described by a set of small programs called scripts. To test the system, you can generate input signals in MATLAB. These signals are generated through built-in scripts, which you can access with MATLAB functions. You can make a function call in a script where an input signal is to be provided.
Things You'll Need
- MATLAB installed on a computer
Start the MATLAB program by double clicking on its icon on the desktop or from "All Programs" in the "Start" menu.
Open the MATLAB program in which the input signal has to be included. Do this by double clicking on the program file name in the file explorer pan on the left of the MATLAB window. This will open the program in a new text editor window.
Identify the location in the program where the input signal is to be included.
Type "t = [0:0.1:10];" and press "Enter" to create time. In this example, time is created from 0 to 10 seconds at intervals of 0.1 second. At the next line, type "x = sin(pit/2);" and press "Enter". This will create a "sine" signal for the interval "t". Other types of signals can also be created, for example to create a quadratic signal, the "sine" function can be replaced by "x = 2.15tt + 3.17t-6.7;". Here 2.15, 3.17 and 6.7 are coefficients of the quadratic function, which can be changed to other values as required. You can find more examples of signals in the link provided as a reference below.