Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Using matlab only and part 3 is more important than part 2 using MATLAB only Her

ID: 3876493 • Letter: U

Question

Using matlab only and part 3 is more important than part 2 using MATLAB only Here is a sample file to be used for testing these programs: Mary had a little lamb, it's fleece was white as snow. And everywhere that Mary went, the lamb was sure to go. 2. vowel_count.m Write a program which reads lines from a text file, counting the vowels (a,e,i,o,u) in the file. Print out the total number of vowels that you find in the file as a suitable formatted message. Test your program adequately before demonstrating it. The output should look like this: This file contains 30 vowels. 3. vowelless.m Adapt the previous program so that it also prints all the non-vowels to a second file. Allow the user to specify the file names using input statements from the console. Ensure you use at least one function and test your program adequately before demonstrating it The newly created file should contain t's fie ws wht s sn. nd vrywhr tht Mry wnt, th imb ws sr tg

Explanation / Answer

2-

f=fopen('document.txt','r');

set_of_vowel='AaEeIiOoUu';

vowels=0

while ~feof(f)

if strfind(set_of_vowel,c)

vowels=vowels+1

end

break;

end

message=sprintf('This file contains %d vowels.', vowels)'; disp(message);

Note-For other questions to be answered please provide as separate question

Thank you

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote