필터 지우기
필터 지우기

Error using Permute with netcdf data

조회 수: 4 (최근 30일)
G K
G K 2021년 4월 1일
답변: meghannmarie 2021년 4월 1일
Hello all,
This will be my first question here,
I have been working with EOFs from CDT toolbox documentation,
I get the follwoing :
Error using permute
ORDER must have at least N elements for an N-D array.
Dimensions of variables:
Attached is my code
lat = double(ncread('K:\Trials\conc_s.nc','lat'));
lon = double(ncread('K:\Trials\conc_s.nc','lon'));
t = double(ncread('K:\Trials\conc_s.nc','time')+datenum(1979,1,0));
sic = ncread('K:\Trials\conc_s.nc','ice');
% rows = lon>=150 & lon<=210;
% lon = lon(rows);
% cols = lat>=-90 & lat<=-60;
% lat = lat(cols);
% times = t>=datenum('jan 1, 1979');
% t = t(times);
% sic = permute(sic,[2 1 3]);
save('sic.mat','lat','lon','t','sic')
%EOF
[eofmap,pc] = eof(sst,1);

채택된 답변

meghannmarie
meghannmarie 2021년 4월 1일
I see you are reading a variable named "ice" :
sic = ncread('K:\Trials\conc_s.nc','ice');
Do you mean to read a variable named "sic"?
sic = ncread('K:\Trials\conc_s.nc','sic');
If not, what is size of your ice variable? Can you attach a file?

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Data Import and Export에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by