フィルターのクリア

how to resolve the error index exceeds matrix dimensions

1 回表示 (過去 30 日間)
SIBI SIVA
SIBI SIVA 2016 年 10 月 3 日
コメント済み: SIBI SIVA 2016 年 10 月 16 日
k1=1;
for i=19:29
imag4=imscram(:,:,i);
subplot(:,:,i);
imshow(imag4);
[lllo,lhlo,hllo,hhlo]=dwt2(double(imag4),'haar');
llw(:,:,k1)=lllo(:,:);
lhw(:,:,k1)=lhlo(:,:);
hlw(:,:,k1)=hllo(:,:);
hhw(:,:,k1)=hhlo(:,:);
k1=k1+1;
figure
end
  1 件のコメント
KSSV
KSSV 2016 年 10 月 3 日
The matrices given are not known to us. How you expect to find the error?

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

採用された回答

Walter Roberson
Walter Roberson 2016 年 10 月 3 日
If subplot() is an array, then
subplot(:,:,i);
is at best a waste of time, as that would extract a portion of the array and then throw the extracted value away because of the semi-colon. If the array had a third dimension smaller than 29, you would get an error about the index exceeding the dimension.
If subplot() is the MATLAB plotting function, then passing a colon to it is not valid.
  1 件のコメント
SIBI SIVA
SIBI SIVA 2016 年 10 月 16 日
thank you for your suggestion. now my code is working.

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

その他の回答 (0 件)

カテゴリ

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

タグ

タグが未入力です。

Community Treasure Hunt

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

Start Hunting!

Translated by