how can i do this?

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 commentaires

Matt Fig
Matt Fig le 12 Déc 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
Sean de Wolski le 12 Déc 2012
@Matt, you could regexp the urlread of the online version ;)
bob  shot
bob shot le 12 Déc 2012
im actually having problem with those 4 questions that i posted but i figured those 2 questions i just didnt know how to start the writing program questions
bob  shot
bob shot le 12 Déc 2012
im really actually begging for help guys. i just need help thats all
Walter Roberson
Walter Roberson le 12 Déc 2012

Connectez-vous pour commenter.

Réponses (1)

Image Analyst
Image Analyst le 12 Déc 2012

0 votes

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 commentaire

Walter Roberson
Walter Roberson le 12 Déc 2012
Though it is admittedly tricky to figure out when "y" is a vowel and when it is a consonant.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Characters and Strings dans Centre d'aide et File Exchange

Question posée :

le 12 Déc 2012

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by