Info

この質問は閉じられています。 編集または回答するには再度開いてください。

Subscript indices must either be real positive integers or logicals. Error in jl (line 51) u = u(i,j,k)

1 回表示 (過去 30 日間)
Sophia
Sophia 2015 年 9 月 8 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
i = lat;
j = long;
k = 1:length(1979:2012);
u = u(i,j,k)
yrlst = 1979:2012;
wintlst = 1:3;
for i = 1:length(yrlst)
tempwint = wintlst +(i-1)*12
tmpu = squeeze(nanmean(u(:,:,tempwint),3));
tmpv = squeeze(nanmean(v(:,:,tempwint),3));
for j = 1:size(tmpu,1)
k = 1:size(tmpu,2)
tuwint(j,k,i) = tmpu(j,k);
tvwint(j,k,i) = tmpv(j,k);
end
end

回答 (1 件)

Walter Roberson
Walter Roberson 2015 年 9 月 8 日
One of your values for lat or long is not a positive integer.
find(lat < 1 | lat ~= fix(lat))
find(long < 1 | long ~= fix(long))
  3 件のコメント
Walter Roberson
Walter Roberson 2015 年 9 月 10 日
Whatever defined your "lat" and "long" needs to define your "u"
Sophia
Sophia 2015 年 9 月 10 日
Okie.. Actually u is the value of ice motion in lat i, long j at time k..the range of longitude is -180 to +180.. but i could not find how can i do this for the whole arctic for seasons.. Can you check my other question, i have posted the whole code their

この質問は閉じられています。

Community Treasure Hunt

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

Start Hunting!

Translated by