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
Problem of a projectile being launched at an angle of O at an initial velocity ofv. The equations for the height hand horizontallocation x as functions of time t are as follo

Format command: The format command can be used to control the spacing between the MATLAB command or expression and the outcome; it can be either compact or loose. >> format

Documentation: It is very important that all the scripts be documented well, so that the people can understand what the script does and how it accomplishes that. One way of do

convolve the following sequences using tabulation method and verify the same using matrix mmethhod

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

coding of sep protocol

In this lab, we study the three concepts. Vector is used to store more than one value into single variable. It is similar to array (other programming language). Script is a collect

You are a quant analyst reporting directly to a portfolio manager. Your manager requires you to generate a simple code to compute several statistics for the following potential por


You are asked to create an american option multiplicative binomial model calculator in MatLab. Both put and call options should be valued. Given u, d, S 0 , K, r, and T (the usual