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
what equation equals 36

I need a source code for hand detection in matlab please ....

Write a MATLAB function called pgm which calculates the periodogram. The function inputs should be the length input vector x and its output should be the length N periodogram estim

Illustration of switch statement: Here are the two illustrations of calling this function: >> quiz = 22; >> lg = switchletgrade(quiz) lg = X >> quiz = 9; >>

Simple Related Plot Functions: The other functions which are useful in customizing plots are the figure, clf, hold, leg-end, and grid. The short description of such functions

Generate a script: To generate a script, click File, then New, and then M-file. The new window will appear known as the Editor. To generate a new script, simply type the serie

1. Enter the 3×4 matrix Let a ij denote the entry of A in the ith row and jth column. Use Matlab to compute the following : (a) a 13 + a 32 (b) Three times the

The diagram shown on the next page represents a planar pantograph-based leg for a walking robot. This model utilizes only one DOF to generate the walking gait at the foot link 'n

Two cars started to move from zero position with (φ = 35) as shown. For the next four minutes, do the following: 1. Calculate each car's distance from the zero position (Distanc

To change a variable: To change a variable, the other assignment statement can be used that assigns the value of a different expression to it. Consider, for illustration, the