Using MATLAB after learning SCILAB


SCILAB and Matlab are very similar in operation: they both are numerical environments based on vector/matrix manipulations. They both use script files, function files, and diary files. Some differences, however, are present, and one need to be aware of them if interested in using Matlab after having learned the basic operation of SCILAB. Some of those differences are listed in the document Matlab and Scilab comparisons available for download in my Scilab notes and functions web page (a single URL): http://www.engineering.usu.edu/cee/faculty/gurro/Software_Calculators/Scilab_Docs/SCILAB _Notes&Functions.htm The notes in this document show examples of application of Matlab. Matlab is available in the PC Lab under Start > Programs > Math Tools > Matlab . The following notes refer to some Matlab functions as well as examples of Matlab operations. Matlab interface The following examples were created using an older Student version of Matlab, however, the interface remains similar to the current version. When you launch the Student version of Matlab that I have available, you will get the following interface: This interface is very similar to that of SCILAB, with similar options available in the different menus shown. You can type Matlab commands in front of the prompt (in this case, the prompt is EDU>>), just like you do in SCILAB. If you need help with Matlab functions or its operation, use the online help facility by choosing the Help menu in the menu bar. Information about this facility is provided next. ? To save the script, use the option Save As… from the File menu in the toolbar. This will prompt you for the name of the M-file that will store the script. The default directory where MATLAB provides is a directory called Work within the MATLAB installation directory. You can choose to save it in this directory or change to another directory or drive. If you are using MATLAB in the PC Lab you want to save to your diskette or zip drive. Save the current script as Script1.m ? To run the script, select the option Run Script… from the File menu in the toolbar. This will produce an input box where you can type the address of the M-file containing the script. You can also click on the Browse button in the input form and navigate your way to the corresponding M-file. If using the latter option, you need to highlight the desired file, when found, and press the Open button in the corresponding form. This will load the name of the M-file in the input form. Once the name is loaded, press OK to run the script. MATLAB will execute the script providing the required output. If there are syntax errors in the script, the errors will be reported and execution of the script will be stopped. As an exercise, run the script contained in the file Script.m that we saved earlier. This script requires the user to enter a row vector. The example shown here uses the vector…

Download Using MATLAB after learning SCILAB.Pdf

Leave a Reply