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
Pie chart - plot functions: The MATLAB also has a function pie which will generate a pie chart. Calling the function with the form pie (vec) draws a pie chart, by using the pe

5 p2+8p+15, 3 p2-3p-18, 12 p2-p-30

Illustration of Writing to files: Here is the other illustration in which a matrix is written to a file. At First, an arbitrary 2 × 4 matrix is generated, and then it is writt

Find Minimum and Maximum for each row To find the maximum (or minimum) for each row, the dimension of 2 (that is how a MATLAB refers to rows) can be identified as the third arg

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

Function isreal - complex numbers: The function isreal returns 1 for logical true when there is no imaginary part of the argument, or 0 for false when the argument does have a

Using Functions with the Vectors and Matrices: As MATLAB is written to work with the vectors and matrices, the whole vector or matrix can be passed as an argument to the funct

Creating Customized strings: There are many built-in functions which create customized strings, including blanks, char, and sprintf. We know that the char function can be u

Illustration of Minimum and Maximum Value Both of these functions also return the index of the minimum or maximum value; when there is more than one occurrence, it returns the

Use of logical vector: Determine how many elements in the vector vec were greater than 5, the sum function can be used on the resulting vector isg: >> sum(isg) ans =