Example of sorting strings, MATLAB in Statistics

Example of sorting strings:

To sort a cell array of strings, also the sort function is used. The illustration is as follows,

>> engcellnames = {'Chemical','Mechanical',.  .  .

     'Biomedical','Electrical', 'Industrial'};

>> sort(engcellnames')

ans =

  'Biomedical'

  'Chemical'

  'Electrical'

  'Industrial'

  'Mechanical'

 

 

Posted Date: 10/22/2012 7:48:38 AM | Location : United States







Related Discussions:- Example of sorting strings, Assignment Help, Ask Question on Example of sorting strings, Get Answer, Expert's Help, Example of sorting strings Discussions

Write discussion on Example of sorting strings
Your posts are moderated
Related Questions
Help function: Function is computing the two values, there are two output arguments in the function header (i.e., area & circum), that are placed in the square brackets [ ]. A

Example of Median For the vector [1 4 5 9 12 33], the median is the average of the 5 & 9 in the middle: >> median([1 4 5 9 12 33]) ans =     7

Representing Logical true and False: It has been stated that expressions which are theoretically true really have the integer value of 1, and expressions which are theoretical

Illustration of Customizing plots: Illustration, the bar and barh functions by the default place a width of 0.8 between bars. Whenever called as bar(x,y), the width of 0.8 is

Curve Fitting: The data is fundamentally either discrete or continuous. In most of the applications, data is sampled, for illustration, The temperature recorded every ho

Nested Structures: The nested structure is a structure in which at least one of the members is itself a structure. For illustration, a structure for the line segment may co

Example of Mode When no value appears more often than any other, the smallest value in the vector will be the mode of the vector. >> shortx = [2 5 1 4]; >> mode(shortx

Use of function polyval: The better the curve fit, the more exact these interpolated and extrapolated values will be. By using the subplot function, we can loop to display the

Roots function - Polynomials: The roots function in MATLAB is used to find the roots of an equation represented by a polynomial. For illustration, for the mathematical functio

fopen function - file function: The fopen opens the file for reading. The fscanf then reads each line one double and one character, and put each pair in individual columns in