Example of file ploting data, MATLAB in Engineering

Example of file ploting data:

As the other example, a data file called 'compsales.dat' stores the sales figures (in millions) for divisions in a company.

Each line in the file stores the sales number, followed by an short form of the division name, in the following format which is as shown below:

5.2 X

3.3 A

5.8 P

2.9 Q

 

The script below uses the textscan function to read this information into a cell array, and then uses the subplot to produce a Figure Window which displays the information in a bar chart and in a pie chart as shown in figure.

812_example of plting file data.png

1512_example of plting file data1.png

Posted Date: 10/22/2012 2:25:02 AM | Location : United States







Related Discussions:- Example of file ploting data, Assignment Help, Ask Question on Example of file ploting data, Get Answer, Expert's Help, Example of file ploting data Discussions

Write discussion on Example of file ploting data
Your posts are moderated
Related Questions
analyzing traffic; determine motion of flow; calculate tracklets; detect abnormalities;

A matlab function to calculate filter order

Appending variables to the Mat-File: Appending to the file adds to what has been saved in a file, and is accomplished by using the -append option. For illustration, supposing

Matrix operations: There are some common operations on matrices. The operators which are applied term by term, implying that the matrices should be of similar size, sometimes

Illustration of finding a sting: Let's enlarge this, and write a script which creates a vector of strings which are phrases. The outcome is not suppressed so that the string

Example of Interpolation and extrapolation: The MATLAB has a function to do this, known as polyfit. The function polyfit finds the coefficients of the polynomial of the partic

Image Processing: The Images are represented as grids, or matrices, of picture elements (known as pixels). In MATLAB an image usually is represented as a matrix in which each

readlenwid function: function call: [length, width] = readlenwid; function header: function [l,w] = readlenwid In the function call, not any argument is passed; henc

Use polyval to evaluate the derivative at xder. This will be the % slope of the tangent line, "a" (general form of a line: y = ax + b). % 4. Calculate the intercept, b, of t

Executing a program: Running the program would be completed by typing the name of the script; this would call the other functions: >> calcandprintarea Whenever prompt