how can i do this?
Mostrar comentarios más antiguos
Write a program that reads a string of characters, say a piece of an article in a magazine, and determines how many times each vowel appears in the passage.
6 comentarios
Matt Fig
el 12 de Dic. de 2012
When your assignment says, "say a piece of an article in a magazine" I imagine you are going to need some serious image processing code. Is that true, or will you enter the string in by hand? Either way, what have you done so far?
Sean de Wolski
el 12 de Dic. de 2012
@Matt, you could regexp the urlread of the online version ;)
bob shot
el 12 de Dic. de 2012
bob shot
el 12 de Dic. de 2012
Walter Roberson
el 12 de Dic. de 2012
Start by answering Matt's first question.
Then read
Respuestas (1)
Image Analyst
el 12 de Dic. de 2012
Here's a few hints for you, assuming you just type in the text from the article into your m-file:
s = 'abcdefGHIJKLmnopqRSTUVwxyz'
letterIndex = lower(s) - 'a'
% Now look up the hist() function
That should be enough to start you off.
1 comentario
Walter Roberson
el 12 de Dic. de 2012
Though it is admittedly tricky to figure out when "y" is a vowel and when it is a consonant.
Categorías
Más información sobre Characters and Strings en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!