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 CenterFile Exchange에서 Geographic Plots에 대해 자세히 알아보기

태그

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by