Writing variables to a file, MATLAB in Mathematics

Writing variables to a File:

The save command is used to write variables to a file, or to append the variables to a MAT-file. By the default, save function writes to a MAT-file. It can either save the whole present workspace (all variables which have been generated), or a subset of the workspace (involving, for illustration, just 1 variable). The function save will save the file in the present directory, therefore it is important to set that properly first.

To save all the workspace variables in a file, the command is as shown below:

save filename

The .mat extension is automatically added to the filename. The contents of the file can be exhibited by using who with the -file qualifier:

who -file filename

 

 

Posted Date: 10/20/2012 6:40:55 AM | Location : United States







Related Discussions:- Writing variables to a file, Assignment Help, Ask Question on Writing variables to a file, Get Answer, Expert's Help, Writing variables to a file Discussions

Write discussion on Writing variables to a file
Your posts are moderated
Related Questions
Built-in functions for Complex numbers:   We know that in MATLAB both i and j are built-in functions which return √-1 (therefore, they can be thought of as built-in constants).

Sorting The Sorting is a process of putting a list in order; either in descending (maximum to minimum), or ascending (minimum to maximum) order. For illustration, here is a li

strvcat function - concatenation: The function strvcat will concatenate it vertically, that means that it will generate a column vector of the strings.   >> strvcat(fir

Types of User-defined Functions: We know how to write a user-defined function, stored in an M-file, which computes and returns one value. This is merely one type of the functi


Indexed empty matrix: The Individual elements cannot be eliminated from matrices, as matrices always have the similar number of elements in every row. >> mat = [7 9 8; 4 6

Changing Dimensions: In addition to transpose operator, the MATLAB has some built-in functions which change the dimensions or configuration of matrices, involving fliplr, resh

Logical Vectors: The relational operators can also be used with the vectors and matrices. For illustration, let's say that there is a vector, and we want to compare each eleme

Illustration of Variance For illustration, for the vector [4, 6, 1, 5], there are n = 4 values therefore n - 1 is 3. The mean of this data set is also 4. The variance will be

Three-Dimensional Plots: The MATLAB has many functions which will display three-dimensional plots. Most of these functions have similar name as corresponding two-dimensional p