MATLAB: Help with displaying the vowels

cell arrayfunctions

Hi, I want to make my code to be converted to switch and case statements and have the desired output from the picture:
function [vowels] = locateVowels( charactercell )
isvowel=@(s) ismember(lower(s),'aeiou');
isvowel=@(s) ismember(lower(s),'aeiou');
idxV=cellfun(isvowel,charactercell,'unif',0);
vowels=cellfun(@(s,i) lower(s(i)),charactercell,idxV,'unif',0);
end

Best Answer

Related Question