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
I need assignment to finish.


Find f(t) for each F(s): Problem: Based on an examination given to a large class in which the maximum score is 100 points, assuming that 20 grades taken at random f

The cost of sending a package by an express delivery service is $15 for the first two pounds, and $4.25 for each pound over two pounds. Write a program that computes the cost of

Ask question #Mingdfgdfgdfgimum 100 words accepted#


Example of Variables and assignment statements: The expression is computed and then that value is stored in the variable. For illustration, this is the way it would appear in

Some recent column source designs incorporate ‘beam steering', where the phase of each element in the column is varied in order to change the angle at which the major lobe appears.

The Switch Statement: A switch statement can frequently used in place of a nested if-else or an if statement with numerous else if clauses. The Switch statements are used when

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