MATLAB: How to convert a 1x 19 char to 4×5 char char How to convert a 1x 19 char to 4×5 char ? Best Answer You have to add a blank (or empty) character to do that.For example, with a cell array:a19 = strsplit(sprintf('%c ','a':'s')); % Create Cell Arraya20 = cat(2, a{1:19}, {''}); % Concatenate Empty Cell A = reshape(a20, 4, 5); % Reshape To Get (4x5) ArrayYou didn’t post anything specific about what you’re doing, but some variation on this idea should give you the result you want. Related SolutionsMATLAB: Converting cell array full of characters to a string How about:A = {'the';'quick';'brown';'fox'}char(A)orchar(cellfun(@transpose,A,'uni',false))etc depending on how you want to convert it. MATLAB: Convert 128×2 char to 1×64 char If val is your char array..you can try something like:iwant = strcat(val(1:2:end),val(2:2:end)) Related QuestionMATLAB_Built in Functions Zeros and Ones 4×5 MatrixManipulation of a cell array-
Best Answer