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
Applications of Customized Strings: Labels, Prompts, Arguments to Functions: The one of very useful application of this is to involve numbers in strings that are used to plot

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 =

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

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

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

Sorting The Sorting is a process of putting a list in order; either in descending (maximum to minimum), or ascending (minimum to maximum) order. For illustration, here is a li

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

Illustration of Writing variables to a file: For illustration, in the below session in the Command Window, 3 variables are generated; these are then exhibited using who. Then,

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

Illustration of Logical vectors: Calling the function appears to return similar vector as simply vec > 5, and summing the result still works to determine how many elements wer