[問題] 陣列覆蓋已回收

看板MATLAB作者 (dasmond)時間15年前 (2008/11/14 00:38), 編輯推噓0(008)
留言8則, 2人參與, 最新討論串1/1
cc=imread('0123456789.bmp'); pic=imread('highway (1).bmp'); >> pic(209-6:209+6,176-4:176+4,:)=cc(0:12,0:8,:); ??? Subscript indices must either be real positive integers or logicals. 請問一下這裡哪裡錯了 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 122.116.141.2

11/14 01:53, , 1F
cc的index不能有零值 除非他是邏輯矩陣
11/14 01:53, 1F

11/14 09:51, , 2F
謝謝你 感恩
11/14 09:51, 2F

11/14 10:11, , 3F
pic(209-5:209+6,176-3,176+4)=cc(1:12,1:8);
11/14 10:11, 3F

11/14 10:11, , 4F
??? Assignment has more non-singleton rhs dimensions t
11/14 10:11, 4F

11/14 10:12, , 5F
than non-singleton
11/14 10:12, 5F

11/14 10:12, , 6F
這又為什麼
11/14 10:12, 6F

11/14 10:56, , 7F
維度不對左邊176-3,176+4部分有錯 176-3:176+4才是你要的?
11/14 10:56, 7F

11/14 11:55, , 8F
真的耶 問題解決了 太謝謝你了
11/14 11:55, 8F
文章代碼(AID): #1975WZJQ (MATLAB)