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 samefor k=1:length(arr) arr{k}=double(arr{k});%simple for-loop convertsend Related SolutionsMATLAB: Convert cell array of strings to unicode quickly Trynumeric_array = cellfun(@uint16, stringarray);Try it on a smaller subset first as I do not know how the timing would compare. It should have the advantage of not needing to change the internal representation. MATLAB: Single array inside cell to double If you want to convert each matrix inside the TEMP cell array to double, then:something = cellfun(@double, TEMP, 'UniformOutput', false); Related QuestionConverting cell array full of characters to a stringXlswriteVectorising setting values of array by reading from other arrayHow to convert a cell array of structures into a numeric array
Best Answer