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 recursive function in MATLAB: We have seen that the built-in function in MATLAB to compute factorials, termed as the factorial and we know how to implement the iterat

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

Strings as matrix: The matrix can be generated, that consists of strings in each row. Therefore, essentially it is created as a column vector of strings, but the final result

Differentiation: The derivative of a function y = f(x) can be written as follows or f  '(x) and is defined as the rate of change of the dependent variable y with respe

Creating string Variables: The string consists of a few numbers of characters (including, possibly, none). These are the illustrations of the strings: '' 'x' 'ca

Illustrations of Variable number of output arguments: In the illustrations shown here, the user should actually know the type of the argument in order to establish how many va

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

Example of Logical built-in functions: For equivalent to all the function, we should make sure that the entire elements in the vector are logically true. The one way of doing

bar and barh functions: For a matrix, the bar and barh functions will group altogether the values in each and every row. The illustration is as shown: rm = randint(2,4,[1

Dimensions - matrix: The size and length functions in the MATLAB are used to find array dimensions. Length function returns the number of elements in the vector. The size func