- you've shadowed the imresize function with one of your own that does not work properly
- your pn.mat that is loaded after the image also contain a variable called img. As a rule, it's safer to load mat files into a structure. Try:
How can i fix the error of index out of bounds for an image
2 ビュー (過去 30 日間)
古いコメントを表示
When i tried to decompose my 2D image of size 255*255 with the 1D wavelet having 1*111 coefficients then while running the code in my script following error displayed "Attempted to access img(:,143); index out of bounds because size(img)=[173,142]. Error in ==> decomposition at 15, s=[0;0;img(:,k);0;0];". What is wrong with this code. My code is attached with this.
0 件のコメント
採用された回答
Guillaume
2016 年 2 月 8 日
Assuming that you're running the exact code that you've attached, the error certainly shouldn't occur. I can also see two possibilities for it to happen:
s = load('pn');
g0 = s.pn;
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Signal Analysis についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!