Determine continent given the country
12 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaire
John D'Errico
le 4 Nov 2016
Modifié(e) : John D'Errico
le 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.
Réponses (1)
Adam
le 4 Nov 2016
Modifié(e) : Adam
le 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 commentaires
Voir également
Catégories
En savoir plus sur Characters and Strings dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!