[問題] 關於load的file name已回收

看板MATLAB作者 ( )時間14年前 (2011/10/06 00:35), 編輯推噓0(002)
留言2則, 2人參與, 最新討論串1/1
我需要讀取的檔名為 p20050301.mat 由於需要連讀好幾天的檔案 我將日期存為 day=20050301 型別是char 結果我這樣寫 load [D:\TSE_trd_ord\day_p\'p',day,'.mat'] 結果是有讀出來 但它出現下面這行字 Warning: This syntax for a parameter to LOAD or SAVE will continue to work in R2007b but in future releases of MATLAB, LOAD/SAVE parameters enclosed in brackets may be invalid or may mean something different. To avoid this warning and to be compatible with future releases of MATLAB enclose the entire argument, including brackets, in single quotes. 請問大家我應該怎麼寫才是正確? 謝謝~ -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.113.138.204

10/06 00:40, , 1F
load(['D:\TSE_trd_ord\day_p\p',day,'.mat'])
10/06 00:40, 1F

10/06 00:48, , 2F
謝謝!
10/06 00:48, 2F
文章代碼(AID): #1EZ8Tk2H (MATLAB)