Does anyone know how to fix this?
2 ビュー (過去 30 日間)
古いコメントを表示
I am trying to plot a pcolor using the variables: elevation [3543x2413 double], lat [2413x1 double], lon [3543x1 double],
However i keep getting the error 'Matrix dimensions must agree' does anyone know which dimentions i need to make agree?
1 件のコメント
Jan
2018 年 1 月 26 日
If you post your code, the readers can reconsider, what you are doing. Currently it is required to guess the cause of the error.
採用された回答
Guillaume
2018 年 1 月 26 日
Seeing the actual code you're using would help.
Works fine for me:
hsurf = pcolor((1:2413).', (1:3543).', rand(3543, 2413))
hsurf.EdgeAlpha = 0; %otherwise all you see is the black from the edges
Have you swapped the X and Y coordinates by any chance? Remember that X corresponds to columns and Y to rows.
その他の回答 (1 件)
参考
カテゴリ
Help Center および File Exchange で Resizing and Reshaping Matrices についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!