String count - MATLAB Cody - MATLAB Central

Problem 45245. String count

Difficulty:Rate

given a string 'str', count the number of the followings -

  • letters
  • digits
  • white space
  • capital letters
  • small letters
  • punctuation marks

output should be an array y containing the numbers in the same order.

Solution Stats

42.31% Correct | 57.69% Incorrect
Last Solution submitted on Jun 16, 2025

Problem Comments

Solution Comments

Show comments

Problem Recent Solvers19

Suggested Problems

More from this Author174

Problem Tags

Community Treasure Hunt

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

Start Hunting!