MATLAB: Creating vectors stings of letters such as names words to vectors If my input was qwerty (for example) how do I convert this into a vector [q w e r t y] Best Answer It already is a vector-->> s='qwerty';>> whos s Name Size Bytes Class Attributes s 1x6 12 char >> s(1)ans =q>> s(1)ans =q>> Related SolutionsMATLAB: Extract letters in country name It's not S(4,1), it's S(4) and then you need the field name, CountryName, and it's the CountryName that takes the index 1:3. Try it. Experiment around. If you still need help with your homework, write back. MATLAB: How to select specific letters in a name >> str = 'Savannah''s new snowmobile';Method one: logical comparison:>> nnz('s'==lower(str))ans = 3Method two: regexpi:>> numel(regexpi(str,'s'))ans = 3Method three: strfind:>> numel(strfind(lower(str),'s'))ans = 3 Related QuestionLast letter of a wordConverting sting to variableHow to make a file name with combination of two stringsAdding continuously to get a sum of how many words there areHow to find prefix in a sting
Best Answer