MATLAB: String Copying without Spaces strings i have a string a= [a b c d] separated by two spaces n i want to copy it in another string like b=[abcd] by removing the spaces. Please help. Best Answer a = 'a b c d'b = regexprep(a,' ','')orb = setdiff(a,' ')orb = f(~ismember(a,' '))orb = strrep(a,' ','') Related SolutionsMATLAB: Find indexes of string elements inside another string [~, B_index] = ismember(B,A) MATLAB: REMOVE SPACING IN A STRING %add this code A= '0 1 1 1 0 0 1 1 0 1 1 0 0 0 0 1 0 1 1 0 0 1 0 0 0' A= A(find(~isspace(A))), Related QuestionHow to count repeated character in string ?Reformatting DatesAdd 2 type char matrix strings into a greater oneRemove parenthesis and the contents inside from a stringCombine Strrep in one Line.Create a Matrix with multiple repeated stringsErasing specifi rows from a cell matrix
Best Answer