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
Example of Vectorizing: Likewise, for an operation on a matrix, a nested loop would be needed; for illustration, supposing a matrix variable mat: [r c] = size(mat); for

Editor/Debugger: The MATLAB has numerous useful functions for debugging, and debugging can also be completed through its editor, which is known as the Editor/Debugger. Typi

Example of Function stubs: The three functions have not so far been written, though, therefore the function stubs are put in place so that the script can be executed and teste

Introduction and Purpose In the lectures and tutorials you have been introduced to a number of probability distributions. You have also learned that modelling any system (such

Need of a nested loop: How would we sum each individual column, rather than getting an overall sum? Answer: The programming technique would need a nested loop in whi

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

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

Illustration of Nested loops: Running the script shows the output: >> printstars ***** ***** ***** The variable rows identifies the number of rows to print, and

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',.

Illustration of Input in a for loop: In this illustration, the loop variable iv iterates through the values 1 through 3, therefore the action is repeated three times. The acti