Function char - characters and encoding, MATLAB Programming

Function char:

The function char does the opposite; it converts from any number type to the type char:

>> char(numequiv)

ans =

a

As the letters of the alphabet are in order, the character 'b' has the equal value of 98, 'c' is 99, and so on. Math can be completed on characters. For illustration, to get the next character in the collating sequence, 1 can be added either to the character or the integer:

>> numequiv = double('a');

>> char(numequiv + 1)

ans =

b

>> 'a' + 2

ans =

99

 

 

Posted Date: 10/18/2012 4:07:39 AM | Location : United States







Related Discussions:- Function char - characters and encoding, Assignment Help, Ask Question on Function char - characters and encoding, Get Answer, Expert's Help, Function char - characters and encoding Discussions

Write discussion on Function char - characters and encoding
Your posts are moderated
Related Questions
Random numbers: Whenever a program is being written to work with a data, and the data is not yet available, it is frequently useful to test the program first by initializing t

write a matlab program to calculate employee salary.



Write a MATLAB program that calculates the arithmetic mean, the geometric mean, and the root-mean-square average for a given set of values. Your program must use 3 functions t

La proporción de empleados de una empresa que usan su auto para ir al trabajo es 5:16. Si hay un total de 800 empleados

Read in any non jpeg image (any image will do) . Save it as a jpeg at quality levels (70, 60,50,40, 30) Get the MSE for each quality level as compared to the orignal file Get the


MATLAB. • MATLAB Programming; • Simulation in MATLAB.

Error-Checking user input in the While Loop: In many applications, whenever the user is prompted to enter anything, there is a valid range of values. When the user enters a wr