Finding mean of ascii values in a string MATLAB -


the string given follows:

scrap1 =  le h ke fd  zyq  b  ner 

you'll notice there 2 blank spaces indicating space (ascii 32) in each row. need find mean ascii value in each column without taking account spaces (32). first convert double(scrap1) how find mean without taking account spaces?

if it's ascii 32 want omit:

d = double(scrap1); result = mean(d(d~=32)); %// logical indexing remove unwanted value, mean 

Comments

Popular posts from this blog

php - regexp cyrillic filename not matches -

c# - OpenXML hanging while writing elements -

sql - Select Query has unexpected multiple records (MS Access) -