Re: [問題] 結構陣列要如何看?已回收

看板MATLAB作者 (神無月 孝臣)時間17年前 (2008/11/20 00:34), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串2/2 (看更多)
※ 引述《yimean (溫柔殺手N￾ ￾ ￾  )》之銘言: : 各位版眾晚安。 : 我在command windows下 a=dir : 她會跑出a是struct陣列 : 我怎麼樣才能觀看a的內容呢? : 還有我在M檔中下a=dir他都不鳥我! : 這是為什麼呢? : 煩請版眾幫忙解答!感謝! 先打a=dir後會出現這些 某數字x1 struct array with fields: name date bytes isdir datenum 而根據help裡的關於fields的敘述 name -- filename date -- modification date bytes -- number of bytes allocated to the file isdir -- 1 if name is a directory and 0 if not datenum -- modification date as a MATLAB serial date number 所以如果你想要看這裡面第一個檔案的檔名的話 使用a(1).name就好了 同理想要看第三個檔案的大小的話 使用a(3).bytes即可 -- Deserves death! I daresay he does. Many that live deserve death. And some die that deserve life. Can you give that to them? Then be not too eager to deal out death in the name of justice, fearing for your own safty. Even the wise cannot see all ends. Gandalf to Frodo -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 125.233.246.48
文章代碼(AID): #19940060 (MATLAB)
文章代碼(AID): #19940060 (MATLAB)