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
Types of User-defined Functions: We know how to write a user-defined function, stored in an M-file, which computes and returns one value. This is merely one type of the functi

how can reconstruct just part of an image using imreconstruct?

Print an imaginary number: To print an imaginary number, the function disp will show both parts automatically: >> disp(z1)    4.0000 + 2.0000i The function fprint

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

Illustration of nested function: The output arguments are distinct from variables. The scope of an output argument is merely the nested function; and it cannot be used in the

How do I write a product series running from i to n of x''s using a for loop?

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

Structure Consisting of the Fields A MATLAB can also solve the sets of equations. In this illustration, the solutions for x, y, & z are returned as a structure consisting of th

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

Logical Vectors: The relational operators can also be used with the vectors and matrices. For illustration, let's say that there is a vector, and we want to compare each eleme