Error with the command Geoplot
Mostrar comentarios más antiguos
Hey guys,
I need to display my latitude and longitude using the commman geoplot. This is my code:
A=readtable('Filename.xlsx');
lat=(A(:,"Latitud"));
lon=(A(:,"Longitud"));
geoplot(lat,lon);
legend('Ruta 301');
After run this code, thi is the code that i see:
Error using geoplot
Expected lat to be one of these types:
double, single, uint8, uint16, uint32, uint64, int8, int16, int32, int64
Instead its type was table.
Error in untitled (line 4)
geoplot(lat,lon);
Please help me if you know wich is my problem.
Thnak you
Respuestas (2)
lat=cell2mat(A.Latitud);% if Latitud is the header name of column.
Please check this. There Was extra parenthesis in my previous answer.
3 comentarios
VBBV
el 24 de Abr. de 2022
Use cell2mat for converting values to type double
Juan Felipe Arias Gutiérrez
el 24 de Abr. de 2022
lat = cell2mat(A.Latitud);% if Latitud is the header name of column.
lat = str2num(lat); % convert the char to number ,
Walter Roberson
el 24 de Abr. de 2022
lat = A{:,"Latitud"};
lon = A{:,"Longitud"};
OR
lat = A.Latitud;
lon = A.Longitud;
2 comentarios
Juan Felipe Arias Gutiérrez
el 24 de Abr. de 2022
Juan Felipe Arias Gutiérrez
el 24 de Abr. de 2022
Categorías
Más información sobre Geographic Plots 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!
