Clear Filters
Clear Filters

Problem using geoshow to represent data over geographical map

7 views (last 30 days)
Hello everyone. I am working with two vectors and a matrix; both vetors represent latitude and longitude.
Latitude goes from 70 to -40 in intervals of -0.25, it's size is 441*1 single.
Longitude goes from -125 to 45 in intervals of +0.25, it's size is 681*1 single (I have also tried with flipud for it to go from 45 to -125).
The matrix size is 681*441 double, and it has values of temperature in the region. I can plot the data easily ignoring latitude and longitude and using contourf; however, I want to put the data over a map, so that when someone sees it, the association between data and place can be made easily. I am trying to use geoshow for that as:
geoshow(latitude, longitude, matrix'), since mathworks sais: "geoshow(lat,lon,Z) projects and displays the geolocated data grid, Z. In this syntax, lat and lon are M-by-N latitude-longitude arrays. Z is an M-by-N array of class double. You can optionally display the data as a surface, mesh, texture map, or contour by using the DisplayType name-value pair argument."
The closest thing I have come to a solution is using coastline; the problem in this case is that the wole world appears, instead of just the area that I want. I would settle for information on how to remove the parts of the map that don't concern me.
The message I recive is the following: "Warning: Error creating or updating Surface Error in value of property ZData Array is wrong shape or size "
Can someone please tell me the propper way to represent my data?
Thank you very much.

Answers (0)

Community Treasure Hunt

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

Start Hunting!