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

Write a MATLAB function [d1, u1, l1, c1, r1] = NaiveGaussArrow(d, u, l, c, r) that takes as input the 5 vectors de ned above representing A. This function performs Naive Gauss redu

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

Customizing Plots : There are numerous ways to customize figures in the Figure Window. On clicking the Plot Tools icon will bring up the Property Editor & Plot Browser, with ma

Concatenation: The String concatenation means to join the strings altogether. Of course, as strings are merely vectors of the characters, the technique of concatenating vector

Labels and Prompts: The script loads all the numbers from file into a row vector. It then splits the vector; it stores the initial element that is the experiment number in a v

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

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

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

Illustration of a recursive function: illustration is of a recursive function which does not return anything, but simply prints. The below function prtwords receives a sentenc