Determine continent given the country

2 次查看(过去 30 天)
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 个评论
John D'Errico
John D'Errico 2016-11-4
编辑:John D'Errico 2016-11-4
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.

请先登录,再进行评论。

回答(1 个)

Adam
Adam 2016-11-4
编辑:Adam 2016-11-4
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.

类别

Help CenterFile Exchange 中查找有关 Language Fundamentals 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by