Illustration of spreadsheet files, MATLAB in Mathematics

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 first and later text). The cell array is 4 × 3. It consist three columns as the file had three columns, but as the middle column had numbers (that were extracted and stored in the nums vector), at middle column in the cell array txt consists of the empty strings.

>> txt{1,2}

ans =

    ''

>> txt{1,3}

ans =

Cindy

 

A loop can then be used to echo-print the values from the spreadsheet in the original format:

>> for i = 1:length(nums)

     fprintf('%c %d %s\n', txt{i,1}, ...

      nums(i), txt{i,3})

   end

a  123  Cindy

b  333  Suzanne

c  432  David

d  987  Burt

Posted Date: 10/20/2012 6:39:57 AM | Location : United States







Related Discussions:- Illustration of spreadsheet files, Assignment Help, Ask Question on Illustration of spreadsheet files, Get Answer, Expert's Help, Illustration of spreadsheet files Discussions

Write discussion on Illustration of spreadsheet files
Your posts are moderated
Related Questions
how can reconstruct just part of an image using imreconstruct?

If I have a vector representing the packed storage form of a symmetric matrix, how do I perform a cholesky factorisation on that?

Three-dimensional pie and bar: For the bar3 function, x & y vectors are passed and the function displays three-dimensional bars as shown in figure: Figure: Three-dimen

Three-Dimensional Plots: The MATLAB has many functions which will display three-dimensional plots. Most of these functions have similar name as corresponding two-dimensional p

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

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

User-defined functions: Therefore, although many functions compute and return values, some do not. A few functions rather merely accomplish a task. Regardless of what type of

Complex numbers: A complex number is commonly written in the form z = a + bi here a is known as the real part of the number z, b be the imaginary part of z, and i is √-1

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

Indexed empty matrix: The Individual elements cannot be eliminated from matrices, as matrices always have the similar number of elements in every row. >> mat = [7 9 8; 4 6