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

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

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

Built-in function for Differentiation: The MATLAB has a built-in function, diff that returns the differences between consecutive elements in a vector. For illustration, >>

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

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

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

Three-dimensional pie and bar: For the bar3 function, x & y vectors are passed and the function displays three-dimensional bars as shown in figure: Figure: Three-dimen