MATLAB: Convert alphabet to coresponding number by using ASCII asciiconvert character to number I have question, how to convert alphabet in lowercase to coresponding number by using ASCII. Such as a=1,b=2,c=3… Best Answer Like thischar2num = @(c) char(c)-96;Example>> char2num('a')ans = 1>> char2num('b')ans = 2>> char2num('z')ans = 26 Related SolutionsMATLAB: How to convert a 2-D char to string Is this what you mean? >> C=['abcde';'fghij'] C = abcde fghij >> reshape(C.',[],1).' ans = abcdefghij MATLAB: PLEASE HELP ME find coresponding column indexes. If you read the documentation for the sort function, you will find that there is a second output giving the indices of the sort. Your code would become:[A,I] = sort(W)Try that, and it might be useful for solving your problem. Related QuestionConvert String (cell) tableGet the avarage for coresponding cell contents from a cell arrayAdd 2 type char matrix strings into a greater oneProblem in converting double Array into character
Best Answer