Help plotting world map with 192x144 matrix of data?

3 visualizaciones (últimos 30 días)
Katia Piscina
Katia Piscina el 12 de Ag. de 2021
Respondida: Anshika Chourasia el 29 de Dic. de 2021
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 comentarios
KSSV
KSSV el 12 de Ag. de 2021
You have to specify the locations...did you?
Katia Piscina
Katia Piscina el 12 de Ag. de 2021
I don't think so, how do I do that?

Iniciar sesión para comentar.

Respuestas (1)

Anshika Chourasia
Anshika Chourasia el 29 de Dic. de 2021
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.

Categorías

Más información sobre Geographic Plots en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by