Contour plot error in code

2 ビュー (過去 30 日間)
Abigail Waring
Abigail Waring 2021 年 6 月 4 日
回答済み: Reshma Nerella 2021 年 6 月 11 日
Loading a t2m contour plot and this error comes up
What do I need to do?
>> ERA5_contourf_6
Loading ../data/ERA/ERA5_2_2011_2021.nc
Error using permute
ORDER must have at least N elements for an N-D array.
Error in ERA5_contourf_6 (line 73)
t2m = permute(t2m,[2,1,3]);

採用された回答

Reshma Nerella
Reshma Nerella 2021 年 6 月 11 日
Hi,
Permute function rearranges the dimensions of an array(t2m) in the order specified by the vector i.e [2,1,3] in your case.
If t2m is a N-dimensional array, the vector should contain N elements.
The reason behind the error is that
t2m is not a 3 Dimensional array, so your vector [2,1,3] of length 3 should be modified based of the dimensions of t2m.
Hope this helps!

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeNetCDF についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by