Impact-Site-Verification: dbe48ff9-4514-40fe-8cc0-70131430799e

Search This Blog

Remove all the vowels in MATLAB

How to remove vowels using matlab ?

Algorithm:

Step 1:

Take input from the user

Step 2:

Convert each characters to integers

Step 3:

Compare with ascii values corresponding to vowels

Step 4:

If not same , then store in one array

Step 5:

Convert the integer array again into character array

Code:

clc
x=input('Enter the sentence:');
w=double(x);
Y=[];
for i=1:length(x)
    q=w(i);
    if(q~=65 && q~=69 && q~=73 && q~=79 && q~=85 && q~=97 && q~=101 && q~=105 && q~=111 && q~=117)
        Y=[Y q];
    end
end
a=char(Y)

Ascii table:




Explanation:


Reference Video:




No comments

Popular Posts

Followers