Extracting coordinate values from a 3-D matrix from within the data iteself and ploting a 3D map
3 次查看(过去 30 天)
显示 更早的评论
Hi,
I have a set of ocean data that is shown in the attachment. The latitude and longitude coordinates are given in two separate arrays of different sizes, latitude being a 1x720 array and longitude being a 1x1440 array. They are attached to monthly mean sea level measurements in the variable sla, which is a 1440x720x276 matrix. The format of sla is lon x lati x month of the year i.e. time. The values given in sla, however, are the values of sea level, and the latitude and longitude data that those points are connected to are not present in that matrix.
I subset the data spatially into 60 by 60 by 276 grid and tried to convert the sla into 2D matrix by repmat which resulted in 3600 by 276 matrix. Then using the longitude and latitude variable that comes separately with data as lon and lat var, I generated two matrix by repeating the lat and lon values for a grid and generated lat lon matrices corresponding to eahc index (all 3600) in sla files. I concatenated the data sla for a given month based on their index values and the lat and lon matrices and plotted them using fastscatter funsction. Output of plot is given in grid cells where I have the lat-lon coordinates of each cell and the sla for a given month. The problem I need help with is that X-axis is lat and Y is lon whereas this should be opposite. I think this problem is because I am accessing the data using indexes not coordinates.
I want to plot sla spatially for each grid point, on a map of the area, based on their associated coordinate location in latitude and longitude. My goal is to generate a matrix with three columns, where the first row is lon, the second is lst , and the third is the sla derived from 'sla' matrix for a particular month of the year. Any help is greatly appreciated. Please let me know if you need
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Map Display 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!