フィルターのクリア

Info

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

Index Exceeds Matrix Dimension Error for the following code

1 回表示 (過去 30 日間)
arun
arun 2016 年 6 月 29 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
% trial = 2;
total_trial = 50;
F_train_size = zeros(1,NumAct);
F_test_size = zeros(1,NumAct);
HOGs_train_all= zeros(size(DMM_HOG_front,1),size(DMM_HOG_front,2));
HOGs_test_all= zeros(size(DMM_HOG_front,1),size(DMM_HOG_front,2));
train_class = zeros(1,size(DMM_HOG_front,1));
test_class = zeros(1,size(DMM_HOG_front,1));
count = 0;
for i = 1:NumAct
ID = subject_ind{i};
F = TotalFeature(:,count+1:count+OneActionSample(i));
HOG_train_front =DMM_HOG_front(count+1:count+OneActionSample(i), :);
HOG_train_side = DMM_HOG_side(count+1:count+OneActionSample(i), :);
HOG_train_top = DMM_HOG_top(count+1:count+OneActionSample(i), :);
index = ind(trial,i);
train_index = index(1:ceil(length(index)*ratio));
for k = 1:length(train_index)
ID(ID==train_index(k)) = 0;
end
end
|Index exceeds matrix dimensions.
Error in DMM_HOG (line 90) index = ind(trial,i);|
  1 件のコメント
Walter Roberson
Walter Roberson 2016 年 6 月 29 日
Please include the entire error message, everything in red.

回答 (1 件)

Walter Roberson
Walter Roberson 2016 年 6 月 29 日
編集済み: Walter Roberson 2016 年 6 月 29 日
You define ind somewhere before this code. Whatever you defined it as does not have at least 2 elements in its first dimension, or else is empty in its second dimension.

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

Community Treasure Hunt

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

Start Hunting!

Translated by