Help plotting world map with 192x144 matrix of data?

4 ビュー (過去 30 日間)
Katia Piscina
Katia Piscina 2021 年 8 月 12 日
回答済み: Anshika Chourasia 2021 年 12 月 29 日
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 件のコメント
KSSV
KSSV 2021 年 8 月 12 日
You have to specify the locations...did you?
Katia Piscina
Katia Piscina 2021 年 8 月 12 日
I don't think so, how do I do that?

サインインしてコメントする。

回答 (1 件)

Anshika Chourasia
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.

カテゴリ

Help Center および File ExchangeGeographic Plots についてさらに検索

タグ

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by