フィルターのクリア

Info

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

Index exceeds matrix dimensions.

2 ビュー (過去 30 日間)
med-sweng
med-sweng 2014 年 11 月 10 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
I have the following portion:
N = size(p,1);
x = 1:N; y = x;
[X,Y] = meshgrid(x,y);
R = sqrt((2.*X-N-1).^2+(2.*Y-N-1).^2)/N;
Theta = atan2((N-1-2.*Y+2),(2.*X-N+1-2));
R = (R<=1).*R;
Rad = radialpoly(R,n,m);
Product = p(x,y).*Rad.*exp(-1i*m*Theta);
I get the error in the following line:
Product = p(x,y).*Rad.*exp(-1i*m*Theta);
The error that I get is:
Index exceeds matrix dimensions.
I tried to "debug" the program, and found that the dimensions issue may be due to the following line:
[X,Y] = meshgrid(x,y);
The weird thing is that the program doesn't give me errors on most of the images I'm applying it on.
Do you know why I'm getting such error?
Thanks.
  3 件のコメント
med-sweng
med-sweng 2014 年 11 月 10 日
"p" is just a matrix passed to a function
med-sweng
med-sweng 2014 年 11 月 10 日
Regarding the size, no, it is not of NXN size

回答 (0 件)

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

Community Treasure Hunt

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

Start Hunting!

Translated by