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
5 p2+8p+15, 3 p2-3p-18, 12 p2-p-30

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 =

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

Creating Customized strings: There are many built-in functions which create customized strings, including blanks, char, and sprintf. We know that the char function can be u

Give the formula for a rational function that has a hole at x=7 & vertical asmptote at x=-3/2

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

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

Built-in functions for Complex numbers:   We know that in MATLAB both i and j are built-in functions which return √-1 (therefore, they can be thought of as built-in constants).

Animation: In this part we will observe a couple of ways to animate a plot. These are visuals, therefore the outcomes can't really be shown here; it is essential to type these

Writing variables to a File: The save command is used to write variables to a file, or to append the variables to a MAT-file. By the default, save function writes to a MAT-fil