Ministry of education and science, youth and sport of Ukraine
National Aviation University
Computer Science Faculty
Department of Software Engineering
Computer Architecture
Laboratory work 3
The Desktop Tools
And In The Development Environment
Prepared by: Student of CSF-205
Bashuk Kirill
Accepted by: Associate Professor
Romanov E.I.
Kyiv 2012
Content
Conclusion 14
References 15
Lab_2 CA_Sec.pdf . Romanov E.I. 1p. 15
Lec_2_CA_engl.pdf . Romanov E.I. 5p. 15
Help of MatLab R2012a (7.14.0.739). The MathWorks Inc. 1984-2012 15
Official link of software: http://www.mathworks.com/ 15
Subject: Working With The Desktop Tools And In The Development Environment
Goal: Study MATLAB Desktop Tools and Development Environment
Tasks
1. Current Directory, Search Path, and File:
Management;
About the Current Directory and Search Path;
Current Directory;
Search Path.
2. Workspace Browser and Variable Editor:
Workspace Browser;
Variable Editor.
3. Editor:
Editing M-Files;
Publishing M-Files.
4. Improving and Tuning M-Files:
Finding Errors Using the M-Lint Code Report;
Improving Performance Using the Profiler.
Current Directory, Search Path, and File Management
Current Directory
Fig.1 Current folder(1)
Fig.1 Current folder(2)
You can use the Current Directory browser, a desktop tool that provides a convenient way to organize and manage your files in MATLAB. You can view, open, and make changes to directories and files. Using the Current Directory browser, you can find files and use MATLAB application features on your files such as running them or opening them. Alternatively, you can use equivalent functions to organize and manage your files, including dir, cd, and delete.
There are many other features you can use in the Current Directory browser, such as generating reports to help you tune and manage your M-files. You can also interface with your source control system.
Search Path
MATLAB uses a search path to find M-files and other files related to MATLAB, which are organized in directories on your file system. Any file you Want to run in MATLAB must reside in the current directory or in a directory that is on the search path. By default, the search path includes files supplied with MATLAB and other MathWorks products. At startup, MATLAB also adds the userpath directory, a location where you can store files you create for use with MATLAB. If you have M-files and related files for MATLAB in other locations, add the directories in which they are located to the MATLAB search path. However, do not store the files in directories supplied by The MathWorks, or you might experience problems.
To see which directories are on the search path or to add directories to or remove them from the search path, select File > Set Path Fig.3
and use the resulting Set Path dialog box. Alternatively, you can use the path function to view the search path, addpath to add directories to the path, and rmpath to remove directories from the path.
The following illustration shows an example of how the MATLAB search path works.
Fig.3 Set Path dialog box
Workspace Browser and Variable Editor
Workspace Browser
The MATLAB workspace consists of the set of variables built up during a MATLAB session and stored in memory. You add variables to the workspace by using functions, running M-files, and loading saved workspaces.
To view the workspace and information about each variable, use the Workspace browser, or use the functions who and whos. Fig 4
To delete variables from the workspace, select the variables, and then select Edit > Delete. Alternatively, use the clear vars or clear functions.
Fig.4 Workspace browser