[問題]請問讀檔的問題已回收

看板MATLAB作者 (哈哈)時間14年前 (2011/04/23 12:12), 編輯推噓0(009)
留言9則, 2人參與, 最新討論串1/1
function mkresult(ich) if (nargin<1), ich =1; end switch (ich) case 1. edit1 = [100 10 100 20]; h2 = uicontrol('style' , 'edit','string' ,'File name','position',edit1); set(h2, 'callback', 'mkresult(2)'); edit2 = [210 10 100 20]; h3 = uicontrol('style' , 'edit','string' ,'File name','position',edit2); set(h3, 'callback', 'mkresult(3)'); button1 = [10 10 60 20]; h1 = uicontrol('style' , 'pushbutton','string' ,'Load','position',button1); set(h1, 'callback', 'mkresult(4)'); case 2. file1 = get(h2,'string'); case 3. file2 = get(h3,'string'); case 4, load file1; load file2; end 板上的各位大大 小弟是學習matlab的新手 我的問題就是要如何 在edit上輸入檔名之後 成功讀取該檔案? 拜託了 不然真的不知道該如何繼續下去! -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 111.249.140.105

04/23 14:01, , 1F
要看你想讀什麼檔案
04/23 14:01, 1F

04/23 18:59, , 2F
m檔案
04/23 18:59, 2F

04/23 20:51, , 3F
m檔?你要執行另外的程式 還是其實是mat檔?
04/23 20:51, 3F

04/23 21:09, , 4F
恩 講簡單點 我現在要練習的是 我造出一個edit
04/23 21:09, 4F

04/23 21:10, , 5F
還有一個pushbutton 然後我希望執行過後 按下button
04/23 21:10, 5F

04/23 21:11, , 6F
可以讀取 我輸入的檔名(mat檔)
04/23 21:11, 6F

04/23 21:12, , 7F
但我又開了另一個檔案練習 是按下load之後 打指令的地
04/23 21:12, 7F

04/23 21:13, , 8F
方可以出現我輸入在edit裡的字串!
04/23 21:13, 8F

04/23 21:13, , 9F
但是一直失敗 = =
04/23 21:13, 9F
文章代碼(AID): #1Dib6YQm (MATLAB)