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
Error-checking for integers: illustrations of running this script as shown below: >> readoneint Enter an integer: 9.5 Invalid! Enter an integer: 3.6 Invalid

Symbolic Expression The solve function solves an equation and returns the solution(s) as symbolic expressions. The answer can be converted to numbers by using any numeric funct

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

fprintf function - File function: The fprintf function really returns the number of bytes which was written to the file, therefore if you do not want to see that number, suppr

Concatenation: The String concatenation means to join the strings altogether. Of course, as strings are merely vectors of the characters, the technique of concatenating vector

Counting in a While Loop: Whenever it is not known ahead of the time how many values will be entered into the script, it is often essential to count the number of values which

Polar Form: Any complex number z = a + bi can be thought of as a point (a,b) or vector in the complex plane in which the horizontal axis is the real part of z, and the vertica

Animation: In this part we will observe a couple of ways to animate a plot. These are visuals, therefore the outcomes can't really be shown here; it is essential to type these

Illustration of logical built-in functions: The function find returns the indices of a vector which meet certain criteria. For illustration, to find all the elements in a vect

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