geoscatter unable to interpreting table values

32 views (last 30 days)
Hi y'all,
I am trying to use geoscatter to plot some points on a map. I think the issue is how Matlab is representing the table values - in scientific notation, when the original csv doesn't. But maybe I'm wrong. I tried a few ways to reformat the values but I've been unsuccessful.
The error I get is as follows:
Error using geoscatter (line 103)
Expected lat to be an array with all of the values <= 90.
Error in Map (line 70)
geoscatter(station11THg.Lat, station11THg.Long, 'filled', 'r')
My code is:
station11THg = SimpleSamples([SimpleSamples{:,4} == 11], [2, 3]) ;
station14THg = SimpleSamples([SimpleSamples{:,4} == 14], [2, 3]) ;
figure (1)
geobasemap satellite
hold on
geoscatter(station11THg.Lat, station11THg.Long, 'filled', 'r') % Where issue occurs
geoscatter(station14THg.Lat, station14THg.Long, 'filled', 'r')
hold off
I've attached a simplified file for reference.
I am using Matlab version: R2024b
Thanks!
  3 Comments
Kristine
Kristine on 6 Jan 2026 at 18:47
Well that's embarassing. I just forgot to adjust the values. Thanks!
Mathieu NOE
Mathieu NOE on 7 Jan 2026 at 7:55
haha no problem !
have a nice day !

Sign in to comment.

Accepted Answer

Walter Roberson
Walter Roberson on 6 Jan 2026 at 16:14
The original csv file has values like 7235.3 for Long and 3701.3 for Lat. Those values are well outside the expected range.
You need to divide Lat and Long by 100.

More Answers (0)

Products


Release

R2024b

Community Treasure Hunt

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

Start Hunting!