[其他] 請幫我解答程式一些地方!!謝謝

看板MATLAB作者 (雷〃)時間13年前 (2012/08/23 16:21), 編輯推噓0(001)
留言1則, 1人參與, 最新討論串1/1
程式如下: centerpointx=input('請輸入搜尋範圍中心之x座標 '); centerpointy=input('請輸入搜尋範圍中心之y座標 '); rangep=input('向四周各展開多大的範圍 '); tic xsz1=centerpointx-rangep; xsz2=centerpointx+rangep; ysz1=centerpointy-rangep; ysz2=centerpointy+rangep; rangen=xsz2-xsz1; aran=find(mod(rangen,2:rangen/2)==0)+1; %整行 arpon= aran.*4<=rangen; %整行 po=(rem((rangen./aran(arpon)+1),2))==1; %整行 ansp=aran(po); %整行 k=menu('請選擇精準度','快速','普通','精確','自訂'); switch k case 1 cz=55; case 2 cz=65; case 3 cz=75; case 4; cz=input('請輸入指定的cz大小 '); fprintf('建 議 搜 尋 步 數 \n') for io=1:1 fprintf('%d\n',aran(po)) end step=input('每N個pixel搜尋一次: '); end if k~=4 if length(ansp)==3 step=ansp(4-k); else if length(ansp)==2 %整行 if (k==2)||(k==3); k=1; end if (k==1); k=2; end step=ansp(k); else if length(ansp)==1 k=1; step=ansp(k); else if length(ansp)>3 mj=ansp <= rangen./10; mjp= mj==1; mj=fliplr(ansp(mjp)); if length(mj)==3 step=mj(k); else if length(mj)==2 if (k==2)||(k==3); k=2; end step=mj(k); else if length(mj)==1 k=1; step=mj(k); else if length(mj)>3 step=mj(k); end end end end end end end end end -- 假設我中心點X跟Y輸入的值都為500 我想請問 程式後面有%解釋起來是甚麼意思? 因為那邊卡住 後面就推敲不出來 麻煩各位高手幫我解釋一下 拜託>"< -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.125.10.137

08/23 16:22, , 1F
四周展開範圍為50
08/23 16:22, 1F
文章代碼(AID): #1GDUWSew (MATLAB)