Writing and reading spreadsheet files, MATLAB in Mathematics

Writing and Reading Spreadsheet Files:

The MATLAB functions xlswrite & xlsread will write to and read from the spreadsheet files which have the extension .xls. For illustration, the below will generate a 5 × 3 matrix of arbitrary integers, and then write it to a spreadsheet file known as the 'ranexcel.xls' which has five rows and three columns:

>> ranmat = randint(5,3,[1 100])

ranmat =

   96   77   62

   24   46   80

   61   2   93

   49   83   74

   90   45   18

>> xlswrite('ranexcel',ranmat)

 

Posted Date: 10/20/2012 6:33:43 AM | Location : United States







Related Discussions:- Writing and reading spreadsheet files, Assignment Help, Ask Question on Writing and reading spreadsheet files, Get Answer, Expert's Help, Writing and reading spreadsheet files Discussions

Write discussion on Writing and reading spreadsheet files
Your posts are moderated
Related Questions
Empty Vectors: An empty vector or in another words, a vector which stores no values, can be generated using the empty square brackets: >> evec = [] evec = [] >> lengt

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-fil

Plot Functions: Faraway, we have plotted to generate two-dimensional plots and bar to generate bar charts. We have seen how to clear the Figure Window by using clf, and how to

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

Strcat function - Concatenation : The strcat function, though, will eliminate the trailing blanks from strings before concatenating. Note that in these illustrations, the trail

sprintf function: The sprintf function works precisely like the fprintf function, but rather than printing it generates a string. Here are some illustrations in which the outp

Function fopen - file function: The permission string in the call to the fopen function identifies that the file is opened for writing to it. Just as when reading from a file,

Example of Recursive functions: This definition is recursive as a factorial is defined in terms of the other factorial. There are two parts to any recursive definition: the co

Illustration of Advanced file input and output: For illustration, to refer to the third number in the first element of the cell array: >> subjdata{1}(3) ans =

Fliplr function: The fliplr function "flips" the matrix from left to right (in another words the left-most column, the first column, become the last column and so on), and the