フィルターのクリア

i am getting an error "Matrix index is out of range for deletion"

2 ビュー (過去 30 日間)
Shan Sha
Shan Sha 2019 年 2 月 28 日
コメント済み: KSSV 2019 年 2 月 28 日
I am getting an error
Matrix index is out of range for deletion.
Error in dir_bo (line 6)
imname(1:2) = [];
Error in get_im_label (line 6)
subdir = dir_bo(imdir);
Error in curet (line 18)
imageDatasetLabel = get_im_label(imdir);
my code is
addpath('./helpfun');
imdir = './CURET/';
savedir = ['./_features/CURET']; % save features
mkdir_bo(savedir);
datadir = 'results'; % save classification accuracy
mkdir_bo(datadir);
%% feature extraction
sigmaSet = [1 2 4];
F = makeGDfilters(sigmaSet);
snr = 0; % here "0" only denotes "No noise"
K = 2;
C = 1;
Ls = 3;
Lr = 5;
imageDatasetLabel = get_im_label(imdir);
imageDatasetFeatPath = get_feature_path(savedir);
Help me to solve this error. Thanks in advance

採用された回答

KSSV
KSSV 2019 年 2 月 28 日
編集済み: KSSV 2019 年 2 月 28 日
Check the dimensions of imname.....it doesnt have the elements which you expect to delete. So the error.
A = rand(10,1) ;
A(1) = [] % no error
A(11) = [] % error, because A has no 11th element
  4 件のコメント
Shan Sha
Shan Sha 2019 年 2 月 28 日
the dimension of imname is 0x1 struct
KSSV
KSSV 2019 年 2 月 28 日
Yes....that's why error.......as the struct is empty and you are trying to delete (1:2), you get error. Check the paths which you have given....are the paths correct.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by