필터 지우기
필터 지우기

Determine continent given the country

조회 수: 2 (최근 30일)
Alessandro M
Alessandro M 2016년 11월 4일
편집: Adam 2016년 11월 4일
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