[問題] cell2struct已回收

看板MATLAB作者 (小島)時間16年前 (2009/08/31 13:26), 編輯推噓1(101)
留言2則, 2人參與, 最新討論串1/1
我有一個119701 x 5 的cell array (叫作s_at) 想要把它轉成sturct, 已定義 str_sat 為 str_sat = 0x0 struct array with fields: sp year month times abun 但輸入 str_sat = cell2struct(s_at,{'sp','year','month','times','abun'},5); 卻出現 ??? Error using ==> cell2struct Number of field names must match number of fields in new structure. @@ 不知道問題出在哪裡 還請個位前輩賜教orz 謝謝!! -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.112.68.192

08/31 23:35, , 1F
把cell2struct 裡面的5改成2試看看行不行 :)
08/31 23:35, 1F

09/02 12:36, , 2F
可以了耶! 謝謝你:) 可是為什麼呢?
09/02 12:36, 2F
文章代碼(AID): #1AcrxvZR (MATLAB)
文章代碼(AID): #1AcrxvZR (MATLAB)