MATLAB: How to covert char array to num array

cell arraysconvertMATLAB

how do i convert char array to num array?
arr = ['some'; 'thee'; 'time'; 'hour']
I need a way to convert into the ascii values of these char.

Best Answer

arr={'some'; 'the'; 'time'; 'hour'};%must be cell array since lengths are not the same
for k=1:length(arr)
arr{k}=double(arr{k});%simple for-loop converts
end