Help plotting world map with 192x144 matrix of data?
1 次查看(过去 30 天)
显示 更早的评论
I have a mat file with sensitivity data for the globe. The matrix is 192x144 (longitude x latitude). I need to plot a global map with this data. I know it should be relatively simple, but when I try to plot it using worldmap and geoshow it comes up as all zeros. This is my code:
data = load('bkohl_A.mat'); % data
A = struct2cell(data); % change from struct to double input matrix
out = cat(2,A{:});
rv = [0.4, 90, 0] % grid resolution and corner
worldmap('World');
geoshow(out, rv, 'displaytype', 'texturemap'); % plot data
load coastlines;
plotm(coastlat,coastlon) % plot coastlines
I have tried plotting a test using rand(192,144) and it worked, but when I plotted zeros(192,144) and then changed the first few rows to 1's it didn't. (so I had a 192 x 144 matrix of zeros with the first 10 rows 1 but it still showed on the map as all zeros).
I have no idea what I'm doing wrong and I've looked through the documentation but couldn't find anything to help. Any help would be appreciated!!
2 个评论
回答(1 个)
Anshika Chourasia
2021-12-29
Hi,
Please cross-check the correctness of data file and try changing few columns’ values to 1’s to validate the output.
If the issue stills persist, please provide more information to further investigate into the problem.
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!