Pcolor Error: Matrix Dimensions Must Agree

35 vues (au cours des 30 derniers jours)
Duncan Wright
Duncan Wright le 10 Nov 2017
Commenté : KSSV le 10 Nov 2017
I'm trying to plot the following variables using the pcolor variable:
t1.lat = 100x1
t1.lon = 100x1
t1.u = 100x50
pcolor(t1.lon, t1.lat, t1.u)
Thanks in advance!

Réponses (1)

KSSV
KSSV le 10 Nov 2017
t1.lat = 100x1
t1.lon = 50x1
t1.u = 100x50
pcolor(t1.lon, t1.lat, t1.u)
The above works.
  2 commentaires
Duncan Wright
Duncan Wright le 10 Nov 2017
Please could you elaborate ? I don't understand which dimensions need to agree with which ?
KSSV
KSSV le 10 Nov 2017
Say x, y are you are lon and lat.
[X,Y]=meshgrid (x,y);
The dimensions of X,Y and u should be same.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Geographic Plots dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by