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

41.18% Correct | 58.82% Incorrect
Last Solution submitted on Apr 10, 2023

Problem Comments

Solution Comments

Show comments
R2025a Pre-release highlights
This topic is for discussing highlights to the current R2025a Pre-release.
14
6

Problem Recent Solvers18

Suggested Problems

More from this Author165

Problem Tags

Community Treasure Hunt

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

Start Hunting!
Go to top of page