Function xlsread - file function, MATLAB in Mathematics

Function xlsread - file function:

The function xlsread will read from the spreadsheet file. For illustration, to read from file just generated:

>> ssnums = xlsread('ranexcel')

ssnums =

   96   77   62

   24   46   80

   61   2   93

   49   83   74

   90   45   18

 

In both situations the .xls extension on the filename is the default, therefore it can be omitted.

These are shown in their fundamental forms, whenever the matrix or spreadsheet holds just numbers and the whole spreadsheet is read or matrix is written. There are lots of qualifiers which can be used for these functions, though. For illustration, the below would read from the spreadsheet file 'texttest.xls' which contains:

 

a 123 Cindy

b 333 Suzanne

c 432 David

d 987 Burt

>> [nums, txt] = xlsread('texttest.xls')

nums =

   123

   333

   432

   987

txt =

   'a'  ''  'Cindy'

   'b'  ''  'Suzanne'

   'c'  ''  'David'

   'd'  ''  'Burt

Posted Date: 10/20/2012 6:38:58 AM | Location : United States







Related Discussions:- Function xlsread - file function, Assignment Help, Ask Question on Function xlsread - file function, Get Answer, Expert's Help, Function xlsread - file function Discussions

Write discussion on Function xlsread - file function
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

Illustrations of Variable number of output arguments: In the illustrations shown here, the user should actually know the type of the argument in order to establish how many va

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

This project requires you to use the ideas of Chapter 25 regarding maximization of a function. Here we assume that evolution has acted to generate highly efficient foragers. By hig

Illustration of Spreadsheet Files: This reads the numbers in a double vector variable nums and the text in a cell array txt (the xlsread function forever returns the numbers f

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

how can reconstruct just part of an image using imreconstruct?

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 illustratio

Example of Symbolic Expression When there is more than one variable, the MATLAB selects which to solve for. In the illustration below, the equation ax 2 + bx = 0 is solved. Th

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