[問題] MATLAB GUI的問題已回收

看板MATLAB作者 (070)時間16年前 (2009/05/13 19:07), 編輯推噓0(001)
留言1則, 1人參與, 最新討論串1/2 (看更多)
我在沒有使用GUI的情況下 跑這段程式沒有問題 但用了GUI後 卻有錯誤訊息 內容大概是說矩陣乘法不支援複數運算 程式碼如下 I=imread('kobex.bmp'); subplot(2,2,1), imshow(I); f=double(I); g=fft2(f); g=fftshift(g); [N1,N2]=size(g); n=2; d0=50; n1=fix(N1/2); n2=fix(N2/2); for i=1:N1 for j=1:N2 d=sqrt((i-n1)^2+(j-n2)^2); h=1/(1+0.414*(d/d0)^(2*n)); result(i,j)=h*g(i,j); <======問題出在這行 end end result=ifftshift(result); X2=ifft2(result); J=uint8(real(X2)); subplot(2,2,2),imshow(J); 錯誤訊息 ??? Error using ==> times Complex integer arithmetic is not supported. Error in ==> gg>pushbutton_work_Callback at 368 result(i,j)=h.*g(i,j); Error in ==> gui_mainfcn at 75 feval(varargin{:}); Error in ==> gg at 42 gui_mainfcn(gui_State, varargin{:}); ??? Error using ==> gg('pushbutton_work_Callback',gcbo,[],guidata(gcbo)) Error using ==> times Complex integer arithmetic is not supported. 請各位高手幫找出問題 感謝@@ -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 219.71.10.41

05/14 00:27, , 1F
已解決
05/14 00:27, 1F
文章代碼(AID): #1A2gdjct (MATLAB)
文章代碼(AID): #1A2gdjct (MATLAB)