File And Workspace Management In Matlab

Commands in MATLAB can be ENTER interactively in the command window or save them in an M-File. So it's important to know some commands in file management. The table below shows some commands and their uses for file management in MATLAB.

dir, ls
Display files in the active directory
delete filename
Remove file names
cd, pwd
Displays active directory
cd dir, chdir
Change directory
type filename
Display the contents of the file name
Display .m and .mat files that are in active directory

The commands in the table below help users in managing workspaces in MATLAB.

Display all variables in the workspace
Displays all variables in the workspace along with the size of bytes, array dimensions and object types
Remove all variables from the workspace
Clear x y
Remove the x and y variables from the workspace

Being able to get data in MATLAB and save it is very important. Following are some ways to get data from inside and outside MATLAB.

1. In the Command Window: the following is how to use the save and load command.

save filename
Save all commands in filename.mat
save filename var1 var2
Saving only var1 and var2 variables in filename.mat
save filename var1 -ascii
Save the var1 variable in ASCII format on the filename

2. There are commands for saving and loading workspaces. For saving: there is a Save Workspace menu button while for Loading there is an Open menu button.

3. Import: in Matlab, there is a window like spreadsheet for inputting data in facilitating importing a data set.

0 Response to "File And Workspace Management In Matlab"

Posting Komentar

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel