Remove all the vowels in the given phrase.
Example:
Input s1 = 'Jack and Jill went up the hill' Output s2 is 'Jck nd Jll wnt p th hll'
Solution Stats
Problem Comments
13 Comments
Solution Comments
Show comments
Loading...
Problem Recent Solvers6465
Suggested Problems
-
It dseon't mettar waht oedrr the lrettes in a wrod are.
2178 Solvers
-
How to find the position of an element in a vector without using the find function
2823 Solvers
-
First non-zero element in each column
967 Solvers
-
Back to basics 8 - Matrix Diagonals
974 Solvers
-
Find the maximum number of decimal places in a set of numbers
3618 Solvers
More from this Author96
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
What about y in the second test?
Why isn't y a vowel in english? In swedish we have nine vowels and y is one of them.
There is only five vowels in English.That is 'a,e,i,o,u'.
I don't understand why the following doesn't work:
expression = '[aeiouAEIOU]';
[~,noMatch] = regexp(s1,expression,'match','split');
[~,c] = size(noMatch);
cell_s2 = '';
for i = 1:c
cell_s2 = strcat(cell_s2,noMatch(i));
end
s2 = string(cell_s2);
nice
#WARNING
Character Array And String are not similar.
length('abc')
% 3
length("abc")
% 1
so 'abc' is NOT EQUAL to "abc"
use "char" function to get character array from string
char("abc")
% 'abc'
using
if ~any(s1(i) == 'aeiouAEIOU')
makes it real easy
The letters 'w' and 'y' are actually vowels.
(Perhaps not in Cody, perhaps not even in American English - I am not sure - but for certain they are in English...)
Regexp Regexp
Only 2 line of code thank for Regexp
Easiest way is to solve using regexp
WHAT IN THE HOLY MATLAB IS REGEXP T-T
y is also a vowel in french. How couldn't i be ?! Weird.