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
Savannah says that the least common multiple of 4 and 6 is 24. Is she right or what is her mistake?

The fundamental theorem of calculus states that the de?nite integral of a function may be found from the antiderivative of the function. However, for many functions, it is much eas

Illustrations of calling the function: Here are illustrations of calling the function: >> cylcost(32,73,4.50) ans = 661.5000 >> fprintf('The cost would be $%.2f\n'

Compare results/performance with tridiagonal Gaussian elimination solver for the problem arising from -y''=f   on (0,1) with y(0)=0=y(1). You may also need to use sparse storage an

draw midpoint circle by matlab


using 0de 45 how can i get the anlytical and numerical solutions for an equation,,

how can i used loops instead of polyfit function

How do you write a programme that asks the user for a number between 1 and 1000 and calculates the sum of its digits?

i made graph using adjacent matrix i have to find the critical path on that graph in matlab work can you please give me that code.