Determine continent given the country
2 views (last 30 days)
Show older comments
I have a list of countries and I'm looking for a quick way to get the continent for each one of them.
Any idea?
Thanks
1 Comment
John D'Errico
on 4 Nov 2016
Edited: John D'Errico
on 4 Nov 2016
What have you tried? Lots of easy things would work, from a switch statement, to regexp on a cell array, strmatch (ok, strncmp), ismember, etc. Why not try writing some code using any of the above? If you have a problem with what you wrote, then ask. But this is an easy problem, so make an effort.
Answers (1)
Adam
on 4 Nov 2016
Edited: Adam
on 4 Nov 2016
If you have the list of continents then
doc containers.Map
should do the job.
If you don't have the list of continents then I have no idea where Matlab itself is expected to acquire the information from unless one of the toolboxes has this functionality.
0 Comments
See Also
Categories
Find more on Language Fundamentals in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!