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
Statistics There are numerous statistical analyses which can be executed on data sets. In MATLAB software, the statistical functions are in the data analysis help topic known a

Opening and Closing a File: The Files are opened with the fopen function. By the default, fopen function opens a file for reading. If the other mode is preferred, a permission

Median The median is defined only for a data set which has been sorted first, that means that the values are in order. The median of a sorted set of data values (n) is defined

Graphics objects: The objects involve graphics primitives like lines and text, and also the axes used to orient the objects. These objects are organized hierarchically, and the

Illustration of Binary search: An illustration to search for the key of 91 in the vector is as shown below: The table below shows what will happen in each iteration of

Run-time or execution-time error: The Run-time, or execution-time, errors are found whenever a script or function is executing. With most of the languages, an illustration of

Location of a rectangle - graphics objects: The location of a rectangle is [x y w h], where x and y are the coordinates of the lower left point, here w is the width, and h is

Variable packages: Variable packages are now the vector of structures, hence each and every element in the vector is a structure. To show one element in the vector, an index i

Properties of the text box - graphics objects: By using get will show properties of the text box, the illustration is as shown below: >> get(thand)   BackgroundColor

Illustration of Mode When there is more than one value with similar (highest) frequency, then the smaller value is mode. In the case below, as 3 and 8 appear twice in the vecto