Where the Four Corners Am I? (Vectorized) - MATLAB Cody - MATLAB Central

Problem 55965. Where the Four Corners Am I? (Vectorized)

Difficulty:Rate
NOTE: this problem is intended to build on problem #55960 ("Where the Four Corners Am I?"). You may wish to solve that problem first, then use your solution as a starting point for this problem.
The "Four Corners" region of the US is where Colorado, Utah, Arizona, and New Mexico all meet - the only place where four states touch. The Four Corners Monument itself is on Navajo land.
Given vectors of coordinates x and y, return a column vector of strings, where each string is one of five options according to the location of that element:
  • If and , then return "NN"
  • Otherwise, if x & y are both positive, return "CO",
  • if x is negative and y is positive, return "UT",
  • if x & y are both negative, return "AZ",
  • if x is positive and y is negative, return "NM"

Solution Stats

34.0% Correct | 66.0% Incorrect
Last Solution submitted on Dec 28, 2024

Problem Comments

Solution Comments

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

Problem Recent Solvers95

Suggested Problems

More from this Author12

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