Function xlsread - file function, MATLAB in Mathematics

Assignment Help:

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


Related Discussions:- Function xlsread - file function

Strings as vectors, Strings as Vectors: The Strings are considered as ...

Strings as Vectors: The Strings are considered as vectors of characters-or in another words, a vector in which each and every element is a single character-so numerous vector

Illustrations of variable number of output arguments, Illustrations of Vari...

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

Illustration of writing variables to a file, Illustration of Writing variab...

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,

Example of recursive functions, Example of Recursive functions: This d...

Example of Recursive functions: This definition is recursive as a factorial is defined in terms of the other factorial. There are two parts to any recursive definition: the co

Pie chart - plot functions, Pie chart - plot functions: The MATLAB als...

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

Illustration of logical vectors, Illustration of Logical vectors: Call...

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

Applications of customized strings, Applications of Customized Strings: Lab...

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

Strings as matrix, Strings as matrix: The matrix can be generated, tha...

Strings as matrix: The matrix can be generated, that consists of strings in each row. Therefore, essentially it is created as a column vector of strings, but the final result

Using functions with the vectors and matrices, Using Functions with the Vec...

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

Dimensions - matrix, Dimensions - matrix: The size and length function...

Dimensions - matrix: The size and length functions in the MATLAB are used to find array dimensions. Length function returns the number of elements in the vector. The size func

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd