推 sunev: 大括孤? 08/23 18:08
→ ofox6072: 什麼大括弧? 08/23 18:17
→ celestialgod: 你的b跟c是cell... b = {1.1, 1.1}... 08/23 18:27
→ celestialgod: 而且C的迴圈寫錯,應該是a[i] = b[i] + c[i]; 08/23 18:28
→ ofox6072: OK,但是我覺得應該是指標有問題 08/23 18:30
→ ofox6072: 他給出的答案感覺像是記憶體位置 08/23 18:31
→ ofox6072: 如過是a[i] = b[i] + b[i],也應該是a={2.2,2.2} 08/23 18:32
→ ofox6072: 請問你說得的cell是什麼意思 08/23 18:34
→ celestialgod: a={2.2, 2.2} 是assign a為cell,而非矩陣 08/23 20:34
→ celestialgod: b = [1.1, 1.1]才是assign matrix 08/23 20:34
→ ofox6072: 改成[ ]就可以了,感謝C大 08/23 21:00
→ ofox6072: 那如果要cell用mex相加回傳到matlab,有什麼想法嗎 08/23 21:02
→ celestialgod: doc mexGetCell看範例吧 08/24 06:25
→ celestialgod: create則看mxCreateCellArray 08/24 06:25