geoscatter unable to interpreting table values
Mostrar comentarios más antiguos
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 comentarios
Mathieu NOE
el 6 de En. de 2026
hello
looking at the content of the csv file , I have this :
Date_samples_taken,Long,Lat,Station_No
2025-05-28,7235.3,3701.3,11
2025-05-28,7235.3,3701.3,11
2025-05-28,7234,3701.3,14
2025-05-28,7234,3701.3,14
so the comma is the field separator and the dot is the decimal separator
unless there is something we don't know when the data was recorded but Long and Lat data are like 7234 and 3701.3 (and matlab just gives those numbers, eventually in scientific notation - but that's not the point here)
so not really in the expected range - is there a conversion factor we are not aware of ?
Kristine
el 6 de En. de 2026
Mathieu NOE
el 7 de En. de 2026
haha no problem !
have a nice day !
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Google Earth en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!