Borrar filtros
Borrar filtros

Plot or variables window?

1 visualización (últimos 30 días)
zdarova_koresh
zdarova_koresh el 2 de Ag. de 2020
Editada: zdarova_koresh el 5 de Ag. de 2020
I'm using Matlab R2017a to create a dataset consisting of several netcdf files for using them in an algorithm written in Python later.
When checking the orientation of an array I found a strange issue, I don't know if it is a bug or no. The problem is that the results of viewing the array through the variables window and plotting them are mirror images of each other. I attach two pictures below to show the issue.
Variables window (I just copied the values and pasted them into Excel to illustrate them better).
Plot (contorf).
Which representation is the correct one? How to check it? It is really important for my project.
I attached the zip file with an example netcdf file and the code to extract the variable from the figures shown.
swh=ncread('interim1.nc','swh');
swh1=squeeze(swh(:, : ,1));
swh1=rot90(swh1);

Respuestas (1)

zdarova_koresh
zdarova_koresh el 5 de Ag. de 2020
Editada: zdarova_koresh el 5 de Ag. de 2020
Supposedly, matlab mirrors the data when using countorf.
Here I created 10х10 identity matrix and tried to plot it.

Community Treasure Hunt

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

Start Hunting!

Translated by