Input will be an array of cities and states. Also, lists of cities and states will be passed.
Replace every city name with "city" and every state with a "state" string.
Input:
A = ["Natick", "Wayland", "Framingham", "Chicago"];
B = ["MA", "IL"];
arr = ["Wayland", "Chicago", "IL"];
Ouput:
arr = ["city", "city", "state"];

Solution Stats

42 Solutions

10 Solvers

Last Solution submitted on Feb 06, 2026

Last 200 Solutions

Problem Comments

Solution Comments

Show comments
Loading...

Problem Recent Solvers10

Suggested Problems

Problem Tags

Community Treasure Hunt

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

Start Hunting!