<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-8244750955405541832</id><updated>2011-10-12T17:17:01.989-07:00</updated><category term='scilab'/><category term='檔案處理'/><category term='other'/><category term='Matlab'/><category term='DAQ'/><category term='Matlab訊號分析'/><category term='GUIDE'/><category term='Labview-訊號分析'/><category term='Matlab作業'/><category term='Matlab影像處理'/><category term='mouse event'/><category term='Labview'/><category term='Matlab上課筆記'/><category term='windows 7'/><category term='GUI'/><title type='text'>Labview &amp; Matlab for PT</title><subtitle type='html'>訊號的分析與擷取對於物理治療研究有越來越重的地位，設立一個討論與分享分析程式的地方</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://labmatpt.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8244750955405541832/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://labmatpt.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Eric Wu</name><uri>http://www.blogger.com/profile/13535510143465079842</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://static.zooomr.com/images/946899_7f30bf0970.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>39</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8244750955405541832.post-5331309395376774841</id><published>2010-10-02T10:40:00.000-07:00</published><updated>2010-10-08T03:01:06.673-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Matlab訊號分析'/><category scheme='http://www.blogger.com/atom/ns#' term='Matlab'/><category scheme='http://www.blogger.com/atom/ns#' term='檔案處理'/><title type='text'>整合程式終於出爐啦!!!!</title><content type='html'>這原本是我三年前剛畢業的時候想要完成的計畫，但是一直都沒有時間完成。這次一來剛好利用這次要分析數據的機會，二來因為之前分析的數據實在太多了，多到我都記不得有寫過哪些程式，分析過哪些數據，所以藉此機會除了把它整合在一起外，順便將實驗室過去用到的數據整理起來。&lt;br /&gt;&lt;br /&gt;檔案下載：&lt;a href="https://sites.google.com/site/happyericwu/mysoftware/%E6%95%B4%E5%90%88%E8%85%B3%E6%9C%AC%E8%A8%88%E7%95%AB2010.zip?attredirects=0&amp;amp;d=1"&gt;請按此&lt;/a&gt;　（密碼：同影印機）&lt;br /&gt;&lt;br /&gt;以下為使用教學，我知道整個介面很醜，但是我實在很不喜歡修飾，等有空我再來修飾，功能可以用比較重要吧！&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_yhfFssj-aUE/TKdjvDDvRrI/AAAAAAAAFZw/brDrOGYIPxo/s1600/0.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="179" src="http://2.bp.blogspot.com/_yhfFssj-aUE/TKdjvDDvRrI/AAAAAAAAFZw/brDrOGYIPxo/s320/0.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;首先要先建立一個資料夾，這個程式的階層是這樣的：一個&lt;b&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;主要資料夾&lt;/span&gt;&lt;/b&gt;（這邊我舉例的主資料夾名稱為&lt;b&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;整合計畫test&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;，裡面一定要自己設定一個叫&lt;b&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;data&lt;/span&gt;&lt;/b&gt;的資料夾），然後把同樣一隻腳的測試資料丟到&lt;/span&gt;&lt;b&gt;data&lt;/b&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;資料夾，這個程式會自動去尋找主資料夾裡的data資料夾，讀裡面的資料&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_yhfFssj-aUE/TKdlBnejIlI/AAAAAAAAFZ0/vWXeYpZBPVQ/s1600/1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="179" src="http://1.bp.blogspot.com/_yhfFssj-aUE/TKdlBnejIlI/AAAAAAAAFZ0/vWXeYpZBPVQ/s320/1.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&amp;nbsp;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;&amp;nbsp;&amp;nbsp; 主資料夾&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;　 &amp;nbsp; - data&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; - xxxx&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; - xxxx&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; - xxxx&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_yhfFssj-aUE/TKdlOLLcZFI/AAAAAAAAFZ4/eHRCITOEGdU/s1600/2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="179" src="http://4.bp.blogspot.com/_yhfFssj-aUE/TKdlOLLcZFI/AAAAAAAAFZ4/eHRCITOEGdU/s320/2.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;然後在matlab的command視窗打入main_program（記得上面的current directory要改成剛剛下載好的檔案存放的路徑）。&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_yhfFssj-aUE/TKdlmOwW2FI/AAAAAAAAFZ8/fLMbqe7Q1Js/s1600/3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="179" src="http://3.bp.blogspot.com/_yhfFssj-aUE/TKdlmOwW2FI/AAAAAAAAFZ8/fLMbqe7Q1Js/s320/3.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;接下來就出現選單，可以選擇要計算的參數（還真多啊！）。&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_yhfFssj-aUE/TKdl4jkInkI/AAAAAAAAFaA/h-jt-dqbld8/s1600/4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="179" src="http://3.bp.blogspot.com/_yhfFssj-aUE/TKdl4jkInkI/AAAAAAAAFaA/h-jt-dqbld8/s320/4.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;這裡我就示範全部勾選，一口氣用這兩筆做ITT的資料跑出全部數據！&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_yhfFssj-aUE/TKdmLTRCSMI/AAAAAAAAFaE/Lf3RtmZA89k/s1600/5.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="179" src="http://4.bp.blogspot.com/_yhfFssj-aUE/TKdmLTRCSMI/AAAAAAAAFaE/Lf3RtmZA89k/s320/5.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;接下來會出現一個視窗（我知道真的很醜！），可以填寫姓名，左右腳，以及腳長，主要是在最後輸出檔案的時候上面可以註明這個資料的主人，但是這僅限於第一次用，因為這邊的功能以及資料的寫入都是用附加的方式，所以只有在第一次跑的時候因為檔案尚未存在而會寫入這些基本資料（我知道我解釋的很難懂！）。&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_yhfFssj-aUE/TKdm2XpRfwI/AAAAAAAAFaI/D3imGFCSJTY/s1600/6.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="179" src="http://4.bp.blogspot.com/_yhfFssj-aUE/TKdm2XpRfwI/AAAAAAAAFaI/D3imGFCSJTY/s320/6.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;選擇剛剛自己建立的&lt;b&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;主資料夾&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;（此例就是&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;整合計畫test&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;），不要選到data資料夾！！&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_yhfFssj-aUE/TKdnTpZ52bI/AAAAAAAAFaM/IiCASvvpzeo/s1600/7.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="179" src="http://1.bp.blogspot.com/_yhfFssj-aUE/TKdnTpZ52bI/AAAAAAAAFaM/IiCASvvpzeo/s320/7.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;因為有些計算須要用到force onset，但是依我算了不算多的數據經驗發現，論文裡面所寫的用兩倍標準差當作開始根本就是一個&lt;/span&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;&lt;b&gt;理想&lt;/b&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;，像我現在的例子就可以看到這個受試者居然在用力那瞬間力量突然往下掉（可能想利用stretch-shortening cycle的方式看可不可以力量大一點，所以先勾了一下），或者有些受試者在喊預備的時候就在那邊偷偷用力準備（這些不測風雲有時難以預測，有時候都不是當下可以發現到），所以這邊提供了輸了標準差的方式。&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_yhfFssj-aUE/TKdo3bHQIrI/AAAAAAAAFaU/cdtCj6WExi8/s1600/8.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="179" src="http://1.bp.blogspot.com/_yhfFssj-aUE/TKdo3bHQIrI/AAAAAAAAFaU/cdtCj6WExi8/s320/8.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;因為計算RFD以及RER須要換算成torque，所以都有勾選要計算這兩個參數的時候，就會出現要求輸入腳踝的長度（力臂）。&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_yhfFssj-aUE/TKdpYr5kagI/AAAAAAAAFaY/3P6_5xGgQ_g/s1600/9.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="179" src="http://3.bp.blogspot.com/_yhfFssj-aUE/TKdpYr5kagI/AAAAAAAAFaY/3P6_5xGgQ_g/s320/9.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;span class="Apple-style-span" style="color: black;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;如果計算active EMD的話，會強迫重新輸入SD，至於原因則是&lt;span class="Apple-style-span" style="color: red;"&gt;&lt;b&gt;不能說的秘密！&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_yhfFssj-aUE/TKdptJ7josI/AAAAAAAAFac/wtTGWnVGUcA/s1600/10.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="179" src="http://1.bp.blogspot.com/_yhfFssj-aUE/TKdptJ7josI/AAAAAAAAFac/wtTGWnVGUcA/s320/10.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;中間會出現一大堆運算後的圖片，這些都可以在之後主資料夾裡面找到（圖中為，百分比MVC對於時間的變化率）。&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_yhfFssj-aUE/TKdqPf_waII/AAAAAAAAFag/fuuFKizYH00/s1600/11.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="179" src="http://2.bp.blogspot.com/_yhfFssj-aUE/TKdqPf_waII/AAAAAAAAFag/fuuFKizYH00/s320/11.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;如果有勾選curveRMS這個參數（主要是計算不同百分比MVC下，EMG RMS對時間變化的斜率），會發現突然停頓，這是因為計算RMS所需的時間較長。&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_yhfFssj-aUE/TKdqufqzMKI/AAAAAAAAFak/2K_kzlv0YOM/s1600/12.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="179" src="http://1.bp.blogspot.com/_yhfFssj-aUE/TKdqufqzMKI/AAAAAAAAFak/2K_kzlv0YOM/s320/12.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;這邊也會要求輸入RMS EMG的SD，原因跟force一樣。&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_yhfFssj-aUE/TKdq-jwb-SI/AAAAAAAAFao/hnGxfCZBtY0/s1600/13.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="179" src="http://4.bp.blogspot.com/_yhfFssj-aUE/TKdq-jwb-SI/AAAAAAAAFao/hnGxfCZBtY0/s320/13.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;劈哩啪啦跑完之後，可以發現主資料夾多了很多資料夾，以及有一個叫做&lt;b&gt;&lt;span class="Apple-style-span" style="background-color: white;"&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;result.txt&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;的檔案。&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_yhfFssj-aUE/TKdrS-XxsoI/AAAAAAAAFas/V3CdgCbOyRA/s1600/14.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="179" src="http://3.bp.blogspot.com/_yhfFssj-aUE/TKdrS-XxsoI/AAAAAAAAFas/V3CdgCbOyRA/s320/14.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;我們用一些文字編輯器或是notepad打開可以看到我們剛剛算的數據。&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_yhfFssj-aUE/TKdriuTVENI/AAAAAAAAFaw/f7HluTJjBRI/s1600/15.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="179" src="http://4.bp.blogspot.com/_yhfFssj-aUE/TKdriuTVENI/AAAAAAAAFaw/f7HluTJjBRI/s320/15.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;由於文字編輯器對於換格tab會因為字串長度不同可能無法對齊，導致看起來不是那麼好看，所以我們改用excel開啟看看。&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_yhfFssj-aUE/TKdr10sSPkI/AAAAAAAAFa0/1lxwoFWM16g/s1600/16.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="179" src="http://3.bp.blogspot.com/_yhfFssj-aUE/TKdr10sSPkI/AAAAAAAAFa0/1lxwoFWM16g/s320/16.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;由excel開啟之後，可以發現每個data都排排站站好。&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_yhfFssj-aUE/TKdsDIsJ2uI/AAAAAAAAFa4/LmjcSnIjJR8/s1600/16.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="179" src="http://2.bp.blogspot.com/_yhfFssj-aUE/TKdsDIsJ2uI/AAAAAAAAFa4/LmjcSnIjJR8/s320/16.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;而且每個參數都會把每次trial所計算的記錄下來（如果今天發生某次trial的值過於偏差，可以在此修改），以及這些trial的平均（有幾個檔案就用幾個平均，兩個檔案就兩個平均，三個就三個平均，一個當然就一個自己平均啦！真是太神奇啦！）！&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_yhfFssj-aUE/TKdspAa5P-I/AAAAAAAAFa8/5SYIE2Sy_pk/s1600/17.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="179" src="http://3.bp.blogspot.com/_yhfFssj-aUE/TKdspAa5P-I/AAAAAAAAFa8/5SYIE2Sy_pk/s320/17.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;然後我們打開資料夾看看，這邊是打開ITT資料夾，就可以看到這次所算的ITT圖以及結果。&lt;br /&gt;&lt;br /&gt;當然如果要重算某樣參數也是可以，在不刪除result.txt的情況下，會自動把新算的數據直接附加到原來數據的最後，而資料夾裡面的圖片也自動被新的附蓋過去。當然如果想要重新跑的話，就把result.txt砍了就行了！&lt;br /&gt;&lt;br /&gt;後記：&lt;br /&gt;&lt;br /&gt;1. 這次的整合程式，主要的應用在我們做ITT的trial上面，也就是每次我都會跟受試者說要被電三次，我想如果都是照著這樣既定的protocol做的話，程式大多應該不會出現問題。&lt;br /&gt;&lt;br /&gt;2. 我將原始檔案附在上面，希望大家使用上如果發生問題可以告知我（至少目前我的幾筆資料都是沒有問題），大家的反應才是可以把這個程式修改到好的原動力。&lt;br /&gt;&lt;br /&gt;3. 這次有些程式我有改寫（變得比較精簡），然後整合程式撰寫我也是力求工整，這樣也比較利於之後如果有人想要增加新功能，新參數使用。&lt;br /&gt;&lt;br /&gt;4. 有時間的話我再把他外觀弄得好看一點。&lt;br /&gt;&lt;br /&gt;5. 最後，我該睡了！！&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8244750955405541832-5331309395376774841?l=labmatpt.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://labmatpt.blogspot.com/feeds/5331309395376774841/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8244750955405541832&amp;postID=5331309395376774841' title='1 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8244750955405541832/posts/default/5331309395376774841'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8244750955405541832/posts/default/5331309395376774841'/><link rel='alternate' type='text/html' href='http://labmatpt.blogspot.com/2010/10/blog-post.html' title='整合程式終於出爐啦!!!!'/><author><name>Eric Wu</name><uri>http://www.blogger.com/profile/13535510143465079842</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://static.zooomr.com/images/946899_7f30bf0970.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_yhfFssj-aUE/TKdjvDDvRrI/AAAAAAAAFZw/brDrOGYIPxo/s72-c/0.png' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8244750955405541832.post-5267072672049887522</id><published>2010-01-14T22:12:00.000-08:00</published><updated>2010-01-14T22:12:37.808-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='DAQ'/><category scheme='http://www.blogger.com/atom/ns#' term='Labview-訊號分析'/><category scheme='http://www.blogger.com/atom/ns#' term='Labview'/><title type='text'>It takes me 3 years to figure out how to do DAQ in labview!!!!!</title><content type='html'>Hahaha!!! The title of this article is not real.&amp;nbsp;Not until someone tell me the concept of shift register&amp;nbsp;did I write labview&amp;nbsp;since I began writing matlab. Today, I spent two hours to know how to do DAQ in labview which I didn't accomplish 3 years ago. The main reason possibly is that labview is my first programming language and I know nothing about programming, so it was difficult for me to do DAQ at that time.&lt;br /&gt;&lt;br /&gt;Here is my simple code:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_yhfFssj-aUE/S1AHMbk0jmI/AAAAAAAAE2g/23qbH9rUqGs/s1600-h/program.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_yhfFssj-aUE/S1AHMbk0jmI/AAAAAAAAE2g/23qbH9rUqGs/s320/program.JPG" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/_yhfFssj-aUE/S1AHP_uuQJI/AAAAAAAAE2o/g7SzLWfneik/s1600-h/panel.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_yhfFssj-aUE/S1AHP_uuQJI/AAAAAAAAE2o/g7SzLWfneik/s320/panel.JPG" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8244750955405541832-5267072672049887522?l=labmatpt.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://labmatpt.blogspot.com/feeds/5267072672049887522/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8244750955405541832&amp;postID=5267072672049887522' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8244750955405541832/posts/default/5267072672049887522'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8244750955405541832/posts/default/5267072672049887522'/><link rel='alternate' type='text/html' href='http://labmatpt.blogspot.com/2010/01/it-takes-me-3-years-to-figure-out-how.html' title='It takes me 3 years to figure out how to do DAQ in labview!!!!!'/><author><name>Eric Wu</name><uri>http://www.blogger.com/profile/13535510143465079842</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://static.zooomr.com/images/946899_7f30bf0970.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_yhfFssj-aUE/S1AHMbk0jmI/AAAAAAAAE2g/23qbH9rUqGs/s72-c/program.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8244750955405541832.post-5021430001662849997</id><published>2010-01-13T05:53:00.000-08:00</published><updated>2010-01-13T22:56:49.521-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='windows 7'/><category scheme='http://www.blogger.com/atom/ns#' term='Matlab'/><category scheme='http://www.blogger.com/atom/ns#' term='other'/><title type='text'>How to run matlab 7.1 on windows 7??</title><content type='html'>Recently, I have upgraded almost my computers to windows 7 except the computer in my lab. Yesterday, I installed matlab 7.1 on my desktop and found out some errors when running the program, even using the comparable mode provided by windows 7. So I find the solution on the internet and here is the solution.&lt;br /&gt;&lt;br /&gt;The original article is from this:&amp;nbsp;&lt;a href="http://wse7en.blogspot.com/2009/06/how-to-run-matlab-71-on-windows-7.html"&gt;How To Run Matlab 7.1 On Windows 7&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;&lt;span style="color: #555555; font-size: 12px;"&gt;&lt;span style="font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Instructions&lt;/span&gt;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;&lt;/span&gt;&lt;br /&gt;&lt;ol style="line-height: 18px; list-style-type: decimal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 35px; padding-right: 0px; padding-top: 0px;"&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Right Click On Desktop, choose Personalize&lt;/li&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Got to Basic and High Contrast Themes tab, and click Window Classic&lt;/li&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Now, Run matlab&lt;/li&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Finish&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;&lt;span style="line-height: 18px;"&gt;&lt;span style="color: black; font-size: medium; line-height: normal;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;div&gt;&lt;span style="color: black;"&gt;&lt;span style="font-size: medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="color: black;"&gt;&lt;span style="font-size: medium;"&gt;So, if you want to use matlab 7.1 on windows 7, you need to accept the ugly theme when running matlab program. It's also a little bit&amp;nbsp;inconvenient because you have to switch the theme when running Matlab.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8244750955405541832-5021430001662849997?l=labmatpt.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://labmatpt.blogspot.com/feeds/5021430001662849997/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8244750955405541832&amp;postID=5021430001662849997' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8244750955405541832/posts/default/5021430001662849997'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8244750955405541832/posts/default/5021430001662849997'/><link rel='alternate' type='text/html' href='http://labmatpt.blogspot.com/2010/01/how-to-run-matlab-71-on-windows-7.html' title='How to run matlab 7.1 on windows 7??'/><author><name>Eric Wu</name><uri>http://www.blogger.com/profile/13535510143465079842</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://static.zooomr.com/images/946899_7f30bf0970.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8244750955405541832.post-2742160353993494907</id><published>2010-01-12T19:20:00.000-08:00</published><updated>2010-01-12T19:39:16.482-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mouse event'/><category scheme='http://www.blogger.com/atom/ns#' term='Matlab影像處理'/><category scheme='http://www.blogger.com/atom/ns#' term='Matlab'/><category scheme='http://www.blogger.com/atom/ns#' term='GUI'/><title type='text'>ginput -- A Useful and Convenient Function</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_yhfFssj-aUE/S007uA914-I/AAAAAAAAEzk/IpQhfj1gOdc/s1600-h/angle.bmp" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_yhfFssj-aUE/S007uA914-I/AAAAAAAAEzk/IpQhfj1gOdc/s320/angle.bmp" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;Yesterday night, one of junior classmates told me that he found a useful function called "ginput" which can make the thing getting mouse position easier than using "get(gca......)". It's very convenient when designing some program such as calculating angle in coordinate plane. So, here is a very simple example about how to calculate the angle in a certain image.&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;global flag h_im h_1&lt;br /&gt;filename='D:\07020203_mpg2-0000281.jpg';&lt;br /&gt;im=imread(filename);&lt;br /&gt;h_im=image(im);&lt;br /&gt;while 1&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;cal_cord_ang;&lt;br /&gt;end&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;blockquote&gt;function cal_cord_ang&lt;br /&gt;global flag h_im h_1&lt;br /&gt;cla(h_im)&lt;br /&gt;[x,y] = ginput(1);&lt;br /&gt;a=[x,y];&lt;br /&gt;x0=a(1,1);&lt;br /&gt;y0=a(1,2);&lt;br /&gt;hold on&lt;br /&gt;h_1=plot(x0,y0,'color','r','marker','+');&lt;br /&gt;[x,y] = ginput(1);&lt;br /&gt;b=[x,y];&lt;br /&gt;x1=b(1,1);&lt;br /&gt;y1=b(1,2);&lt;br /&gt;h_1=plot([x0 x1],[y0 y1],'color','r','marker','+');&lt;br /&gt;[x,y] = ginput(1);&lt;br /&gt;c=[x,y];&lt;br /&gt;x2=c(1,1);&lt;br /&gt;y2=c(1,2);&lt;br /&gt;h_1=plot([x0 x1 x2],[y0 y1 y2],'color','r','marker','+');&lt;br /&gt;&lt;br /&gt;% calculate angle by using this formula --&amp;gt; A dot B = ABcos&lt;br /&gt;A=a-b;&lt;br /&gt;B=c-b;&lt;br /&gt;angle=acosd(dot(A,B)/(norm(A)*norm(B)));&lt;br /&gt;x_t=mean([x0 x2]);&lt;br /&gt;y_t=mean([y0 y2]);&lt;br /&gt;text(x_t,y_t,num2str(angle),'color','r')&lt;br /&gt;ginput(1)&lt;br /&gt;cla(h_im)&lt;br /&gt;&lt;br /&gt;&lt;/blockquote&gt;However, I almost forget the concept of vector, even the product of two vectors. You can review the concept in this url:&amp;nbsp;&lt;a href="http://www.euclideanspace.com/maths/algebra/vectors/angleBetween/index.htm"&gt;http://www.euclideanspace.com/maths/algebra/vectors/angleBetween/index.htm&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Try it, it's very funny!!!&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8244750955405541832-2742160353993494907?l=labmatpt.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://labmatpt.blogspot.com/feeds/2742160353993494907/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8244750955405541832&amp;postID=2742160353993494907' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8244750955405541832/posts/default/2742160353993494907'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8244750955405541832/posts/default/2742160353993494907'/><link rel='alternate' type='text/html' href='http://labmatpt.blogspot.com/2010/01/ginput-useful-and-convenient-function.html' title='ginput -- A Useful and Convenient Function'/><author><name>Eric Wu</name><uri>http://www.blogger.com/profile/13535510143465079842</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://static.zooomr.com/images/946899_7f30bf0970.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_yhfFssj-aUE/S007uA914-I/AAAAAAAAEzk/IpQhfj1gOdc/s72-c/angle.bmp' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8244750955405541832.post-5275550968482054350</id><published>2010-01-06T06:16:00.000-08:00</published><updated>2010-01-06T06:19:40.416-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Matlab'/><category scheme='http://www.blogger.com/atom/ns#' term='GUI'/><title type='text'>[Transcripttion] 35 Complete GUI Examples</title><content type='html'>This article,&amp;nbsp;&lt;a href="http://www.mathworks.com/matlabcentral/fileexchange/24861-35-complete-gui-examples"&gt;35 Complete GUI Examples&lt;/a&gt;, gives examples about GUI that I found today. It contains several questions that many people usually ask and also attaches the example codes. It is very useful reference when designing a GUI program.&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Here is the description of this article:&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="border-collapse: collapse; color: #191919; font-family: Tahoma, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #191919; font-family: Tahoma, Arial, Helvetica, sans-serif; font-size: small;"&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse; font-size: 12px;"&gt;&lt;div class="MsoNormal" style="line-height: 15.0pt; mso-pagination: widow-orphan;"&gt;&lt;span lang="EN-US" style="color: #191919; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8.0pt; mso-bidi-font-family: 新細明體; mso-font-kerning: 0pt;"&gt;The questions/files are written in approximate order of complexity, so intermediate users may want to skip the first several files.&lt;/span&gt;&lt;span lang="EN-US" style="color: #191919; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8.0pt; mso-bidi-font-family: 新細明體; mso-bidi-font-size: 11.0pt; mso-font-kerning: 0pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span lang="EN-US" style="color: #191919; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8.0pt; mso-bidi-font-family: 新細明體; mso-font-kerning: 0pt;"&gt;&lt;br /&gt;The questions answered include:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: 15.0pt; mso-pagination: widow-orphan;"&gt;&lt;span lang="EN-US" style="color: #191919; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8.0pt; mso-bidi-font-family: 新細明體; mso-font-kerning: 0pt;"&gt;1. How do I manipulate the strings in a uicontrol?&lt;/span&gt;&lt;span lang="EN-US" style="color: #191919; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8.0pt; mso-bidi-font-family: 新細明體; mso-bidi-font-size: 11.0pt; mso-font-kerning: 0pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span lang="EN-US" style="color: #191919; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8.0pt; mso-bidi-font-family: 新細明體; mso-font-kerning: 0pt;"&gt;&lt;br /&gt;2. How do make a uicontrol invisible/visible?&lt;/span&gt;&lt;span lang="EN-US" style="color: #191919; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8.0pt; mso-bidi-font-family: 新細明體; mso-bidi-font-size: 11.0pt; mso-font-kerning: 0pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span lang="EN-US" style="color: #191919; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8.0pt; mso-bidi-font-family: 新細明體; mso-font-kerning: 0pt;"&gt;&lt;br /&gt;3. How do I make a multi-line editbox?&lt;/span&gt;&lt;span lang="EN-US" style="color: #191919; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8.0pt; mso-bidi-font-family: 新細明體; mso-bidi-font-size: 11.0pt; mso-font-kerning: 0pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span lang="EN-US" style="color: #191919; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8.0pt; mso-bidi-font-family: 新細明體; mso-font-kerning: 0pt;"&gt;&lt;br /&gt;4. How can I let the user of my GUI know his actions are futile (or producing no results)?&lt;/span&gt;&lt;span lang="EN-US" style="color: #191919; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8.0pt; mso-bidi-font-family: 新細明體; mso-bidi-font-size: 11.0pt; mso-font-kerning: 0pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span lang="EN-US" style="color: #191919; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8.0pt; mso-bidi-font-family: 新細明體; mso-font-kerning: 0pt;"&gt;&lt;br /&gt;5. How can I tell which uicontrol is selected?&lt;/span&gt;&lt;span lang="EN-US" style="color: #191919; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8.0pt; mso-bidi-font-family: 新細明體; mso-bidi-font-size: 11.0pt; mso-font-kerning: 0pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span lang="EN-US" style="color: #191919; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8.0pt; mso-bidi-font-family: 新細明體; mso-font-kerning: 0pt;"&gt;&lt;br /&gt;6. How can I tell how many times a uicontrol has been activated?&lt;/span&gt;&lt;span lang="EN-US" style="color: #191919; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8.0pt; mso-bidi-font-family: 新細明體; mso-bidi-font-size: 11.0pt; mso-font-kerning: 0pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span lang="EN-US" style="color: #191919; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8.0pt; mso-bidi-font-family: 新細明體; mso-font-kerning: 0pt;"&gt;&lt;br /&gt;7. How do I tell which button in a buttongroup is selected?&lt;/span&gt;&lt;span lang="EN-US" style="color: #191919; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8.0pt; mso-bidi-font-family: 新細明體; mso-bidi-font-size: 11.0pt; mso-font-kerning: 0pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span lang="EN-US" style="color: #191919; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8.0pt; mso-bidi-font-family: 新細明體; mso-font-kerning: 0pt;"&gt;&lt;br /&gt;8. How do I let the user know a process is running in the background?&lt;/span&gt;&lt;span lang="EN-US" style="color: #191919; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8.0pt; mso-bidi-font-family: 新細明體; mso-bidi-font-size: 11.0pt; mso-font-kerning: 0pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span lang="EN-US" style="color: #191919; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8.0pt; mso-bidi-font-family: 新細明體; mso-font-kerning: 0pt;"&gt;&lt;br /&gt;9. How do I control the mouse pointer with a GUI?&lt;/span&gt;&lt;span lang="EN-US" style="color: #191919; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8.0pt; mso-bidi-font-family: 新細明體; mso-bidi-font-size: 11.0pt; mso-font-kerning: 0pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span lang="EN-US" style="color: #191919; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8.0pt; mso-bidi-font-family: 新細明體; mso-font-kerning: 0pt;"&gt;&lt;br /&gt;10. How can I access the value (current position) of a slider?&lt;/span&gt;&lt;span lang="EN-US" style="color: #191919; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8.0pt; mso-bidi-font-family: 新細明體; mso-bidi-font-size: 11.0pt; mso-font-kerning: 0pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span lang="EN-US" style="color: #191919; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8.0pt; mso-bidi-font-family: 新細明體; mso-font-kerning: 0pt;"&gt;&lt;br /&gt;11. How can I use different colored strings in a listbox?&lt;/span&gt;&lt;span lang="EN-US" style="color: #191919; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8.0pt; mso-bidi-font-family: 新細明體; mso-bidi-font-size: 11.0pt; mso-font-kerning: 0pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span lang="EN-US" style="color: #191919; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8.0pt; mso-bidi-font-family: 新細明體; mso-font-kerning: 0pt;"&gt;&lt;br /&gt;12. What is the difference between 'listboxtop' and 'value' in a listbox?&lt;/span&gt;&lt;span lang="EN-US" style="color: #191919; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8.0pt; mso-bidi-font-family: 新細明體; mso-bidi-font-size: 11.0pt; mso-font-kerning: 0pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span lang="EN-US" style="color: #191919; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8.0pt; mso-bidi-font-family: 新細明體; mso-font-kerning: 0pt;"&gt;&lt;br /&gt;13. How can I make text that can be copied but not changed?&lt;/span&gt;&lt;span lang="EN-US" style="color: #191919; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8.0pt; mso-bidi-font-family: 新細明體; mso-bidi-font-size: 11.0pt; mso-font-kerning: 0pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span lang="EN-US" style="color: #191919; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8.0pt; mso-bidi-font-family: 新細明體; mso-font-kerning: 0pt;"&gt;&lt;br /&gt;14. How do I allow the user of my GUI to set the range of a slider?&lt;/span&gt;&lt;span lang="EN-US" style="color: #191919; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8.0pt; mso-bidi-font-family: 新細明體; mso-bidi-font-size: 11.0pt; mso-font-kerning: 0pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span lang="EN-US" style="color: #191919; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8.0pt; mso-bidi-font-family: 新細明體; mso-font-kerning: 0pt;"&gt;&lt;br /&gt;15. How do I use the buttondownfcn on an axes object?&lt;/span&gt;&lt;span lang="EN-US" style="color: #191919; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8.0pt; mso-bidi-font-family: 新細明體; mso-bidi-font-size: 11.0pt; mso-font-kerning: 0pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span lang="EN-US" style="color: #191919; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8.0pt; mso-bidi-font-family: 新細明體; mso-font-kerning: 0pt;"&gt;&lt;br /&gt;16. How do I make a callback talk to another callback?&lt;/span&gt;&lt;span lang="EN-US" style="color: #191919; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8.0pt; mso-bidi-font-family: 新細明體; mso-bidi-font-size: 11.0pt; mso-font-kerning: 0pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span lang="EN-US" style="color: #191919; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8.0pt; mso-bidi-font-family: 新細明體; mso-font-kerning: 0pt;"&gt;&lt;br /&gt;17. How can I get the string from a popup or listbox?&lt;/span&gt;&lt;span lang="EN-US" style="color: #191919; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8.0pt; mso-bidi-font-family: 新細明體; mso-bidi-font-size: 11.0pt; mso-font-kerning: 0pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span lang="EN-US" style="color: #191919; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8.0pt; mso-bidi-font-family: 新細明體; mso-font-kerning: 0pt;"&gt;&lt;br /&gt;18. How can I set the string in a popup or listbox?&lt;/span&gt;&lt;span lang="EN-US" style="color: #191919; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8.0pt; mso-bidi-font-family: 新細明體; mso-bidi-font-size: 11.0pt; mso-font-kerning: 0pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span lang="EN-US" style="color: #191919; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8.0pt; mso-bidi-font-family: 新細明體; mso-font-kerning: 0pt;"&gt;&lt;br /&gt;19. How can I add to the string in a popup or listbox?&lt;/span&gt;&lt;span lang="EN-US" style="color: #191919; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8.0pt; mso-bidi-font-family: 新細明體; mso-bidi-font-size: 11.0pt; mso-font-kerning: 0pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span lang="EN-US" style="color: #191919; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8.0pt; mso-bidi-font-family: 新細明體; mso-font-kerning: 0pt;"&gt;&lt;br /&gt;20. How do I tell which figure was current before my callback executed?&lt;/span&gt;&lt;span lang="EN-US" style="color: #191919; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8.0pt; mso-bidi-font-family: 新細明體; mso-bidi-font-size: 11.0pt; mso-font-kerning: 0pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span lang="EN-US" style="color: #191919; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8.0pt; mso-bidi-font-family: 新細明體; mso-font-kerning: 0pt;"&gt;&lt;br /&gt;21. How do I get data from another GUI?&lt;/span&gt;&lt;span lang="EN-US" style="color: #191919; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8.0pt; mso-bidi-font-family: 新細明體; mso-bidi-font-size: 11.0pt; mso-font-kerning: 0pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span lang="EN-US" style="color: #191919; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8.0pt; mso-bidi-font-family: 新細明體; mso-font-kerning: 0pt;"&gt;&lt;br /&gt;22. How do I make a GUI to open image files only?&lt;/span&gt;&lt;span lang="EN-US" style="color: #191919; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8.0pt; mso-bidi-font-family: 新細明體; mso-bidi-font-size: 11.0pt; mso-font-kerning: 0pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span lang="EN-US" style="color: #191919; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8.0pt; mso-bidi-font-family: 新細明體; mso-font-kerning: 0pt;"&gt;&lt;br /&gt;23. How can I make popup choices mutually exclusive?&lt;/span&gt;&lt;span lang="EN-US" style="color: #191919; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8.0pt; mso-bidi-font-family: 新細明體; mso-bidi-font-size: 11.0pt; mso-font-kerning: 0pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span lang="EN-US" style="color: #191919; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8.0pt; mso-bidi-font-family: 新細明體; mso-font-kerning: 0pt;"&gt;&lt;br /&gt;24. How can I show the current pointer location in axes coordinates?&lt;/span&gt;&lt;span lang="EN-US" style="color: #191919; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8.0pt; mso-bidi-font-family: 新細明體; mso-bidi-font-size: 11.0pt; mso-font-kerning: 0pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span lang="EN-US" style="color: #191919; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8.0pt; mso-bidi-font-family: 新細明體; mso-font-kerning: 0pt;"&gt;&lt;br /&gt;25. How can I use uicontextmenus?&lt;/span&gt;&lt;span lang="EN-US" style="color: #191919; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8.0pt; mso-bidi-font-family: 新細明體; mso-bidi-font-size: 11.0pt; mso-font-kerning: 0pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span lang="EN-US" style="color: #191919; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8.0pt; mso-bidi-font-family: 新細明體; mso-font-kerning: 0pt;"&gt;&lt;br /&gt;26. How do I make my GUI control an axes in another figure?&lt;/span&gt;&lt;span lang="EN-US" style="color: #191919; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8.0pt; mso-bidi-font-family: 新細明體; mso-bidi-font-size: 11.0pt; mso-font-kerning: 0pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span lang="EN-US" style="color: #191919; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8.0pt; mso-bidi-font-family: 新細明體; mso-font-kerning: 0pt;"&gt;&lt;br /&gt;27. What are callback strings?&lt;/span&gt;&lt;span lang="EN-US" style="color: #191919; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8.0pt; mso-bidi-font-family: 新細明體; mso-bidi-font-size: 11.0pt; mso-font-kerning: 0pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span lang="EN-US" style="color: #191919; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8.0pt; mso-bidi-font-family: 新細明體; mso-font-kerning: 0pt;"&gt;&lt;br /&gt;28. How can I make it so that when one of the figures closes, they all close?&lt;/span&gt;&lt;span lang="EN-US" style="color: #191919; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8.0pt; mso-bidi-font-family: 新細明體; mso-bidi-font-size: 11.0pt; mso-font-kerning: 0pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span lang="EN-US" style="color: #191919; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8.0pt; mso-bidi-font-family: 新細明體; mso-font-kerning: 0pt;"&gt;&lt;br /&gt;29. How do I make several uicontrols interact in a more complicated GUI?&lt;/span&gt;&lt;span lang="EN-US" style="color: #191919; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8.0pt; mso-bidi-font-family: 新細明體; mso-bidi-font-size: 11.0pt; mso-font-kerning: 0pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span lang="EN-US" style="color: #191919; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8.0pt; mso-bidi-font-family: 新細明體; mso-font-kerning: 0pt;"&gt;&lt;br /&gt;30. How do I get data from a GUI to the base workspace?&lt;/span&gt;&lt;span lang="EN-US" style="color: #191919; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8.0pt; mso-bidi-font-family: 新細明體; mso-bidi-font-size: 11.0pt; mso-font-kerning: 0pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span lang="EN-US" style="color: #191919; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8.0pt; mso-bidi-font-family: 新細明體; mso-font-kerning: 0pt;"&gt;&lt;br /&gt;31. How do I make toggle buttons act like tabbed-panels?&lt;/span&gt;&lt;span lang="EN-US" style="color: #191919; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8.0pt; mso-bidi-font-family: 新細明體; mso-bidi-font-size: 11.0pt; mso-font-kerning: 0pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span lang="EN-US" style="color: #191919; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8.0pt; mso-bidi-font-family: 新細明體; mso-font-kerning: 0pt;"&gt;&lt;br /&gt;32. How can I make a password editbox that has the ***** symbols?&lt;/span&gt;&lt;span lang="EN-US" style="color: #191919; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8.0pt; mso-bidi-font-family: 新細明體; mso-bidi-font-size: 11.0pt; mso-font-kerning: 0pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span lang="EN-US" style="color: #191919; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8.0pt; mso-bidi-font-family: 新細明體; mso-font-kerning: 0pt;"&gt;&lt;br /&gt;33. How can I use nested function as callbacks?&lt;/span&gt;&lt;span lang="EN-US" style="color: #191919; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8.0pt; mso-bidi-font-family: 新細明體; mso-bidi-font-size: 11.0pt; mso-font-kerning: 0pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span lang="EN-US" style="color: #191919; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8.0pt; mso-bidi-font-family: 新細明體; mso-font-kerning: 0pt;"&gt;&lt;br /&gt;34. How can I use uiwait in a GUI?&lt;/span&gt;&lt;span lang="EN-US" style="color: #191919; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8.0pt; mso-bidi-font-family: 新細明體; mso-bidi-font-size: 11.0pt; mso-font-kerning: 0pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span lang="EN-US" style="color: #191919; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8.0pt; mso-bidi-font-family: 新細明體; mso-font-kerning: 0pt;"&gt;&lt;br /&gt;35. How do I use JAVA in my GUI?&lt;/span&gt;&lt;span lang="EN-US" style="color: #191919; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8.0pt; mso-bidi-font-family: 新細明體; mso-bidi-font-size: 11.0pt; mso-font-kerning: 0pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span lang="EN-US" style="color: #191919; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8.0pt; mso-bidi-font-family: 新細明體; mso-font-kerning: 0pt;"&gt;&lt;br /&gt;36. How do I force the figure to maintain focus between uicontrol activations?&lt;/span&gt;&lt;span lang="EN-US" style="color: #191919; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8.0pt; mso-bidi-font-family: 新細明體; mso-bidi-font-size: 11.0pt; mso-font-kerning: 0pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span lang="EN-US" style="color: #191919; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8.0pt; mso-bidi-font-family: 新細明體; mso-font-kerning: 0pt;"&gt;&lt;br /&gt;37. How do I save an axes as an image?&lt;/span&gt;&lt;span lang="EN-US" style="color: #191919; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8.0pt; mso-bidi-font-family: 新細明體; mso-bidi-font-size: 11.0pt; mso-font-kerning: 0pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span lang="EN-US" style="color: #191919; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8.0pt; mso-bidi-font-family: 新細明體; mso-font-kerning: 0pt;"&gt;&lt;br /&gt;38. How can I make a simple drawing program?&lt;/span&gt;&lt;span lang="EN-US" style="color: #191919; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8.0pt; mso-bidi-font-family: 新細明體; mso-bidi-font-size: 11.0pt; mso-font-kerning: 0pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span lang="EN-US" style="color: #191919; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8.0pt; mso-bidi-font-family: 新細明體; mso-font-kerning: 0pt;"&gt;&lt;br /&gt;39. How can I save the state of a system of GUIs to use later?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: 15.0pt; margin-bottom: 10.8pt; mso-pagination: widow-orphan;"&gt;&lt;span lang="EN-US" style="color: #191919; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8.0pt; mso-bidi-font-family: 新細明體; mso-font-kerning: 0pt;"&gt;I am open to hearing any suggestion as to other questions which could be covered in the collection. Such suggestions need not be basic. Please read the pdf file prior to use. Also the contents.m file contains brief descriptions of each GUI.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span lang="EN-US" style="color: #191919; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 8.0pt; mso-bidi-font-family: 新細明體; mso-font-kerning: 0pt;"&gt;Please email me if an error is found, either in the documentation or coding. Thanks.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8244750955405541832-5275550968482054350?l=labmatpt.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://labmatpt.blogspot.com/feeds/5275550968482054350/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8244750955405541832&amp;postID=5275550968482054350' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8244750955405541832/posts/default/5275550968482054350'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8244750955405541832/posts/default/5275550968482054350'/><link rel='alternate' type='text/html' href='http://labmatpt.blogspot.com/2010/01/transcripttion-35-complete-gui-examples.html' title='[Transcripttion] 35 Complete GUI Examples'/><author><name>Eric Wu</name><uri>http://www.blogger.com/profile/13535510143465079842</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://static.zooomr.com/images/946899_7f30bf0970.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8244750955405541832.post-3604223411308853525</id><published>2009-12-29T21:15:00.000-08:00</published><updated>2009-12-29T21:18:36.414-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Matlab影像處理'/><category scheme='http://www.blogger.com/atom/ns#' term='Matlab'/><title type='text'>[Transcription] Superimposing line plots on image</title><content type='html'>In my &lt;a href="http://labmatpt.blogspot.com/2009/05/sonoanalysis-v001.html"&gt;Sonoanalysis&lt;/a&gt;&amp;nbsp;program, I need to mark the position I want on the sono image. Before I read this article:&amp;nbsp;&lt;a href="http://blogs.mathworks.com/steve/2007/01/01/superimposing-line-plots/"&gt;Superimposing line plots on image&lt;/a&gt;, there are two ways I thought to achieve this task. One is using plot function, and the other is changing the color of the pixel of position I click. However, the later method has a critical problem that it may be a time wasting method if I want to mark the position&amp;nbsp;repeatedly, because I have to change several pixels if the shape of the marker is cross or circle. As a result of that, I choose the first way to&amp;nbsp;accomplish my task finally. Today, I surfed on the internet to seek the correct method to do this kind of thing.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_yhfFssj-aUE/Szrh0vUow_I/AAAAAAAAEzc/i1K9kEbW0fY/s1600-h/a_15.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_yhfFssj-aUE/Szrh0vUow_I/AAAAAAAAEzc/i1K9kEbW0fY/s320/a_15.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;In this article:&amp;nbsp;&lt;a href="http://blogs.mathworks.com/steve/2007/01/01/superimposing-line-plots/"&gt;Superimposing line plots on image&lt;/a&gt;, the author who manages the Image &amp;amp; Geospatial development team at the Mathworks shows the way by using plot function, so I think it is a better way to do this task.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8244750955405541832-3604223411308853525?l=labmatpt.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://labmatpt.blogspot.com/feeds/3604223411308853525/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8244750955405541832&amp;postID=3604223411308853525' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8244750955405541832/posts/default/3604223411308853525'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8244750955405541832/posts/default/3604223411308853525'/><link rel='alternate' type='text/html' href='http://labmatpt.blogspot.com/2009/12/transcription-superimposing-line-plots.html' title='[Transcription] Superimposing line plots on image'/><author><name>Eric Wu</name><uri>http://www.blogger.com/profile/13535510143465079842</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://static.zooomr.com/images/946899_7f30bf0970.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_yhfFssj-aUE/Szrh0vUow_I/AAAAAAAAEzc/i1K9kEbW0fY/s72-c/a_15.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8244750955405541832.post-2010587331075303898</id><published>2009-07-08T05:15:00.000-07:00</published><updated>2009-07-08T05:20:21.250-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Matlab'/><category scheme='http://www.blogger.com/atom/ns#' term='GUIDE'/><category scheme='http://www.blogger.com/atom/ns#' term='GUI'/><title type='text'>Matlab GUI程式轉成可執行檔（exe）</title><content type='html'>今天為了讓別台電腦也能夠跑Matlab程式，到處搜尋，最後在PTT Matlab版上找到了辦法：&lt;br /&gt;&lt;blockquote&gt;如何將GUI轉成執行檔EXE，在未安裝MATLAB之電腦執行？&lt;br /&gt;首先須先有以經做好的gui.m文件和gui.fig文件：&lt;br /&gt;1.在matlab的command窗口中輸入 mcc -B sgl GUI.m&lt;br /&gt;2.將上步生成的文件連同GUI.m文件和GUI.fig文件一起COPY到執行的電腦上(未安裝MATLAB的電腦)，並放置在同一個資料夾下。&lt;br /&gt;3.再去 &lt;matlab&gt;\toolbox\compiler\deploy\win32目錄下面找&lt;/matlab&gt;MCRinstaller.exe 這個檔案(約102MB)，複製到(別殺掉此檔!!)要執行的電腦上安裝。&lt;br /&gt;4.安裝後即可編譯GUI.exe。^^&lt;br /&gt;&lt;br /&gt;以上為最近使用心得.....提供給大家參考~~~祝大家玩個愉快....&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8244750955405541832-2010587331075303898?l=labmatpt.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://labmatpt.blogspot.com/feeds/2010587331075303898/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8244750955405541832&amp;postID=2010587331075303898' title='3 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8244750955405541832/posts/default/2010587331075303898'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8244750955405541832/posts/default/2010587331075303898'/><link rel='alternate' type='text/html' href='http://labmatpt.blogspot.com/2009/07/matlab-guiexe.html' title='Matlab GUI程式轉成可執行檔（exe）'/><author><name>Eric Wu</name><uri>http://www.blogger.com/profile/13535510143465079842</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://static.zooomr.com/images/946899_7f30bf0970.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8244750955405541832.post-117441786858927737</id><published>2009-05-05T19:34:00.000-07:00</published><updated>2009-05-05T19:38:39.515-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Matlab訊號分析'/><category scheme='http://www.blogger.com/atom/ns#' term='Matlab影像處理'/><category scheme='http://www.blogger.com/atom/ns#' term='Matlab'/><category scheme='http://www.blogger.com/atom/ns#' term='檔案處理'/><category scheme='http://www.blogger.com/atom/ns#' term='GUIDE'/><title type='text'>Sonoanalysis V.001（初版）</title><content type='html'>前言：改良自碩士班的原始版本，當初懵懵懂懂寫得很亂，現在以新觀念方法改造。&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_yhfFssj-aUE/SgD334jq9nI/AAAAAAAACVg/6G6nyiU0hZM/s1600-h/sonoanalysis_1.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 181px;" src="http://4.bp.blogspot.com/_yhfFssj-aUE/SgD334jq9nI/AAAAAAAACVg/6G6nyiU0hZM/s320/sonoanalysis_1.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5332534498253534834" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Load File：開啟後選取圖片資料夾，資料夾內圖片會以[sort_name] = sort_file(path)排列，目的是將連續圖片排序，若是一般則以sort的方式（排列字母大小等）。但是當初因為自己的失誤把檔名寫成1.jpg, 2.jpg ….. 10.jpg, 11.jpg…..，經過排列後會變成1.jpg, 10.jpg, 11.jpg, ……, 19.jpg, 2.jpg, 21.jpg…..，因此才多寫若是檔名不一樣長，則以不同cell的方式將相同長度檔名放入排列（目前只有到十位數）。&lt;/li&gt;&lt;li&gt;Sliderbar：會將sort過得file按照順序排列，提供一張張點選。&lt;/li&gt;&lt;li&gt;position select：則是以sono_mousedown.m方式，將滑鼠點所點的點的座標顯示。&lt;/li&gt;&lt;li&gt;Dist tool：以matlab內建的dist tool作用，不過目前沒有校正顯示的長度。&lt;/li&gt;&lt;li&gt;Save Figure &amp;amp; value：將座標值存入table中，並且將點選好的圖片存入目前資料夾內，並且以[path new_filename] = changefilename(filename,add_word)改名（如：a_原始檔名）。改名之後，由於儲存圖檔的時候當初以plot方式所畫得十字記號無法存入，因此以[change_image] = draw_image(im,x,y)方式，將所選取的座標位置上下左右15個像素統統改成紅色（即變成十字）。&lt;br /&gt;匯入座標資料於table，並且[cal_dist]=calcu_dist(ini_p,cal_p,dist_prop)，依目前深度計算和第一點的距離。&lt;/li&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_yhfFssj-aUE/SgD39zjcuGI/AAAAAAAACVo/wcoV5ZIjWVo/s1600-h/sonoanalysis_2.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 187px;" src="http://2.bp.blogspot.com/_yhfFssj-aUE/SgD39zjcuGI/AAAAAAAACVo/wcoV5ZIjWVo/s320/sonoanalysis_2.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5332534599989639266" /&gt;&lt;/a&gt;&lt;li&gt;Export：將資料匯出，內建以目前資料夾為匯出處，以[file,path]=uiputfile('.txt','Save file as',eval('[handles.path default_file]'))完成想要匯出的資料夾，預設以dist.txt作為預設匯出檔名。&lt;br /&gt;匯出後以sonofilemerge(path,sonofile,distfile)自動和sono.txt檔案結合成stiff.txt（個人需要）。&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8244750955405541832-117441786858927737?l=labmatpt.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://labmatpt.blogspot.com/feeds/117441786858927737/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8244750955405541832&amp;postID=117441786858927737' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8244750955405541832/posts/default/117441786858927737'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8244750955405541832/posts/default/117441786858927737'/><link rel='alternate' type='text/html' href='http://labmatpt.blogspot.com/2009/05/sonoanalysis-v001.html' title='Sonoanalysis V.001（初版）'/><author><name>Eric Wu</name><uri>http://www.blogger.com/profile/13535510143465079842</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://static.zooomr.com/images/946899_7f30bf0970.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_yhfFssj-aUE/SgD334jq9nI/AAAAAAAACVg/6G6nyiU0hZM/s72-c/sonoanalysis_1.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8244750955405541832.post-4919424185693912691</id><published>2009-05-05T19:14:00.000-07:00</published><updated>2009-05-05T19:34:11.208-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Matlab訊號分析'/><category scheme='http://www.blogger.com/atom/ns#' term='Matlab'/><category scheme='http://www.blogger.com/atom/ns#' term='檔案處理'/><category scheme='http://www.blogger.com/atom/ns#' term='GUIDE'/><title type='text'>electroGUI V.0.0001（毫無意義版）</title><content type='html'>　　這個東西我實在沒有時間好好的把他製作一番。&lt;br /&gt;&lt;br /&gt;　　electroGUI V.0.0001（毫無意義版）界面介紹&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://lh6.ggpht.com/_yhfFssj-aUE/SgDy-9bOqoI/AAAAAAAACUo/qrOVtvpR91U/s800/electroGUI_1.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 450px; height: 276px;" src="http://lh6.ggpht.com/_yhfFssj-aUE/SgDy-9bOqoI/AAAAAAAACUo/qrOVtvpR91U/s800/electroGUI_1.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;開啟（以autochoosetype.m）：目前內建可讀全部為數據的txt檔（以textread開啟），InstruNet（以readintranet.m開啟）所產生的.TXT檔（如：Ch1_Vin+.TXT），以及一般具有標頭檔案（以hdrload.m開啟）。&lt;/li&gt;&lt;li&gt;資料數據（以datacursor）：則是可以點選圖形，顯示原始x,y資料點，如下圖：&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://lh5.ggpht.com/_yhfFssj-aUE/SgDzgbC3BuI/AAAAAAAACUw/vOLdY13Dwn0/s800/electroGUI_2.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 457px; height: 280px;" src="http://lh5.ggpht.com/_yhfFssj-aUE/SgDzgbC3BuI/AAAAAAAACUw/vOLdY13Dwn0/s800/electroGUI_2.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;/li&gt;&lt;li&gt;選取範圍（以get_x_point.m）：即點選圖形區域，目前規定要由左到右選取。如下圖：點選後按peak to peak即以所填入的放大倍率計算peak to peak amplitude。&lt;/li&gt;&lt;/ol&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://lh5.ggpht.com/_yhfFssj-aUE/SgDzv9jxIMI/AAAAAAAACU4/BUmVo9QeNwU/s800/electroGUI_3.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 478px; height: 293px;" src="http://lh5.ggpht.com/_yhfFssj-aUE/SgDzv9jxIMI/AAAAAAAACU4/BUmVo9QeNwU/s800/electroGUI_3.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;若是資料選取順序錯誤，則會出現警告。&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://lh6.ggpht.com/_yhfFssj-aUE/SgDz_OcpPkI/AAAAAAAACVA/y0JhhzqT7fY/s800/electroGUI_4.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 474px; height: 290px;" src="http://lh6.ggpht.com/_yhfFssj-aUE/SgDz_OcpPkI/AAAAAAAACVA/y0JhhzqT7fY/s800/electroGUI_4.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;結論：&lt;br /&gt;目前版本非常陽春而且bugs很多，待我有空有時間，在陸續修正並增加新功能，不過對於計算peak to peak amplitude目前來說應已經足夠。&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8244750955405541832-4919424185693912691?l=labmatpt.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://labmatpt.blogspot.com/feeds/4919424185693912691/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8244750955405541832&amp;postID=4919424185693912691' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8244750955405541832/posts/default/4919424185693912691'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8244750955405541832/posts/default/4919424185693912691'/><link rel='alternate' type='text/html' href='http://labmatpt.blogspot.com/2009/05/electrogui-v00001.html' title='electroGUI V.0.0001（毫無意義版）'/><author><name>Eric Wu</name><uri>http://www.blogger.com/profile/13535510143465079842</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://static.zooomr.com/images/946899_7f30bf0970.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh6.ggpht.com/_yhfFssj-aUE/SgDy-9bOqoI/AAAAAAAACUo/qrOVtvpR91U/s72-c/electroGUI_1.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8244750955405541832.post-8985977767875651778</id><published>2009-04-30T01:40:00.000-07:00</published><updated>2009-04-30T01:44:39.413-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Matlab'/><category scheme='http://www.blogger.com/atom/ns#' term='GUIDE'/><title type='text'>在GUIDE擺置radio button的方法</title><content type='html'>&lt;object width="425" height="344"&gt;&lt;param name="movie" value="http://www.youtube.com/v/LCFGtUvRX6w&amp;amp;hl=zh_TW&amp;amp;fs=1"&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;embed src="http://www.youtube.com/v/LCFGtUvRX6w&amp;amp;hl=zh_TW&amp;amp;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"&gt;&lt;/embed&gt;&lt;/object&gt;　　&lt;br /&gt;&lt;br /&gt;　　這個影片介紹了如何在GUIDE中，建立互相獨立的radio button，說真的，我是今天才找到這個資料，之前也是百思不得其解，好在youtube有人分享。&lt;br /&gt;&lt;br /&gt;　　不過，因為這個不是英文也不是中文，所以應該聽不懂他在說啥，但是就算不聽看操作步驟也應該是可以懂得！&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8244750955405541832-8985977767875651778?l=labmatpt.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://labmatpt.blogspot.com/feeds/8985977767875651778/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8244750955405541832&amp;postID=8985977767875651778' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8244750955405541832/posts/default/8985977767875651778'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8244750955405541832/posts/default/8985977767875651778'/><link rel='alternate' type='text/html' href='http://labmatpt.blogspot.com/2009/04/guideradio-buttonyoutube.html' title='在GUIDE擺置radio button的方法'/><author><name>Eric Wu</name><uri>http://www.blogger.com/profile/13535510143465079842</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://static.zooomr.com/images/946899_7f30bf0970.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8244750955405541832.post-8714835053526497218</id><published>2009-04-26T20:56:00.000-07:00</published><updated>2009-04-26T21:13:32.439-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Matlab'/><category scheme='http://www.blogger.com/atom/ns#' term='檔案處理'/><title type='text'>讀取有Header的txt檔</title><content type='html'>今天我有一個檔案長得如下：&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;frame force angle&lt;br /&gt;180.000000 25.907727 -96.707100&lt;br /&gt;198.000000 52.657283 -97.686900&lt;br /&gt;206.000000 79.306087 -97.134200&lt;br /&gt;216.000000 105.920720 -96.028800&lt;br /&gt;234.000000 132.531830 -95.501200&lt;br /&gt;252.000000 159.259191 -95.023900&lt;br /&gt;271.000000 185.936060 -94.496300&lt;br /&gt;293.000000 212.583572 -94.194800&lt;br /&gt;312.000000 239.251047 -92.586900&lt;br /&gt;332.000000 265.956685 -91.506600&lt;br /&gt;357.000000 292.655864 -91.556900&lt;br /&gt;364.000000 265.886229 -91.255400&lt;br /&gt;369.000000 239.255744 -91.582000&lt;br /&gt;376.000000 212.594141 -92.813000&lt;br /&gt;384.000000 185.939583 -92.586900&lt;br /&gt;394.000000 159.297355 -93.215000&lt;br /&gt;406.000000 132.574103 -93.390900&lt;br /&gt;421.000000 105.981781 -93.943600&lt;br /&gt;434.000000 79.340140 -94.747500&lt;br /&gt;468.000000 52.674016 -96.104100&lt;br /&gt;501.000000 25.987401 -97.360300&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;　　在matlab裡面一定沒有辦法用既有的textread讀取，因為第一行的文字！於是我寫個個跳過第一行的程式！如下：&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;function mat_a = get_to_mat(filename,l)&lt;br /&gt;fp = fopen(filename);&lt;br /&gt;current_l = 1;&lt;br /&gt;while 1    &lt;br /&gt;    content = fgetl(fp);    &lt;br /&gt;    if current_l &lt;= l&lt;br /&gt;        tile = content;&lt;br /&gt;        current_l = current_l +1;&lt;br /&gt;    elseif current_l &gt; l &amp; ischar(content) == 1&lt;br /&gt;        mat_a(current_l - l,:) = str2num(content);&lt;br /&gt;        current_l = current_l +1;&lt;br /&gt;    elseif ischar(content) == 0&lt;br /&gt;        break&lt;br /&gt;    end&lt;br /&gt;end&lt;br /&gt;fclose(fp);;&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;　　概念很簡單，就是輸入要跳過的行數，然後以行數來計算一行一行存成矩陣！但是這時候我又想到，剛好今天我這個檔案非常的小，行數也很短，如果我今天拿&lt;span class="Apple-style-span" style="color: rgb(255, 0, 0);"&gt;上萬行的數據執行，執行到死都執行不完！&lt;/span&gt;。&lt;br /&gt;　　百思不得其解後，google了許久，在matlab官方網站看到了有人分享的寫法：&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;function [header, data] = hdrload(file)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;% HDRLOAD Load data from an ASCII file containing a text header.&lt;br /&gt;%     [header, data] = HDRLOAD('filename.ext') reads a data file&lt;br /&gt;%     called 'filename.ext', which contains a text header.  There&lt;br /&gt;%     is no default extension; any extensions must be explicitly&lt;br /&gt;%     supplied.&lt;br /&gt;%&lt;br /&gt;%     The first output, HEADER, is the header information, &lt;br /&gt;%     returned as a text array.&lt;br /&gt;%     The second output, DATA, is the data matrix.  This data &lt;br /&gt;%     matrix has the same dimensions as the data in the file, one&lt;br /&gt;%     row per line of ASCII data in the file.  If the data is not&lt;br /&gt;%     regularly spaced (i.e., each line of ASCII data does not &lt;br /&gt;%     contain the same number of points), the data is returned as&lt;br /&gt;%     a column vector.&lt;br /&gt;%&lt;br /&gt;%     Limitations:  No line of the text header can begin with&lt;br /&gt;%     a number.  Only one header and data set will be read,&lt;br /&gt;%     and the header must come before the data.&lt;br /&gt;%&lt;br /&gt;%     See also LOAD, SAVE, SPCONVERT, FSCANF, FPRINTF, STR2MAT.&lt;br /&gt;%     See also the IOFUN directory.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;% check number and type of arguments&lt;br /&gt;if nargin &lt; 1&lt;br /&gt;  error('Function requires one input argument');&lt;br /&gt;elseif ~isstr(file)&lt;br /&gt;  error('Input must be a string representing a filename');&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;% Open the file.  If this returns a -1, we did not open the file &lt;br /&gt;% successfully.&lt;br /&gt;fid = fopen(file);&lt;br /&gt;if fid==-1&lt;br /&gt;  error('File not found or permission denied');&lt;br /&gt;  end&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;% Initialize loop variables&lt;br /&gt;% We store the number of lines in the header, and the maximum &lt;br /&gt;% length of any one line in the header.  These are used later &lt;br /&gt;% in assigning the 'header' output variable.&lt;br /&gt;no_lines = 0;&lt;br /&gt;max_line = 0;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;% We also store the number of columns in the data we read.  This &lt;br /&gt;% way we can compute the size of the output based on the number &lt;br /&gt;% of columns and the total number of data points.&lt;br /&gt;ncols = 0;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;% Finally, we initialize the data to [].&lt;br /&gt;data = [];&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;% Start processing.&lt;br /&gt;line = fgetl(fid);&lt;br /&gt;if ~isstr(line)&lt;br /&gt;  disp('Warning: file contains no header and no data')&lt;br /&gt;  end;&lt;br /&gt;[data, ncols, errmsg, nxtindex] = sscanf(line, '%f');&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;% One slight problem, pointed out by Peter vanderWal: If the &lt;br /&gt;% first character of the line is 'e', then this will scan as &lt;br /&gt;% 0.00e+00. We can trap this case specifically by using the &lt;br /&gt;% 'next index' output: in the case of a stripped 'e' the next &lt;br /&gt;% index is one, indicating zero characters read.  See the help &lt;br /&gt;% entry for 'sscanf' for more information on this output &lt;br /&gt;% parameter. We loop through the file one line at a time until &lt;br /&gt;% we find some data.  After that point we stop checking for &lt;br /&gt;% header information. This part of the program takes most of the &lt;br /&gt;% processing time, because fgetl is relatively slow (compared to &lt;br /&gt;% fscanf, which we will use later).&lt;br /&gt;while isempty(data)|(nxtindex==1)&lt;br /&gt;  no_lines = no_lines+1;&lt;br /&gt;  max_line = max([max_line, length(line)]);&lt;br /&gt;  % Create unique variable to hold this line of text information.&lt;br /&gt;  % Store the last-read line in this variable.&lt;br /&gt;  eval(['line', num2str(no_lines), '=line;']);&lt;br /&gt;  line = fgetl(fid);&lt;br /&gt;  if ~isstr(line)&lt;br /&gt;    disp('Warning: file contains no data')&lt;br /&gt;    break&lt;br /&gt;    end;&lt;br /&gt;  [data, ncols, errmsg, nxtindex] = sscanf(line, '%f');&lt;br /&gt;  end % while&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;% Now that we have read in the first line of data, we can skip &lt;br /&gt;% the processing that stores header information, and just read &lt;br /&gt;% in the rest of the data. &lt;br /&gt;data = [data; fscanf(fid, '%f')];&lt;br /&gt;fclose(fid);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;% Create header output from line information. The number of lines&lt;br /&gt;% and the maximum line length are stored explicitly, and each &lt;br /&gt;% line is stored in a unique variable using the 'eval' statement &lt;br /&gt;% within the loop. Note that, if we knew a priori that the &lt;br /&gt;% headers were 10 lines or less, we could use the STR2MAT &lt;br /&gt;% function and save some work. First, initialize the header to an&lt;br /&gt;% array of spaces.&lt;br /&gt;header = setstr(' '*ones(no_lines, max_line));&lt;br /&gt;for i = 1:no_lines&lt;br /&gt;  varname = ['line' num2str(i)];&lt;br /&gt;  % Note that we only assign this line variable to a subset of &lt;br /&gt;  % this row of the header array.  We thus ensure that the matrix&lt;br /&gt;  % sizes in the assignment are equal. We also consider blank &lt;br /&gt;  % header lines using the following IF statement.&lt;br /&gt;  if eval(['length(' varname ')~=0'])&lt;br /&gt;    eval(['header(i, 1:length(' varname ')) = ' varname ';']);&lt;br /&gt;    end&lt;br /&gt;  end % for&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;% Resize output data, based on the number of columns (as returned&lt;br /&gt;% from the sscanf of the first line of data) and the total number&lt;br /&gt;% of data elements. Since the data was read in row-wise, and &lt;br /&gt;% MATLAB stores data in columnwise format, we have to reverse the&lt;br /&gt;% size arguments and then transpose the data.  If we read in &lt;br /&gt;% irregularly spaced data, then the division we are about to do &lt;br /&gt;% will not work. Therefore, we will trap the error with an EVAL &lt;br /&gt;% call; if the reshape fails, we will just return the data as is.&lt;br /&gt;eval('data = reshape(data, ncols, length(data)/ncols)'';', '');&lt;br /&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;　　簡單的說，這個程式先一行一行判斷是否為string&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;（if ~isstr(line)）&lt;/span&gt;，然後在以&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;data = [data; fscanf(fid, '%f')];&lt;/span&gt;讀入數值資料，並且會以&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;[data, ncols, errmsg, nxtindex] = sscanf(line, '%f');（其中line是先讀入一行）&lt;/span&gt;去看ncols。&lt;br /&gt;&lt;br /&gt;　　最後再把讀入的數值data資料用reshape的方式&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;（data = reshape(data, ncols, length(data)/ncols);）&lt;/span&gt;完成。速率的確加快許多。&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8244750955405541832-8714835053526497218?l=labmatpt.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://labmatpt.blogspot.com/feeds/8714835053526497218/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8244750955405541832&amp;postID=8714835053526497218' title='2 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8244750955405541832/posts/default/8714835053526497218'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8244750955405541832/posts/default/8714835053526497218'/><link rel='alternate' type='text/html' href='http://labmatpt.blogspot.com/2009/04/headertxt.html' title='讀取有Header的txt檔'/><author><name>Eric Wu</name><uri>http://www.blogger.com/profile/13535510143465079842</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://static.zooomr.com/images/946899_7f30bf0970.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8244750955405541832.post-4540613887905848302</id><published>2009-04-25T07:32:00.000-07:00</published><updated>2009-04-25T08:56:46.813-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='scilab'/><category scheme='http://www.blogger.com/atom/ns#' term='Matlab'/><title type='text'>與Matlab textread相同功能的fscanfMat（scilab）</title><content type='html'>　　如題，最近在研究FreeMat和Scilab兩個免費又和matlab相似的軟體（應該說是clone）&lt;br /&gt;&lt;br /&gt;  matlab中的textread對於我讀大量數據的時候非常方便，自動可以存成矩陣，剛剛google了一下，發現scilab中的fscanfMat指令有相同功能。&lt;br /&gt;&lt;br /&gt;　　不過現在美中不足的是，scilab介面改由java製成，&lt;span class="Apple-style-span" style="color: rgb(255, 0, 0);"&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;plot指令居然會造成crash&lt;/span&gt;&lt;/span&gt;，哇哩勒！連plot都不能用那還搞啥東東！？於是只好將回version4使用！（難怪下載的時候發現scilab怎麼變得如此肥！）&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8244750955405541832-4540613887905848302?l=labmatpt.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://labmatpt.blogspot.com/feeds/4540613887905848302/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8244750955405541832&amp;postID=4540613887905848302' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8244750955405541832/posts/default/4540613887905848302'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8244750955405541832/posts/default/4540613887905848302'/><link rel='alternate' type='text/html' href='http://labmatpt.blogspot.com/2009/04/matlab-textreadfscanfmatscilab.html' title='與Matlab textread相同功能的fscanfMat（scilab）'/><author><name>Eric Wu</name><uri>http://www.blogger.com/profile/13535510143465079842</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://static.zooomr.com/images/946899_7f30bf0970.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8244750955405541832.post-4516521311097580570</id><published>2009-04-23T00:00:00.000-07:00</published><updated>2009-04-24T21:12:55.192-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Matlab'/><category scheme='http://www.blogger.com/atom/ns#' term='檔案處理'/><title type='text'>失誤？！</title><content type='html'>今天試圖來做一個檔案處理，預備將我要的檔案形式讀入，我的檔案很簡單，如下：&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;name    腿長    腳踝長&lt;br /&gt;SYC    47    19&lt;br /&gt;YFT    41    13&lt;br /&gt;ZJY    45    15&lt;br /&gt;LSP    44    14&lt;br /&gt;CCH    51    16&lt;br /&gt;LIU    42    14.5&lt;br /&gt;KMY    40    14&lt;br /&gt;LC    41    13.5&lt;br /&gt;LGP    46    15&lt;br /&gt;CCL    40    13.5&lt;br /&gt;CIC    49    16&lt;br /&gt;ZKY    48    15&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;　　這是在記事本或是notepad顯示的資料，前面是姓名並且腿長和腳踝長中間以&lt;span style="color: rgb(51, 51, 255);"&gt;'\t'&lt;/span&gt;做區隔。&lt;br /&gt;　　&lt;br /&gt;　　我的目的是要將檔案如matlab中textread指令一樣，將資料讀入並以name Leg Ankle，三個陣列儲存，然後第一行不要。&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;clear all&lt;br /&gt;fd = fopen('I:\Leglength.txt','r');&lt;br /&gt;m = 1;&lt;br /&gt;n = 1;&lt;br /&gt;while 1&lt;br /&gt;  if m == 1&lt;br /&gt;    tile = fgets(fd);&lt;br /&gt;    m=m+1;&lt;br /&gt;  elseif fgets(fd) == -1&lt;br /&gt;    break&lt;br /&gt;  else&lt;br /&gt;    content=fgets(fd);&lt;br /&gt;    [name(n) Leg(n) Ankle(n)]=strread(content,'%s %f %f');&lt;br /&gt;    n=n+1;&lt;br /&gt;  end&lt;br /&gt;end&lt;br /&gt;fclose(fd);&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;　　想法非常簡單m=1單純就用在第一行，然後把第一行資料丟到title裡面去。其他就是[name(n) Leg(n) Ankle(n)]=strread(content,'%s %f %f');依照這樣格式丟入，然後如果讀到最後一行fgets(fd) == -1，則結束此程式。&lt;br /&gt;&lt;br /&gt;　　執行後結果，以name來看&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&gt;&gt; name&lt;br /&gt;&lt;br /&gt;name =&lt;br /&gt;&lt;br /&gt;'YFT'    'LSP'    'LIU'    'LC'    'CCL'    'ZKY'&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;　　哇哩勒，what happened??為啥麼只讀了3 5 7 9 11 13行，發生了啥事？百思不得其解，試了又試，情況依舊，於是我開始懷疑起&lt;span style="color: rgb(255, 0, 0);"&gt;elseif fgets(fd) == -1&lt;/span&gt;，所以我把程式改寫成&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;clear all&lt;br /&gt;fd = fopen('I:\Leglength.txt','r');&lt;br /&gt;m = 1;&lt;br /&gt;n = 1;&lt;br /&gt;while 1&lt;br /&gt;  content = fgets(fd)&lt;br /&gt;  if m == 1&lt;br /&gt;      tile = content;&lt;br /&gt;      m=m+1&lt;br /&gt;  elseif ischar(content) == 1&lt;br /&gt;      [name(n) Leg(n) Ankle(n)]=strread(content,'%s %f %f');&lt;br /&gt;      n=n+1; &lt;br /&gt;  end&lt;br /&gt;  if content == -1&lt;br /&gt;      break&lt;br /&gt;  end&lt;br /&gt;end&lt;br /&gt;fclose(fd);&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;　　果不其然，這次完全沒有問題&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;br /&gt;&gt;&gt; name&lt;br /&gt;&lt;br /&gt;name =&lt;br /&gt;&lt;br /&gt;  'SYC'    'YFT'    'ZJY'    'LSP'    'CCH'    'LIU'    'KMY'    'LC'    'LGP'    'CCL'    'CIC'    'ZKY'&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;　　那也就是說，把&lt;span style="color: rgb(255, 0, 0);"&gt;elseif fgets(fd) == -1&lt;/span&gt;當作判斷句的時候，程式就會讀了一行，所以在跑之後的[name(n) Leg(n) Ankle(n)]=strread(content,'%s %f %f')，所讀到的就是下一行檔案內的東西！&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8244750955405541832-4516521311097580570?l=labmatpt.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://labmatpt.blogspot.com/feeds/4516521311097580570/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8244750955405541832&amp;postID=4516521311097580570' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8244750955405541832/posts/default/4516521311097580570'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8244750955405541832/posts/default/4516521311097580570'/><link rel='alternate' type='text/html' href='http://labmatpt.blogspot.com/2009/04/blog-post.html' title='失誤？！'/><author><name>Eric Wu</name><uri>http://www.blogger.com/profile/13535510143465079842</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://static.zooomr.com/images/946899_7f30bf0970.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8244750955405541832.post-2079839713803982362</id><published>2007-01-08T22:48:00.000-08:00</published><updated>2009-04-22T19:15:14.692-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Matlab作業'/><category scheme='http://www.blogger.com/atom/ns#' term='Matlab'/><title type='text'>Matlab最後作業</title><content type='html'>首先先了解範例一的程式碼&lt;br /&gt;主要的元件要有：&lt;br /&gt;Static text："請輸入繪圖指令："&lt;br /&gt;Pop-up Menu：'plot(x) | pie(x) | hist(y) | ezplot3(f) | polar(theta,r) | area(x,y)'&lt;br /&gt;Pushbutton：開啟&lt;br /&gt;axes：繪圖&lt;br /&gt;然後最後還要有Menu bar的一個item&lt;br /&gt;file：裡面含有：open close print三個元件&lt;br /&gt;所以原本用guide方式設計的為&lt;a href="http://four.fsphost.com/happyeric1120/demo3.html"&gt;請按此連結&lt;/a&gt;或是直接連到&lt;a href="http://bime-matlab.blogspot.com/2006/12/blog-post_7955.html"&gt;範例一&lt;/a&gt;&lt;br /&gt;執行後畫面如下：&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://static.zooomr.com/images/619792_6849b87a39_b.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px;" src="http://static.zooomr.com/images/619792_6849b87a39_b.jpg" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;以及&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://static.zooomr.com/images/619791_cebaa3095e_b.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px;" src="http://static.zooomr.com/images/619791_cebaa3095e_b.jpg" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;open:開一個新的figure&lt;br /&gt;close:關掉此figure並且會跳出視窗問是否確定要關掉&lt;br /&gt;print:開啟印表機並且選擇列印這一個figure&lt;br /&gt;&lt;br /&gt;若是以handle的方式執行的話，我將元件以structure的方式放入一個變數c&lt;br /&gt;並且要將此變數定為global，如此才能在不同的callback中呼叫，並且利用&lt;br /&gt;structure的方式，只要寫global c就可以了，不用在一個一個呼叫比較方便&lt;br /&gt;&lt;br /&gt;所以主要的元件如下：&lt;br /&gt;% Use uicontrol to create a GUI&lt;br /&gt;&lt;br /&gt;%------------------------------------------------------------------------%&lt;br /&gt;&lt;br /&gt;% Create and then hide the GUI as it is being constructed.&lt;br /&gt;&lt;br /&gt;global c&lt;br /&gt;&lt;br /&gt;c.f = figure('Visible','on','Position',[360,500,450,285]);&lt;br /&gt;&lt;br /&gt;%------------------------------------------------------------------------%&lt;br /&gt;&lt;br /&gt;% Construct the components&lt;br /&gt;&lt;br /&gt;% component is constructed by structure of c.xxx&lt;br /&gt;&lt;br /&gt;c.static=uicontrol('Style','text','Position',[60 230 100 20]);&lt;br /&gt;&lt;br /&gt;c.popup=uicontrol('Style','popup','Position',[200 230 100 20]);&lt;br /&gt;&lt;br /&gt;c.push=uicontrol('Style','pushbutton','Position',[320 230 50 20]);&lt;br /&gt;&lt;br /&gt;c.axes=axes('Units','Pixels','Position',[30,30,400,185]);&lt;br /&gt;&lt;br /&gt;c.filemenu=uimenu('Label','File');&lt;br /&gt;&lt;br /&gt;c.openMenuItem=uimenu(c.filemenu,'Label','Open');&lt;br /&gt;&lt;br /&gt;c.closeMenuItem=uimenu(c.filemenu,'Label','Close');&lt;br /&gt;&lt;br /&gt;c.printMenuItem=uimenu(c.filemenu,'Label','Print');&lt;br /&gt;&lt;br /&gt;% setup the UI&lt;br /&gt;&lt;br /&gt;set(c.static,'String','請輸入繪圖指令：');&lt;br /&gt;&lt;br /&gt;set(c.popup,'String','plot(x) | pie(x) | hist(y) | ezplot3(f) | polar(theta,r) | area(x,y)');&lt;br /&gt;&lt;br /&gt;set(c.push,'String','開啟','callback',(@push_callback));&lt;br /&gt;&lt;br /&gt;set(c.openMenuItem,'callback',(@OpenMenuItem_callback));&lt;br /&gt;&lt;br /&gt;set(c.closeMenuItem,'callback',(@CloseMenuItem_callback));&lt;br /&gt;&lt;br /&gt;set(c.printMenuItem,'callback',(@PrintMenuItem_callback));&lt;br /&gt;&lt;br /&gt;將每一個元件都定義後，在將其特性以及相對應的callback寫好&lt;br /&gt;&lt;br /&gt;程式碼如下：(或是直接&lt;a href="http://four.fsphost.com/happyeric1120/demo3_GUI.html"&gt;按此連結&lt;/a&gt;)&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;function demo3_GUI&lt;br /&gt;% Use uicontrol to create a GUI&lt;br /&gt;&lt;br /&gt;%------------------------------------------------------------------------%&lt;br /&gt;% Create and then hide the GUI as it is being constructed.&lt;br /&gt;global c&lt;br /&gt;c.f = figure('Visible','on','Position',[360,500,450,285]);&lt;br /&gt;&lt;br /&gt;%------------------------------------------------------------------------%&lt;br /&gt;% Construct the components&lt;br /&gt;% component is constructed by structure of c.xxx&lt;br /&gt;&lt;br /&gt;c.static=uicontrol('Style','text','Position',[60 230 100 20]);&lt;br /&gt;c.popup=uicontrol('Style','popup','Position',[200 230 100 20]);&lt;br /&gt;c.push=uicontrol('Style','pushbutton','Position',[320 230 50 20]);&lt;br /&gt;c.axes=axes('Units','Pixels','Position',[30,30,400,185]);&lt;br /&gt;c.filemenu=uimenu('Label','File');&lt;br /&gt;c.openMenuItem=uimenu(c.filemenu,'Label','Open');&lt;br /&gt;c.closeMenuItem=uimenu(c.filemenu,'Label','Close');&lt;br /&gt;c.printMenuItem=uimenu(c.filemenu,'Label','Print');&lt;br /&gt;&lt;br /&gt;% setup the UI &lt;br /&gt;set(c.static,'String','請輸入繪圖指令：');&lt;br /&gt;set(c.popup,'String','plot(x) | pie(x) | hist(y) | ezplot3(f) | polar(theta,r) | area(x,y)');&lt;br /&gt;set(c.push,'String','開啟','callback',(@push_callback));&lt;br /&gt;set(c.openMenuItem,'callback',(@OpenMenuItem_callback));&lt;br /&gt;set(c.closeMenuItem,'callback',(@CloseMenuItem_callback));&lt;br /&gt;set(c.printMenuItem,'callback',(@PrintMenuItem_callback));&lt;br /&gt;&lt;br /&gt;%------------------------------------------------------------------------%&lt;br /&gt;% Initialize the GUI.&lt;br /&gt;% Change units to normalized so components resize&lt;br /&gt;% automatically.&lt;br /&gt;set([c.f,c.static,c.popup,c.push],'Units','normalized');&lt;br /&gt;%Create a plot in the axes.&lt;br /&gt;c.axes=plot(rand(5));&lt;br /&gt;% Assign the GUI a name to appear in the window title.&lt;br /&gt;set(c.f,'Name','demo3 GUI')&lt;br /&gt;% Move the GUI to the center of the screen.&lt;br /&gt;movegui(c.f,'center')&lt;br /&gt;&lt;br /&gt;%------------------------------------------------------------------------%&lt;br /&gt;% Setup the callback function of all compoment&lt;br /&gt;&lt;br /&gt;%----------------------------------%&lt;br /&gt;%---------popup_callback-----------%&lt;br /&gt;%----------------------------------%&lt;br /&gt;function push_callback(source,eventdata)&lt;br /&gt;global c&lt;br /&gt;k=get(c.popup,'value');&lt;br /&gt;switch k&lt;br /&gt;   case 1&lt;br /&gt;       plot(rand(5));&lt;br /&gt;   case 2&lt;br /&gt;       n=round(10*rand)+10;&lt;br /&gt;       pie(2:4:n);&lt;br /&gt;   case 3&lt;br /&gt;       hist(randn(1000,1));&lt;br /&gt;   case 4&lt;br /&gt;       ezplot3('t*sin(t)', 'cos(t)', 't', [0,6*pi])&lt;br /&gt;   case 5&lt;br /&gt;       theta = linspace(0, 2*pi);&lt;br /&gt;       polar(theta, 3+2*rand*cos(4*theta));&lt;br /&gt;   case 6&lt;br /&gt;       y=[1 1.2 1.5 2*rand;4 4.5 6.6 7*rand;5 6.5 8 15*rand]';&lt;br /&gt;       area([1980 1990 2000 2008],y);&lt;br /&gt;       grid on;colormap cool;&lt;br /&gt;      &lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;% --------------------------------------------------------------------&lt;br /&gt;function OpenMenuItem_callback(source, eventdata)&lt;br /&gt;% hObject    handle to OpenMenuItem (see GCBO)&lt;br /&gt;% eventdata  reserved - to be defined in a future version of MATLAB&lt;br /&gt;% handles    structure with handles and user data (see GUIDATA)&lt;br /&gt;file = uigetfile('*.fig');&lt;br /&gt;if ~isequal(file, 0)&lt;br /&gt;   open(file);&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;% --------------------------------------------------------------------&lt;br /&gt;function PrintMenuItem_callback(source, eventdata)&lt;br /&gt;% hObject    handle to PrintMenuItem (see GCBO)&lt;br /&gt;% eventdata  reserved - to be defined in a future version of MATLAB&lt;br /&gt;% handles    structure with handles and user data (see GUIDATA)&lt;br /&gt;global c&lt;br /&gt;printdlg(c.f)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;% --------------------------------------------------------------------&lt;br /&gt;function CloseMenuItem_callback(source, eventdata)&lt;br /&gt;% hObject    handle to CloseMenuItem (see GCBO)&lt;br /&gt;% eventdata  reserved - to be defined in a future version of MATLAB&lt;br /&gt;% handles    structure with handles and user data (see GUIDATA)&lt;br /&gt;global c&lt;br /&gt;selection = questdlg(['Close ' get(c.f,'Name') '?'],...&lt;br /&gt;                    ['Close ' get(c.f,'Name') '...'],...&lt;br /&gt;                    'Yes','No','Yes');&lt;br /&gt;if strcmp(selection,'No')&lt;br /&gt;   return;&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;delete(c.f)&lt;br /&gt;&lt;br /&gt;% --------------------------------------------------------------------&lt;br /&gt;function FileMenu_Callback(source, eventdata)&lt;br /&gt;% hObject    handle to FileMenu (see GCBO)&lt;br /&gt;% eventdata  reserved - to be defined in a future version of MATLAB&lt;br /&gt;% handles    structure with handles and user data (see GUIDATA)&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;執行結果如下：&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://static.zooomr.com/images/619793_cec083acdc_b.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px;" src="http://static.zooomr.com/images/619793_cec083acdc_b.jpg" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;以及&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://static.zooomr.com/images/619794_6980883c5e_b.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px;" src="http://static.zooomr.com/images/619794_6980883c5e_b.jpg" border="0" alt="" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8244750955405541832-2079839713803982362?l=labmatpt.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://labmatpt.blogspot.com/feeds/2079839713803982362/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8244750955405541832&amp;postID=2079839713803982362' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8244750955405541832/posts/default/2079839713803982362'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8244750955405541832/posts/default/2079839713803982362'/><link rel='alternate' type='text/html' href='http://labmatpt.blogspot.com/2007/01/matlab.html' title='Matlab最後作業'/><author><name>Eric Wu</name><uri>http://www.blogger.com/profile/13535510143465079842</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://static.zooomr.com/images/946899_7f30bf0970.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8244750955405541832.post-4594215013651776563</id><published>2006-12-28T07:23:00.000-08:00</published><updated>2009-04-22T19:15:14.692-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Matlab訊號分析'/><category scheme='http://www.blogger.com/atom/ns#' term='Matlab'/><title type='text'>EMG頻域（frequency domain）之中位頻率（Median frequency）計算</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://static.zooomr.com/images/576214_d8bb2d5d4c.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px;" src="http://static.zooomr.com/images/576214_d8bb2d5d4c.jpg" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;　　當我們將肌電訊號轉換成頻譜（Power spectrum）後，我們的確可&lt;br /&gt;以看到頻率和其強度的分佈，不過這代表什麼意義呢？&lt;br /&gt;&lt;br /&gt;　　我們知道我們的肌肉由不同型態組成，簡單的說可以分為快肌&lt;br /&gt;（fast twitch）跟慢肌（slow twitch），快肌肌肉纖維較粗，動作速&lt;br /&gt;度快，不過較容易疲勞，慢肌動作速度慢，但是可以作用持續時間長，&lt;br /&gt;就傳遞肌肉表面膜電位而言，快肌就像比較粗的電線，傳遞訊號的速度&lt;br /&gt;較快，因此由電極片所接收到單位時間內的電位差訊號相對而言就會比&lt;br /&gt;較多，所以頻率會落在比較高的位置，反觀慢肌，則為相反地現象。&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://static.zooomr.com/images/575219_5019dbac33.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px;" src="http://static.zooomr.com/images/575219_5019dbac33.jpg" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;　　而我們的肌肉，則由不同比例的快慢肌所組成，例如我們強而有力&lt;br /&gt;的肱二頭肌（biceps），快肌的組成較多，所以也比較容易酸。&lt;br /&gt;&lt;br /&gt;　　不過因為頻譜看出來的是各個頻率強度的變化，如果要相互比較的&lt;br /&gt;話，則必須要像一個常態分佈圖形一樣，有平均數（mean），等數值，&lt;br /&gt;比較常用來作為計算的為中位頻率（Median frequency）。&lt;br /&gt;　&lt;br /&gt;　　中位頻率（Median frequency），其定義為頻譜分析圖中，將其強&lt;br /&gt;度由低頻積分到高頻，積分面積為全部面積一半時的頻率。因此就可以&lt;br /&gt;中位頻率來作為訓練或是疲勞測試後，改變肌肉組成比例（訓練）或是&lt;br /&gt;影響肌肉放電（疲勞）等改變觀察。&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://static.zooomr.com/images/575191_cd49b3c825.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px;" src="http://static.zooomr.com/images/575191_cd49b3c825.jpg" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;　　因此利用傅立葉轉換以及if指令來求得中位頻率，當積分到某一點&lt;br /&gt;時，大於全部等積分的一半時的頻率即是中位頻率。&lt;br /&gt;&lt;br /&gt;　　由於肌電訊號是時間性的，我們比較常做的方式會像之前所用的以&lt;br /&gt;window的方式，每多少點計算一次，重複多少點，然而取樣頻率&lt;br /&gt;（sampling rate）會影響最後每一個點所代表的頻率，所以也必須考慮&lt;br /&gt;。&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;function [med_fq]=fft_i(data,n,op,sr)&lt;br /&gt;% fft for n point&lt;br /&gt;% op: the point of overlapping&lt;br /&gt;% med_fq is the median frequency of the power spectrum&lt;br /&gt;% sr is the sampling frequency&lt;br /&gt;&lt;br /&gt;% calculate the times of the loop (-1 due to the initial loop is 0)&lt;br /&gt;l=fix(length(data)/op-1);         &lt;br /&gt;fq=(1:n/2).*sr/n;                 % calculate the frequency of each point&lt;br /&gt;for i = 0:(l-1)&lt;br /&gt;    int=1+op*i;                   % the initial value of the loop&lt;br /&gt;    f=fft(data(int:(int+511)));   % fft for the data&lt;br /&gt;    mag=abs(f);                   % Amplitude of the fft&lt;br /&gt;    mag=mag(1:n/2);&lt;br /&gt;    for k=1:n/2&lt;br /&gt;        if sum(mag(1:k)) &gt;= sum(mag)/2&lt;br /&gt;            med=k;&lt;br /&gt;            break&lt;br /&gt;        end&lt;br /&gt;    end&lt;br /&gt;    med_fq(i+1,1)=k*sr/n;&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;% calculate the final part of the sample&lt;br /&gt;int=1+op*l;&lt;br /&gt;f=fft(data(int:end));   % fft for the data&lt;br /&gt;mag=abs(f);             % Amplitude of the fft&lt;br /&gt;mag=mag(1:n/2);&lt;br /&gt;for k=1:n/2&lt;br /&gt;    if sum(mag(1:k)) &gt;= sum(mag)/2&lt;br /&gt;        med=k;&lt;br /&gt;        break&lt;br /&gt;    end&lt;br /&gt;end&lt;br /&gt;med_fq(l+1,1)=k*sr/n;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;　　首先必須先計算迴圈的次數，以所有的點數除上重複的點數（通常&lt;br /&gt;會以window點數的一半）減一（種樹法則），然後就每多少點作一次傅&lt;br /&gt;立葉轉換並且求得中位頻率，值得注意的是，因為常常所選取的資料數&lt;br /&gt;並不能剛好夠最後一筆，舉例而言，也就是說原本應該要以512個點作計&lt;br /&gt;算，但是迴圈到最後一次時可能只剩下500點，由於fft這個函數當不夠&lt;br /&gt;點的時候會比剩下的點以零帶入，所以最後一個窗口則以另外方式計算&lt;br /&gt;。&lt;br /&gt;&lt;br /&gt;執行結果&lt;br /&gt;&gt;&gt; data=textread('D:/EMG_fft.txt');&lt;br /&gt;&gt;&gt; plot(data);&lt;br /&gt;&gt;&gt; med_fq=fft_i(data,512,256,1000);&lt;br /&gt;&gt;&gt; figure(2);plot(med_fq)&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://static.zooomr.com/images/575345_739cffc3fa_b.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px;" src="http://static.zooomr.com/images/575345_739cffc3fa_b.jpg" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;這是原始資料圖，資料可以&lt;a href="http://four.fsphost.com/happyeric1120/EMG_fft.txt"&gt;由此下載&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;    經由計算後為&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://static.zooomr.com/images/575346_aaaef3ad6d_b.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px;" src="http://static.zooomr.com/images/575346_aaaef3ad6d_b.jpg" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;    一開始很高可能是因為在還沒有任何訊號時就已經存在的高頻雜訊，&lt;br /&gt;此時就要利用之前提得濾波器給予濾波。&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8244750955405541832-4594215013651776563?l=labmatpt.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://labmatpt.blogspot.com/feeds/4594215013651776563/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8244750955405541832&amp;postID=4594215013651776563' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8244750955405541832/posts/default/4594215013651776563'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8244750955405541832/posts/default/4594215013651776563'/><link rel='alternate' type='text/html' href='http://labmatpt.blogspot.com/2006/12/emgfrequency-domainmedian-frequency.html' title='EMG頻域（frequency domain）之中位頻率（Median frequency）計算'/><author><name>Eric Wu</name><uri>http://www.blogger.com/profile/13535510143465079842</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://static.zooomr.com/images/946899_7f30bf0970.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8244750955405541832.post-3144335462582511822</id><published>2006-12-21T05:24:00.000-08:00</published><updated>2009-04-22T19:15:14.693-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Matlab訊號分析'/><category scheme='http://www.blogger.com/atom/ns#' term='Matlab'/><title type='text'>肌電訊號（EMG）之頻域分析</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://static.zooomr.com/images/576212_a8ee59b87e.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px;" src="http://static.zooomr.com/images/576212_a8ee59b87e.jpg" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;　　肌電訊號分析可以分為兩個主要部份，一個即是時域&lt;br /&gt;（time domain）另一則是頻域（frequency domain）。&lt;br /&gt;　　大部分例如方均根植（root mean square）或是找尋&lt;br /&gt;起始點（onset point），是屬於時域的部份；然而頻域的&lt;br /&gt;部份會著重去看頻率和強度之間的關係（power spectrum）&lt;br /&gt;，而以下所介紹的為利用傅立葉轉換（Fourier transform）&lt;br /&gt;所做出的關係圖。&lt;br /&gt;&lt;br /&gt;程式如下&lt;br /&gt;&lt;br /&gt;data=textread('D:\EMG.txt');&lt;br /&gt;fft_data=fft(data);&lt;br /&gt;mag=abs(fft_data);&lt;br /&gt;fq=(1:length(data)/2).*1200/length(data);    % 每一點的所表示的頻率&lt;br /&gt;mag=mag(1:length(data)/2);                   % 因為另一半為image&lt;br /&gt;plot(fq,mag)&lt;br /&gt;&lt;br /&gt;　　首先可以發現到當對傅立葉轉換後的圖形如下，每個&lt;br /&gt;點都是有相位與長度大小的點。所做出為複數座標系的圖&lt;br /&gt;。&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://farm1.static.flickr.com/142/329167126_7d213972c4_o.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px;" src="http://farm1.static.flickr.com/142/329167126_7d213972c4_o.jpg" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;　　不過對於分析強度和頻率而言，只要去看轉換後每個&lt;br /&gt;點的強度即可，所以將傅立葉轉換後的值取絕對值，即是&lt;br /&gt;強度。&lt;br /&gt;　　作圖後可以發現到，會是一個以中線分隔兩邊成左右&lt;br /&gt;對稱的圖形也表示只有在一半以下的點是有意義的。&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://farm1.static.flickr.com/127/329167090_8381f099df_o.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px;" src="http://farm1.static.flickr.com/127/329167090_8381f099df_o.jpg" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;    至於為什麼只有一半是有意義而另一半會是跟前一半&lt;br /&gt;對稱鏡射，這是由於我們取樣頻率的關係。&lt;br /&gt;&lt;br /&gt;　　正確的取樣頻率必須至少是原來訊號的兩倍，這就是&lt;br /&gt;所謂的Nyquist rate。即是Nyquist Theorem。&lt;br /&gt;&lt;br /&gt;　　由下圖可以見到，如果取樣頻率較小，原始訊號頻率&lt;br /&gt;很高，所取的訊號圖形和原始訊號就有差距，而變成較低&lt;br /&gt;頻的訊號。&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://static.zooomr.com/images/575192_a7336a2660_b.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px;" src="http://static.zooomr.com/images/575192_a7336a2660_b.jpg" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;　　而每一個點所代表的頻率則為”取樣頻率／點數”，&lt;br /&gt;由於只有一半的值是有意義的，所以須將頻率以及強度作&lt;br /&gt;處理，如下：&lt;br /&gt;　　fq=(1:length(data)/2).*1200/length(data);    % 每一點的所表示的頻率&lt;br /&gt;　　mag=mag(1:length(data)/2);                   % 因為另一半為image&lt;br /&gt;  &lt;br /&gt;    因此做出來的圖形如下&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://farm1.static.flickr.com/136/329167164_8071646dcc_o.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px;" src="http://farm1.static.flickr.com/136/329167164_8071646dcc_o.jpg" border="0" alt="" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8244750955405541832-3144335462582511822?l=labmatpt.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://labmatpt.blogspot.com/feeds/3144335462582511822/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8244750955405541832&amp;postID=3144335462582511822' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8244750955405541832/posts/default/3144335462582511822'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8244750955405541832/posts/default/3144335462582511822'/><link rel='alternate' type='text/html' href='http://labmatpt.blogspot.com/2006/12/emg.html' title='肌電訊號（EMG）之頻域分析'/><author><name>Eric Wu</name><uri>http://www.blogger.com/profile/13535510143465079842</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://static.zooomr.com/images/946899_7f30bf0970.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8244750955405541832.post-6254489379034772590</id><published>2006-12-14T09:14:00.000-08:00</published><updated>2009-04-22T19:15:14.693-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Matlab訊號分析'/><category scheme='http://www.blogger.com/atom/ns#' term='Matlab'/><title type='text'>moving average和rms</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://static.zooomr.com/images/576216_001fbb1be6.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px;" src="http://static.zooomr.com/images/576216_001fbb1be6.jpg" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;一般我們在分析肌電訊號的時候簡單方式，讓訊號有如封包(envelope）一樣，或是利用這些方式作為分析比較。&lt;br /&gt;　　常用的有，一階的低通濾波，方均根（rootmean square），或是平均的方式以及積分的方式。然而由於取樣頻率高，因此我們不可能把所選取的範圍全部一次作處理，而會利用窗(window）的方式，其意義是，每次選取特定的點作處理。&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://lh6.google.com.tw/image/happyeric1120/RYGGTHXwkwI/AAAAAAAAAMs/SCmLx4_OHHw/EMG_s.jpg?imgmax=512"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px;" src="http://lh6.google.com.tw/image/happyeric1120/RYGGTHXwkwI/AAAAAAAAAMs/SCmLx4_OHHw/EMG_s.jpg?imgmax=512" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;　　依據這樣的概念，利用for loop的方式，也就是每次選取固定的點作為分析使用。&lt;br /&gt;&lt;br /&gt;　　舉例而言，下圖是一段EMG的訊號。&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://lh4.google.com.tw/image/happyeric1120/RYGGPnXwktI/AAAAAAAAAMU/oydS2islaAA/raw_EMG.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px;" src="http://lh4.google.com.tw/image/happyeric1120/RYGGPnXwktI/AAAAAAAAAMU/oydS2islaAA/raw_EMG.jpg" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;　　以下是所撰寫的程式碼&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;function [out point]=moving_avg(data,dur)&lt;br /&gt;l=length(data);&lt;br /&gt;k=menu('Select the function','Average','RMS');&lt;br /&gt;switch k&lt;br /&gt;    case 1&lt;br /&gt;        for i=1:(length(data)-dur);&lt;br /&gt;            out(i,1)=mean(abs(data(i:i+dur,1)));&lt;br /&gt;            point(i,1)=(i+i+dur)/2;&lt;br /&gt;        end&lt;br /&gt;    case 2&lt;br /&gt;        for i=1:(length(data)-dur);&lt;br /&gt;            out(i,1)=sqrt(sum(data(i:i+dur,1).^2)/dur);&lt;br /&gt;            point(i,1)=(i+i+dur)/2;&lt;br /&gt;        end&lt;br /&gt;end&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;    使用的情形如下&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://lh3.google.com.tw/image/happyeric1120/RYGGVXXwkyI/AAAAAAAAAM8/l97F_SU-Skw/Screenshot%20-%202006_12_15%20%2C%20%E4%B8%8A%E5%8D%88%2012_43_40.jpg?imgmax=640"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px;" src="http://lh3.google.com.tw/image/happyeric1120/RYGGVXXwkyI/AAAAAAAAAM8/l97F_SU-Skw/Screenshot%20-%202006_12_15%20%2C%20%E4%B8%8A%E5%8D%88%2012_43_40.jpg?imgmax=640" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;    目前以menu方式寫成兩種處理方式。point是說明每一次作處理後點應該落的位置（因為10作完後只有一個點）。&lt;br /&gt;　　其結果和原始訊號圖畫在一起如下&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://lh6.google.com.tw/image/happyeric1120/RYGGSHXwkvI/AAAAAAAAAMk/VX1eC_k2tj4/EMG.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px;" src="http://lh6.google.com.tw/image/happyeric1120/RYGGSHXwkvI/AAAAAAAAAMk/VX1eC_k2tj4/EMG.jpg" border="0" alt="" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8244750955405541832-6254489379034772590?l=labmatpt.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://labmatpt.blogspot.com/feeds/6254489379034772590/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8244750955405541832&amp;postID=6254489379034772590' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8244750955405541832/posts/default/6254489379034772590'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8244750955405541832/posts/default/6254489379034772590'/><link rel='alternate' type='text/html' href='http://labmatpt.blogspot.com/2006/12/moving-averagerms.html' title='moving average和rms'/><author><name>Eric Wu</name><uri>http://www.blogger.com/profile/13535510143465079842</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://static.zooomr.com/images/946899_7f30bf0970.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8244750955405541832.post-3956847630109182176</id><published>2006-12-07T07:53:00.000-08:00</published><updated>2009-04-22T19:15:14.693-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Matlab作業'/><category scheme='http://www.blogger.com/atom/ns#' term='Matlab'/><title type='text'>Exam10.1</title><content type='html'>管路中之損失除管路本身外，其出口、入口及管徑擴張之損失均與動能有關，即V&lt;sup&gt;2&lt;/sup&gt;/(2g)之係數。其程式內容如下&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;% pipefittings.m&lt;br /&gt;% Local losses at pipe fittings&lt;br /&gt;%&lt;br /&gt;while 1&lt;br /&gt;    k=menu('請輸入接合件之型式','驟然放大','驟然逸出','擴 大 管');&lt;br /&gt;    Q=input('請輸入管路流量(m^3/s)[10]: ','s');&lt;br /&gt;    if isempty(Q), Q='10';end&lt;br /&gt;    D1=input('請輸入入口管徑(m)[1]: ','s');&lt;br /&gt;    if isempty(D1), D1='1';end&lt;br /&gt;    d1=str2num(D1);&lt;br /&gt;    ke=str2num(Q)./(pi*d1.^2/4)/(2*9.81);&lt;br /&gt;    switch k&lt;br /&gt;        case 1&lt;br /&gt;            HL=ke;&lt;br /&gt;        case 2&lt;br /&gt;            HL=ke/2;&lt;br /&gt;        case 3&lt;br /&gt;           D2=input('請輸入出口管徑(m)[2]: ','s');&lt;br /&gt;           if isempty(D2), D2='2';end&lt;br /&gt;           HL=(1-(d1./str2num(D2)).^2).*ke;&lt;br /&gt;    end&lt;br /&gt;    disp(['此接頭損失為 ' num2str(HL) ' (m).'])&lt;br /&gt;    A=input('是否繼續執行(Y/N)[Y]:','s');&lt;br /&gt;    if isempty(A), A='Y';end&lt;br /&gt;    if upper(A)~='Y', break;end&lt;br /&gt;    disp('請由選單選擇轉換單位。。。')&lt;br /&gt;end&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.ae.ntu.edu.tw/wfc/pdf/Fluid-T/5.pdf"&gt;管路配件損頭&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;經過認養後&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;% pipefittings.m&lt;br /&gt;% Local losses at pipe fittings&lt;br /&gt;%&lt;br /&gt;while 1&lt;br /&gt;    k=menu('請輸入接合件之型式','驟然放大','驟然逸出','擴 大 管');&lt;br /&gt;    switch k&lt;br /&gt;        case 1&lt;br /&gt;            prompt = {'請輸入管路流量(m^3/s)[10]','請輸入入口管徑(m)[1]:'};&lt;br /&gt;            dlg_title = '您所選擇的是驟然放大';&lt;br /&gt;            num_lines = 1;&lt;br /&gt;            def = {'10','1'};&lt;br /&gt;            answer = inputdlg(prompt,dlg_title,num_lines,def);&lt;br /&gt;            Q=answer{1,1};d1=answer{2,1};&lt;br /&gt;            ke=Q./(pi*d1.^2/4)/(2*9.81);&lt;br /&gt;            HL=ke;&lt;br /&gt;        case 2&lt;br /&gt;            prompt = {'請輸入管路流量(m^3/s)[10]','請輸入入口管徑(m)[1]:'};&lt;br /&gt;            dlg_title = '您所選擇的是驟然逸出';&lt;br /&gt;            num_lines = 1;&lt;br /&gt;            def = {'10','1'};&lt;br /&gt;            answer = inputdlg(prompt,dlg_title,num_lines,def);&lt;br /&gt;            Q=answer{1,1};d1=answer{2,1};&lt;br /&gt;            ke=Q./(pi*d1.^2/4)/(2*9.81);&lt;br /&gt;            HL=ke/2;&lt;br /&gt;        case 3&lt;br /&gt;            prompt = {'請輸入管路流量(m^3/s)[10]','請輸入入口管徑(m)[1]:','請輸入出口管徑(m)[2]:'};&lt;br /&gt;            dlg_title = '您所選擇的是擴大管';&lt;br /&gt;            num_lines = 1;&lt;br /&gt;            def = {'10','1','2'};&lt;br /&gt;            answer = inputdlg(prompt,dlg_title,num_lines,def);&lt;br /&gt;            Q=answer{1,1};d1=answer{2,1};d2=answer{3,1};&lt;br /&gt;            ke=Q./(pi*d1.^2/4)/(2*9.81);&lt;br /&gt;            HL=(1-(d1./d2).^2).*ke;&lt;br /&gt;    end&lt;br /&gt;    figure('Position',[400 400 400 300],'Name','結果')&lt;br /&gt;    uicontrol('style','text','position',[160 200 80 80],'string','此接頭損失為')&lt;br /&gt;    uicontrol('style','text','position',[100 90 200 100],'string',HL)&lt;br /&gt;    result=questdlg('是否繼續執行？','程式執行詢問','Yes','No','No');&lt;br /&gt;    if strcmp(result,'No');&lt;br /&gt;        break&lt;br /&gt;    end&lt;br /&gt;end&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;或是點此&lt;a href="http://homepage.ntu.edu.tw/~r94428008/pipefittings1.html"&gt;網頁&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8244750955405541832-3956847630109182176?l=labmatpt.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://labmatpt.blogspot.com/feeds/3956847630109182176/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8244750955405541832&amp;postID=3956847630109182176' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8244750955405541832/posts/default/3956847630109182176'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8244750955405541832/posts/default/3956847630109182176'/><link rel='alternate' type='text/html' href='http://labmatpt.blogspot.com/2006/12/exam101.html' title='Exam10.1'/><author><name>Eric Wu</name><uri>http://www.blogger.com/profile/13535510143465079842</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://static.zooomr.com/images/946899_7f30bf0970.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8244750955405541832.post-8591652102366081102</id><published>2006-12-01T07:53:00.001-08:00</published><updated>2009-04-22T19:15:14.693-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Matlab作業'/><category scheme='http://www.blogger.com/atom/ns#' term='Matlab'/><title type='text'>Exam9.1</title><content type='html'>plot作圖時&lt;br /&gt;如果新的plot圖時，會將前一次的洗掉，做出第二次的繪圖，舉例如下&lt;br /&gt;&lt;a href="http://lh6.google.com/image/happyeric1120/RXBMezJS_sI/AAAAAAAAALQ/Ep-TGNQ5kuo/exam9-1.jpg?imgmax=512"&gt;第一次plot作圖&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;如果這時候在使用plot繪製另一個圖形的話，前一次的作圖就會消失&lt;br /&gt;&lt;a href="http://lh6.google.com/image/happyeric1120/RXBMezJS_sI/AAAAAAAAALQ/Ep-TGNQ5kuo/exam9-2.jpg?imgmax=512"&gt;第二次plot作圖&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;若是要兩個圖顯示在一個figure的話，則必須用hold on指令&lt;br /&gt;&lt;a href="http://lh6.google.com/image/happyeric1120/RXBMezJS_sI/AAAAAAAAALQ/Ep-TGNQ5kuo/exam9-3.jpg?imgmax=512"&gt;以hold on將兩張圖合併&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;如果要繪製三度空間的圖形的話，則必須要使用plot3的指令&lt;br /&gt;&lt;a href="http://lh6.google.com/image/happyeric1120/RXBMezJS_sI/AAAAAAAAALQ/Ep-TGNQ5kuo/exam9-6.jpg?imgmax=512"&gt;plot3作圖&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;line作圖&lt;br /&gt;若是以line的指令作圖時，連續使用line繪製不同函數時，則可以不必使用hold on的指令，即可繪製在同一個figure&lt;br /&gt;&lt;a href="http://lh6.google.com/image/happyeric1120/RXBMezJS_sI/AAAAAAAAALQ/Ep-TGNQ5kuo/exam9-4.jpg?imgmax=512"&gt;以line繪製兩個函數&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;雖然說line可以給予三個變數繪製三度空間的圖，但是實際上使用後會發現繪製仍為2D平面的圖，並且是前面兩個變數的圖型&lt;br /&gt;&lt;a href="http://lh6.google.com/image/happyeric1120/RXBMezJS_sI/AAAAAAAAALQ/Ep-TGNQ5kuo/exam9-5.jpg?imgmax=512"&gt;plot繪製三度空間圖&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;此時如果要會製成三度空間圖的話，則可以用plot3先繪製一點或是一個三度空間圖形&lt;br /&gt;&lt;a href="http://lh6.google.com/image/happyeric1120/RXBMezJS_sI/AAAAAAAAALQ/Ep-TGNQ5kuo/exam9-7.jpg?imgmax=512"&gt;以plot3繪製三度空間點&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;最後在重新輸入line的函數，即可再三度空間繪圖&lt;br /&gt;&lt;a href="http://lh6.google.com/image/happyeric1120/RXBMezJS_sI/AAAAAAAAALQ/Ep-TGNQ5kuo/exam9-8.jpg?imgmax=512"&gt;line指令三度空間繪圖&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8244750955405541832-8591652102366081102?l=labmatpt.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://labmatpt.blogspot.com/feeds/8591652102366081102/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8244750955405541832&amp;postID=8591652102366081102' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8244750955405541832/posts/default/8591652102366081102'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8244750955405541832/posts/default/8591652102366081102'/><link rel='alternate' type='text/html' href='http://labmatpt.blogspot.com/2006/12/exam91.html' title='Exam9.1'/><author><name>Eric Wu</name><uri>http://www.blogger.com/profile/13535510143465079842</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://static.zooomr.com/images/946899_7f30bf0970.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8244750955405541832.post-2975862802438016488</id><published>2006-11-26T06:32:00.000-08:00</published><updated>2009-04-22T19:15:14.694-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Matlab作業'/><category scheme='http://www.blogger.com/atom/ns#' term='Matlab'/><title type='text'>Exam8.1</title><content type='html'>第一題&lt;br /&gt;&gt;&gt; p=[133 0 122 0 0 1]   % p=133x^5+122x^3+1&lt;br /&gt;&lt;br /&gt;p =&lt;br /&gt;&lt;br /&gt;   133     0   122     0     0     1&lt;br /&gt;&lt;br /&gt;&gt;&gt; q=[2 0 100 0 1]   % q=2x^4+100x^2+1&lt;br /&gt;&lt;br /&gt;q =&lt;br /&gt;&lt;br /&gt;     2     0   100     0     1&lt;br /&gt;&lt;br /&gt;&gt;&gt; M=conv(p,q)&lt;br /&gt;&lt;br /&gt;M =&lt;br /&gt;&lt;br /&gt;  Columns 1 through 9 &lt;br /&gt;&lt;br /&gt;         266           0       13544           0       12333           2         122         100           0&lt;br /&gt;&lt;br /&gt;  Column 10 &lt;br /&gt;&lt;br /&gt;           1&lt;br /&gt;&lt;br /&gt;&gt;&gt; %  p, q 兩多項式的乘積為 266x^9+13544x^7+12333x^5+2x^4+122x^3+100x^2+1&lt;br /&gt;&lt;br /&gt;&lt;a href="http://static.zooomr.com/images/447708_22dca38df8.jpg"&gt;執行結果&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;第二題&lt;br /&gt;&gt;&gt; p=[100 23 1 45];x=magic(5)&lt;br /&gt;&lt;br /&gt;x =&lt;br /&gt;&lt;br /&gt;    17    24     1     8    15&lt;br /&gt;    23     5     7    14    16&lt;br /&gt;     4     6    13    20    22&lt;br /&gt;    10    12    19    21     3&lt;br /&gt;    11    18    25     2     9&lt;br /&gt;&lt;br /&gt;以magic(5),x=每個元素帶入f(x)的答案為&lt;br /&gt;&lt;br /&gt;&gt;&gt; f=polyval(p,x)&lt;br /&gt;&lt;br /&gt;f =&lt;br /&gt;&lt;br /&gt;      498009     1395717         169       52725      342735&lt;br /&gt;     1228935       13125       35479      278967      415549&lt;br /&gt;        6817       22479      223645      809265     1075999&lt;br /&gt;      102355      176169      694267      936309        2955&lt;br /&gt;      135939      590715     1576945         939       74817&lt;br /&gt;&lt;br /&gt;&lt;a href="http://static.zooomr.com/images/447709_de12a7fdd6.jpg"&gt;執行結果&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;第三題&lt;br /&gt;&gt;&gt; p=[133 0 122 0 0 1]   % p=133x^5+122x^3+1&lt;br /&gt;&lt;br /&gt;p =&lt;br /&gt;&lt;br /&gt;   133     0   122     0     0     1&lt;br /&gt;&lt;br /&gt;&gt;&gt; q=[2 0 100 0 1]   % q=2x^4+100x^2+1&lt;br /&gt;&lt;br /&gt;q =&lt;br /&gt;&lt;br /&gt;     2     0   100     0     1&lt;br /&gt;&lt;br /&gt;&gt;&gt; [s,r]=deconv(p,q)&lt;br /&gt;&lt;br /&gt;s =&lt;br /&gt;&lt;br /&gt;   66.5000         0&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;r =&lt;br /&gt;&lt;br /&gt;  1.0e+003 *&lt;br /&gt;&lt;br /&gt;         0         0   -6.5280         0   -0.0665    0.0010&lt;br /&gt;&lt;br /&gt;&gt;&gt; % 商數s=66.5x   餘數r=e^3*(-6.528)x^3+e^3*(-0.0665)x+e^3*(0.001)&lt;br /&gt;&lt;br /&gt;&lt;a href="http://static.zooomr.com/images/447710_d166b3b8be.jpg"&gt;執行結果&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;第四題&lt;br /&gt;&gt;&gt; p=[133 0 122 0 0 1]   % p=133x^5+122x^3+1&lt;br /&gt;&lt;br /&gt;p =&lt;br /&gt;&lt;br /&gt;   133     0   122     0     0     1&lt;br /&gt;&lt;br /&gt;&gt;&gt; roots(p)&lt;br /&gt;&lt;br /&gt;ans =&lt;br /&gt;&lt;br /&gt;  -0.0045 + 0.9578i&lt;br /&gt;  -0.0045 - 0.9578i&lt;br /&gt;   0.1039 + 0.1744i&lt;br /&gt;   0.1039 - 0.1744i&lt;br /&gt;  -0.1988          &lt;br /&gt;&lt;br /&gt;&gt;&gt; q=[2 0 100 0 1]   % q=2x^4+100x^2+1&lt;br /&gt;&lt;br /&gt;q =&lt;br /&gt;&lt;br /&gt;     2     0   100     0     1&lt;br /&gt;&lt;br /&gt;&gt;&gt; roots(q)&lt;br /&gt;&lt;br /&gt;ans =&lt;br /&gt;&lt;br /&gt;        0 + 7.0704i&lt;br /&gt;        0 - 7.0704i&lt;br /&gt;        0 + 0.1000i&lt;br /&gt;        0 - 0.1000i&lt;br /&gt;&lt;br /&gt;&lt;a href="http://static.zooomr.com/images/447711_fb7f97a3d6.jpg"&gt;執行結果&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;第五題&lt;br /&gt;&gt;&gt; x=[1:9]; y=[1210, 1866, 2301, 2564, 2724, 2881, 2879, 2915, 3010];&lt;br /&gt;&gt;&gt; p=polyfit(x,y,3)&lt;br /&gt;&lt;br /&gt;p =&lt;br /&gt;&lt;br /&gt;    6.3047 -134.4603  994.3540  350.9127&lt;br /&gt;&lt;br /&gt;&gt;&gt; f=@(a) (6.3047*a^3-134.4603*a^2+994.354*a+350.9127)&lt;br /&gt;&lt;br /&gt;f = &lt;br /&gt;&lt;br /&gt;    @(a) (6.3047*a^3-134.4603*a^2+994.354*a+350.9127)&lt;br /&gt;&lt;br /&gt;&gt;&gt; fplot(f,x)&lt;br /&gt;&gt;&gt; hold on&lt;br /&gt;&gt;&gt; plot(x,y)&lt;br /&gt;&gt;&gt;&lt;br /&gt;&lt;br /&gt;此題執行後，其polyfit的結果似乎只有x=1~2的時候比較符合，因為不管我限制多少範圍&lt;br /&gt;做出來的圖ｘ座標都是從１～２&lt;br /&gt;然後將其和原圖放在一起&lt;br /&gt;&lt;a href="http://static.zooomr.com/images/447712_49a58b7abe.jpg"&gt;執行結果&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8244750955405541832-2975862802438016488?l=labmatpt.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://labmatpt.blogspot.com/feeds/2975862802438016488/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8244750955405541832&amp;postID=2975862802438016488' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8244750955405541832/posts/default/2975862802438016488'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8244750955405541832/posts/default/2975862802438016488'/><link rel='alternate' type='text/html' href='http://labmatpt.blogspot.com/2006/11/exam81.html' title='Exam8.1'/><author><name>Eric Wu</name><uri>http://www.blogger.com/profile/13535510143465079842</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://static.zooomr.com/images/946899_7f30bf0970.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8244750955405541832.post-1281066395595773287</id><published>2006-11-23T08:54:00.000-08:00</published><updated>2009-04-22T19:15:14.694-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Matlab作業'/><category scheme='http://www.blogger.com/atom/ns#' term='Matlab'/><title type='text'>Exam7.1</title><content type='html'>第一題&lt;br /&gt;利用struct的方式撰寫&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;% student為整個struct的名稱   % 利用while的方式讓整個程式可以執行&lt;br /&gt;student=struct('Name',0,'Age',0,'Sex',0,'Email',0);&lt;br /&gt;ans='Y';&lt;br /&gt;h=input('請問是否執行此資料程式？(Y/N) ', 's');&lt;br /&gt;j=strcmp(upper(h),ans);&lt;br /&gt;while j==1&lt;br /&gt;    if student(1).Name==0                   %先判斷是否已經有存在資料庫&lt;br /&gt;    i=0;&lt;br /&gt;    else i=length(student);&lt;br /&gt;    end&lt;br /&gt;fprintf('目前資料庫有%d筆資料',i);&lt;br /&gt;e=input('請問是否新增？（Y/N）','s');&lt;br /&gt;f=strcmp(upper(e),ans);&lt;br /&gt;if f==0                                     %判別起始回答時是否因為尚未建立而要去修改&lt;br /&gt;    if i==0&lt;br /&gt;        disp('目前資料庫裡面沒有資料,請新增')&lt;br /&gt;    else&lt;br /&gt;        g=input('請問要修改哪一筆資料？');&lt;br /&gt;        i=g;&lt;br /&gt;    end&lt;br /&gt;    a=input('請輸入學生姓名（Name）　','s');&lt;br /&gt;    b=input('請輸入學生年齡（Age）　','s');&lt;br /&gt;    c=input('請輸入學生性別（Sex）　','s');&lt;br /&gt;    d=input('請輸入學生電子信箱（Email）　','s');&lt;br /&gt;    student(i)=struct('Name',{a},'Age',{b},'Sex',{c},'Email',{d});&lt;br /&gt;elseif f==1&lt;br /&gt;    i=i+1;&lt;br /&gt;    a=input('請輸入學生姓名（Name）　','s');&lt;br /&gt;    b=input('請輸入學生年齡（Age）　','s');&lt;br /&gt;    c=input('請輸入學生性別（Sex）　','s');&lt;br /&gt;    d=input('請輸入學生電子信箱（Email）　','s');&lt;br /&gt;    student(i)=struct('Name',{a},'Age',{b},'Sex',{c},'Email',{d});&lt;br /&gt;end&lt;br /&gt;h=input('請問是否繼續執行此程式？(Y/N) ', 's');&lt;br /&gt;j=strcmp(upper(h),ans);                    %決定是否要在繼續增加或修改資料&lt;br /&gt;end &lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;a href="http://lh6.google.com/image/happyeric1120/RWZmCsZVABI/AAAAAAAAAJs/xFERqGHuEkU/Exam7-1-1.jpg?imgmax=512"&gt;執行結果1&lt;/a&gt;&lt;br /&gt;&lt;a href="http://lh6.google.com/image/happyeric1120/RWZmCa8WABI/AAAAAAAAAJk/glwlxVfKn_I/Exam7-1-2.jpg?imgmax=512"&gt;執行結果2&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;第二題&lt;br /&gt;利用Menu和Switch的方式撰寫&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;clear all&lt;br /&gt;close all&lt;br /&gt;k=menu('請選擇你喜歡的品牌','Apple','Microsoft','IBM','Acer','Asus');&lt;br /&gt;switch k&lt;br /&gt;    case 1&lt;br /&gt;        disp('活著其實很好,在吃一口蘋果')&lt;br /&gt;    case 2&lt;br /&gt;        disp('準備迎接windows vista')&lt;br /&gt;    case 3&lt;br /&gt;        disp('無敵黑金剛,金剛不壞之身')&lt;br /&gt;    case 4&lt;br /&gt;        disp('為王建名加油')&lt;br /&gt;    case 5&lt;br /&gt;        disp('華碩品質,以卵擊石')&lt;br /&gt;end&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;a href="http://lh6.google.com/image/happyeric1120/RWZmCwkUABI/AAAAAAAAAJ0/GlzyIjLn67Y/Exma7-2-1.jpg?imgmax=512"&gt;程式執行圖&lt;/a&gt;&lt;br /&gt;&lt;a href="http://lh6.google.com/image/happyeric1120/RWZmCzcYABI/AAAAAAAAAJ8/b3KIv7N3obk/Exam7-2-2.jpg?imgmax=512"&gt;執行結果圖&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;第四題&lt;br /&gt;&lt;a href="http://lh5.google.com/image/happyeric1120/RWZmB71fABI/AAAAAAAAAJM/qY88Jj1Fukc/Exam7-4-1.jpg?imgmax=576"&gt;原始資料檔案&lt;/a&gt;&lt;br /&gt;在command window下利用xlsread和xlswrite的方式修改資料&lt;br /&gt;&gt;&gt; [num text raw]=xlsread('D:/grade.xls');&lt;br /&gt;&gt;&gt; raw(2,:)&lt;br /&gt;&lt;br /&gt;ans = &lt;br /&gt;&lt;br /&gt;    'Eric'    [1]    [180]    [110]&lt;br /&gt;&lt;br /&gt;&gt;&gt; raw(2,:)={'Eric',1,178,100}&lt;br /&gt;&lt;br /&gt;raw = &lt;br /&gt;&lt;br /&gt;    'Name'     'Sex'    'height'    'weight'&lt;br /&gt;    'Eric'     [  1]    [   178]    [   100]&lt;br /&gt;    'Jane'     [  0]    [   160]    [    50]&lt;br /&gt;    'Jolin'    [  0]    [   158]    [    45]&lt;br /&gt;    'David'    [  1]    [   175]    [    54]&lt;br /&gt;&lt;br /&gt;&gt;&gt; xlswrite('D:\grade.xls',raw)&lt;br /&gt;&lt;a href="http://lh5.google.com/image/happyeric1120/RWZmCWRBABI/AAAAAAAAAJc/X1PaHG9hJIA/Exam7-4-p.jpg?imgmax=512"&gt;程式執行圖&lt;/a&gt;&lt;br /&gt;&lt;a href="http://lh3.google.com/image/happyeric1120/RWZmCOrcABI/AAAAAAAAAJU/sSvVH5_CvEA/Exam7-4-2.jpg?imgmax=512"&gt;執行結果圖&lt;/a&gt;&lt;br /&gt;確實在exel裡面修改了資料&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8244750955405541832-1281066395595773287?l=labmatpt.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://labmatpt.blogspot.com/feeds/1281066395595773287/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8244750955405541832&amp;postID=1281066395595773287' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8244750955405541832/posts/default/1281066395595773287'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8244750955405541832/posts/default/1281066395595773287'/><link rel='alternate' type='text/html' href='http://labmatpt.blogspot.com/2006/11/exam71.html' title='Exam7.1'/><author><name>Eric Wu</name><uri>http://www.blogger.com/profile/13535510143465079842</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://static.zooomr.com/images/946899_7f30bf0970.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8244750955405541832.post-8220377372365315994</id><published>2006-11-19T04:14:00.000-08:00</published><updated>2009-04-22T19:15:14.694-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Matlab作業'/><category scheme='http://www.blogger.com/atom/ns#' term='Matlab'/><title type='text'>Exam6.1</title><content type='html'>第一題&lt;br /&gt;自由落體：0~30s的時間內位置的高度的變化&lt;br /&gt;&gt;&gt; t=(0:0.2:30);&lt;br /&gt;&gt;&gt; height=freebody(t);&lt;br /&gt;&gt;&gt; plot(t,height)&lt;br /&gt;&gt;&gt; xlabel('time(s)');ylabel('height(cm)');&lt;br /&gt;&gt;&gt; height&lt;br /&gt;&lt;a href="http://lh6.google.com/image/happyeric1120/RWCJ93ZqABI/AAAAAAAAABQ/Wh2-mrv70mQ/Exam6_1.jpg?imgmax=640"&gt;結果圖1&lt;/a&gt; &lt;a href="http://lh5.google.com/image/happyeric1120/RWCJ3KcUABI/AAAAAAAAABI/UjthtHq7twM/Exam6_1-2.jpg?imgmax=640"&gt;結果圖2&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;第二題&lt;br /&gt;以半徑３和５並以圓心(0,0) and (10, 0) cm作圖&lt;br /&gt;function drawcircles(r) % 主函數&lt;br /&gt;% Draw circles with radii of r.&lt;br /&gt;global MAXR i;&lt;br /&gt;n=length(r);&lt;br /&gt;MAXR=max(r);&lt;br /&gt;hold on;&lt;br /&gt;for i=1:n,&lt;br /&gt;   [X,Y]=circ(r(i));&lt;br /&gt;   plot(X,Y);&lt;br /&gt;end&lt;br /&gt;hold off;&lt;br /&gt;axis equal;&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;function [x,y]=circ(rr) %次函數&lt;br /&gt;% Calculate the points of a circle.&lt;br /&gt;   [xx,yy]=randxy;&lt;br /&gt;   theta=linspace(0,2*pi,60);&lt;br /&gt;   x=xx+rr*cos(theta);&lt;br /&gt;   y=yy+rr*sin(theta);&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;function [xx,yy]=randxy %次函數&lt;br /&gt;global MAXR i&lt;br /&gt;% locate the position of the center.&lt;br /&gt;k=[0 10];l=[0 0];&lt;br /&gt;xx=k(i);&lt;br /&gt;yy=l(i);&lt;br /&gt;end&lt;br /&gt;&lt;a href="http://lh4.google.com/image/happyeric1120/RWCKBNpPABI/AAAAAAAAAB4/mEJrb0qat4Q/Exam6_2.jpg?imgmax=512"&gt;作圖&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;第三題&lt;br /&gt;以=3, b=5, 並且給予 y=[12 15 20] 然後以匿名函數作x²/a²+y²/b²&lt;br /&gt;最後作圖在x=[3 4 5]的範圍下（應該是這樣吧，題意不是很懂）&lt;br /&gt;a=3;b=5;&lt;br /&gt;y=[12 15 20];&lt;br /&gt;fplot(@(x) ((x.^2)./a^2+(y.^2)./b^2),[3 5])&lt;br /&gt;&lt;a href="http://lh5.google.com/image/happyeric1120/RWCKAjP2ABI/AAAAAAAAABw/KGsksEJPWrw/Exam6_3.jpg?imgmax=512"&gt;結果圖&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;第四題&lt;br /&gt;敘述檔為&lt;br /&gt;Do=input('請輸入圓柱體的外半徑? ');&lt;br /&gt;Di=input('請輸入圓柱體的內半徑? ');&lt;br /&gt;height=input('請輸入圓柱體的高? ');&lt;br /&gt;[a,b,c]=cylin(Do,Di,height);&lt;br /&gt;fprintf('圓柱體的體積為%f,上表面積%f,側面面積%f\n',a,b,c)&lt;br /&gt;&lt;br /&gt;呼叫function  cylin&lt;br /&gt;% function cylin %&lt;br /&gt;function [volume,upper_face,side]=cylin(Do,Di,height);&lt;br /&gt;volume=(Do./2-Di./2).^2*pi.*height; %體積&lt;br /&gt;upper_face=pi*(Do./2-Di./2).^2;   %上表面積&lt;br /&gt;side=2*pi*(Do./2-Di./2).*height;   %側面面積&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh4.google.com/image/happyeric1120/RWCJ-pUZABI/AAAAAAAAABg/VER7rFDVf-M/Exam6_4-2.jpg"&gt;結果在這&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;第五題&lt;br /&gt;將程式改成呼叫外部的函數，並且設立global variable，即可將polyx移到原本的函數外面&lt;br /&gt;而非原先的巢狀函數&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;function [rr_array]=nest_fun1(x,a)&lt;br /&gt;%function to find sets of polynormials.&lt;br /&gt;% a: set of constants, [A B C]&lt;br /&gt;% x: variables in array&lt;br /&gt;% Example: rr=nest_fun(2:10,[1 2 4;2 4 8])&lt;br /&gt;n=size(a);&lt;br /&gt;global A B C x&lt;br /&gt;for i=1:n&lt;br /&gt;  A=a(i,1);B=a(i,2);C=a(i,3);&lt;br /&gt;  rr_array{1,i}=['A=',num2str(A),', B=',...&lt;br /&gt;      num2str(B),', C=',num2str(C)];&lt;br /&gt;  rr_array{2,i}=polyx(x);&lt;br /&gt;end&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;function [r]=polyx(xx)&lt;br /&gt;    global A B C x&lt;br /&gt;    r=A.*x.^2 + B.*x +C;&lt;br /&gt;end&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh3.google.com/image/happyeric1120/RWCJ-bvZABI/AAAAAAAAABY/5iGSWfbJ5kg/Exam6_5.jpg?imgmax=512"&gt;結果在這&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;第六題&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;function pillar(Do,Di,height)&lt;br /&gt;% Find the volume of a hollow pillar&lt;br /&gt;% ro,ri:outside &amp; inside diameters&lt;br /&gt;if nargin&lt;1 &lt;br /&gt;   height=1; &lt;br /&gt;   Di=0;&lt;br /&gt;   Do=1;&lt;br /&gt;   volume=abs(Do.^2-Di.^2).*height*pi/4;&lt;br /&gt;   fprintf('體積為%f（預設高為%d內面積%d外面積%d)\n',volume,height,Di,Do);&lt;br /&gt;end&lt;br /&gt;if nargin&lt;2 &amp; nargin&gt;0&lt;br /&gt;    height=1;&lt;br /&gt;    Di=0;&lt;br /&gt;    volume=abs(Do.^2-Di.^2).*height*pi/4;&lt;br /&gt;    fprintf('體積為%f（預設高為%d內面積%d)\n',volume,height,Di);&lt;br /&gt;end&lt;br /&gt;if nargin&lt;3 &amp; nargin&gt;1&lt;br /&gt;    height=1;&lt;br /&gt;    volume=abs(Do.^2-Di.^2).*height*pi/4;&lt;br /&gt;    fprintf('體積為%f（預設高為%d)\n',volume,height);&lt;br /&gt;end&lt;br /&gt;if nargin==3&lt;br /&gt;    volume=abs(Do.^2-Di.^2).*height*pi/4;&lt;br /&gt;    fprintf('體積為%f\n',volume);&lt;br /&gt;end&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh6.google.com/image/happyeric1120/RWCKBTy0ABI/AAAAAAAAACA/Azx3f_KW8to/Exam6_6.jpg"&gt;結果在這&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8244750955405541832-8220377372365315994?l=labmatpt.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://labmatpt.blogspot.com/feeds/8220377372365315994/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8244750955405541832&amp;postID=8220377372365315994' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8244750955405541832/posts/default/8220377372365315994'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8244750955405541832/posts/default/8220377372365315994'/><link rel='alternate' type='text/html' href='http://labmatpt.blogspot.com/2006/11/exam61.html' title='Exam6.1'/><author><name>Eric Wu</name><uri>http://www.blogger.com/profile/13535510143465079842</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://static.zooomr.com/images/946899_7f30bf0970.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8244750955405541832.post-1393152471715082131</id><published>2006-11-13T02:41:00.000-08:00</published><updated>2009-04-22T19:17:05.129-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Labview-訊號分析'/><category scheme='http://www.blogger.com/atom/ns#' term='Labview'/><title type='text'>Labview的濾波功能</title><content type='html'>　　話說現在的labview功能越來越強大了，&lt;br /&gt;如果有看過Matlab簡易濾波器的話，看到這篇&lt;br /&gt;之後應該會很想扁人。&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://static.flickr.com/105/296299435_64fe158405_o.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px;" src="http://static.flickr.com/105/296299435_64fe158405_o.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;　　看不清處嗎？那就&lt;a href="http://static.flickr.com/105/296299435_64fe158405_o_d.jpg"&gt;按這邊下載&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;　　沒錯，就是這樣，開檔，濾波，畫圖。&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8244750955405541832-1393152471715082131?l=labmatpt.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://labmatpt.blogspot.com/feeds/1393152471715082131/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8244750955405541832&amp;postID=1393152471715082131' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8244750955405541832/posts/default/1393152471715082131'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8244750955405541832/posts/default/1393152471715082131'/><link rel='alternate' type='text/html' href='http://labmatpt.blogspot.com/2006/11/labview.html' title='Labview的濾波功能'/><author><name>Eric Wu</name><uri>http://www.blogger.com/profile/13535510143465079842</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://static.zooomr.com/images/946899_7f30bf0970.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8244750955405541832.post-5074324273671286497</id><published>2006-11-13T02:01:00.000-08:00</published><updated>2009-04-22T19:15:14.695-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Matlab訊號分析'/><category scheme='http://www.blogger.com/atom/ns#' term='Matlab'/><title type='text'>Matlab簡易的濾波功能</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://static.zooomr.com/images/576213_07109d3444.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px;" src="http://static.zooomr.com/images/576213_07109d3444.jpg" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;　　首先我必須先聲明的是，我對於濾波的真正原理是&lt;br /&gt;一知半解，但是他在我們物理治療中的訊號分析裡面，&lt;br /&gt;卻是扮演著重要的角色。&lt;br /&gt;&lt;br /&gt;　　什麼事butterworth的濾波，說真的我真的不知道，&lt;br /&gt;反正數位濾波器就以這樣設計就好。&lt;br /&gt;&lt;br /&gt;　　看到這裡如果你非常想打我的話，元智大學最佳化&lt;br /&gt;實驗室有份文件大家可以參考看看。&lt;a href="http://designer.mech.yzu.edu.tw/article/articles/technical/file/(2003-01-05)%20%C2o%AAi%A7%DE%B3N%C2%B2%A4%B6.pdf"&gt;按我看看&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;　　言歸正傳，反正濾波器有高通，低通，帶通，帶拒&lt;br /&gt;四大類，於是乎我利用了matlab裡面的butter函數，以&lt;br /&gt;及filter設計了這個含有四種功能的濾波器function，&lt;br /&gt;內容很簡單，只不過利用了switch的方式選擇。&lt;br /&gt;&lt;a href="http://four.fsphost.com/happyeric1120/filter.html"&gt;點我看看這個簡易的濾波功能&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;　　如果有興趣試試看的話，這裡提供了一筆資料可以&lt;br /&gt;試試看&lt;a href="http://four.fsphost.com/happyeric1120/Try.txt"&gt;請以右鍵點選下載&lt;/a&gt;。&lt;br /&gt;&lt;br /&gt;　　這分資料裡面，第一列跟最後一列分別都是force的&lt;br /&gt;資料，中間幾個才是肌電圖，其取樣頻率為1000/s。&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8244750955405541832-5074324273671286497?l=labmatpt.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://labmatpt.blogspot.com/feeds/5074324273671286497/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8244750955405541832&amp;postID=5074324273671286497' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8244750955405541832/posts/default/5074324273671286497'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8244750955405541832/posts/default/5074324273671286497'/><link rel='alternate' type='text/html' href='http://labmatpt.blogspot.com/2006/11/blog-post.html' title='Matlab簡易的濾波功能'/><author><name>Eric Wu</name><uri>http://www.blogger.com/profile/13535510143465079842</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://static.zooomr.com/images/946899_7f30bf0970.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8244750955405541832.post-6127713682789253467</id><published>2006-11-12T23:41:00.000-08:00</published><updated>2009-04-22T19:15:14.695-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Matlab作業'/><category scheme='http://www.blogger.com/atom/ns#' term='Matlab'/><title type='text'>Exam5.1答案</title><content type='html'>作業5.1  吳堉光&lt;br /&gt;第一題：&lt;br /&gt;利用陣列轉換函數（cat)依所指定的方向合併（concatenates）陣列A,B&lt;br /&gt;程式碼：&lt;br /&gt;A=magic(3);B=rand(3,3)*10;&lt;br /&gt;cat(3,A,B)&lt;br /&gt;或是直接&lt;br /&gt;cat(3,magic(3),rand(3,3)*10)&lt;br /&gt;&lt;a href="http://static.flickr.com/117/296219102_fe28cadd3f_o.png"&gt;執行結果&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;第二題：&lt;br /&gt;將兩個陣列以水平或是垂直的方式合併，或是利用不同page的方式合併&lt;br /&gt;水平合併的方式可以有兩種&lt;br /&gt;A=[45 89 99; 12 34 55];B=[15 25 45; 65 50 30];&lt;br /&gt;[A,B]&lt;br /&gt;cat(2,A,B)&lt;br /&gt;即可得到水平合併，&lt;a href="http://static.flickr.com/111/296227725_734f053fc3_o.png"&gt;點我看結果&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;垂直合併的方式也有兩種&lt;br /&gt;A=[45 89 99; 12 34 55];B=[15 25 45; 65 50 30];&lt;br /&gt;[A;B]&lt;br /&gt;cat(1,A,B)&lt;br /&gt;即可得到垂直合併，&lt;a href="http://static.flickr.com/104/296227702_01bb1a499d_o.png"&gt;點我看結果&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;以不同page儲存的方式則要利用cat函數&lt;br /&gt;A=[45 89 99; 12 34 55];B=[15 25 45; 65 50 30];&lt;br /&gt;cat(3,A,B)&lt;br /&gt;即可得到以不同page儲存，&lt;a href="http://static.flickr.com/110/296227712_f8799f4aa6_o.png"&gt;點我看結果&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;第三題&lt;br /&gt;將A,B兩陣列以指定的位置放入page中&lt;br /&gt;方式一&lt;br /&gt; M(:,:,1)=A; M(:,:,2)=B; M(:,:,3)=A; M(:,:,4)=B;&lt;br /&gt;&lt;a href="http://static.flickr.com/117/296235768_3acdf7af15_o.png"&gt;執行結果&lt;/a&gt;&lt;br /&gt;方式二&lt;br /&gt;如果今天有大量的陣列放入而且是有規則性的放入的話，可以以for迴圈來執行&lt;br /&gt;A=[45 89 99; 12 34 55];B=[15 25 45; 65 50 30];&lt;br /&gt;for i=1:2&lt;br /&gt;    M(:,:,2*i-1)=A;&lt;br /&gt;    M(:,:,2*i)=B;&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;第四題&lt;br /&gt;依題意看起來應該是要形成一個3 x 2的cell array&lt;br /&gt;所以可以直接利用cell array的{}的方式&lt;br /&gt;c={'Eric' [90 100]; 'Peter' [35 60]; 'Jan' [77 67]}&lt;br /&gt;所形成的結果以cellplot的方式來表示&lt;br /&gt;&lt;a href="http://static.flickr.com/109/296245504_fceb8b1ad8_o.png"&gt;結果在這裡&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;第五題&lt;br /&gt;將資料建構成一個struct的陣列&lt;br /&gt;程式如下&lt;br /&gt;patient(1).name='Philip';&lt;br /&gt;patient(2).name='Peter';&lt;br /&gt;patient(3).name='Roberts';&lt;br /&gt;patient(4).name='Roe';&lt;br /&gt;patient(1).Age=35;&lt;br /&gt;patient(2).Age=45;&lt;br /&gt;patient(3).Age=55;&lt;br /&gt;patient(4).Age=60;&lt;br /&gt;patient(1).salary=50000;&lt;br /&gt;patient(2).salary=40000;&lt;br /&gt;patient(3).salary=80000;&lt;br /&gt;patient(4).salary=120000;&lt;br /&gt;即可以建構出struct的陣列&lt;br /&gt;不過這樣一個一個key實在挺累人的&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8244750955405541832-6127713682789253467?l=labmatpt.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://labmatpt.blogspot.com/feeds/6127713682789253467/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8244750955405541832&amp;postID=6127713682789253467' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8244750955405541832/posts/default/6127713682789253467'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8244750955405541832/posts/default/6127713682789253467'/><link rel='alternate' type='text/html' href='http://labmatpt.blogspot.com/2006/11/exam51.html' title='Exam5.1答案'/><author><name>Eric Wu</name><uri>http://www.blogger.com/profile/13535510143465079842</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://static.zooomr.com/images/946899_7f30bf0970.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8244750955405541832.post-6916864443629458633</id><published>2006-11-03T08:01:00.000-08:00</published><updated>2009-04-22T19:15:14.695-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Matlab作業'/><category scheme='http://www.blogger.com/atom/ns#' term='Matlab'/><title type='text'>Exam4.1答案</title><content type='html'>第一題：&lt;br /&gt;% 求兩個向量的外積的單位向量&lt;br /&gt;% A=3i +5j +10k   B=5i -6j +2k&lt;br /&gt;A=[3 5 10];B=[5 -6 2];&lt;br /&gt;m=cross(A,B);&lt;br /&gt;r=sqrt(m*m');&lt;br /&gt;u=m/r&lt;br /&gt;&lt;br /&gt;第二題&lt;br /&gt;由於在計算平均值，中位數時其&lt;a href="http://static.flickr.com/113/287777207_5448196a2c_o.jpg"&gt;syntax&lt;/a&gt;中（A,dim）當dim不寫或是1時，所計算的為每一行的平均值及中位數，而當填入為2時則為計算列&lt;br /&gt;&lt;a href="http://static.flickr.com/102/287801699_759f9eff44_o.png"&gt;Mean&amp;Median&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;而std其&lt;a href="http://static.flickr.com/110/287801766_8d5f93b24c_o.png"&gt;syntax&lt;/a&gt;&lt;br /&gt;flag=0時為sample的標準差，而flag=1為population&lt;br /&gt;&lt;a href="http://static.flickr.com/111/287801788_64860bf135_o.png"&gt;STD&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;第三題&lt;br /&gt;根據老師上所講的尤拉公式，在command windows下證明&lt;br /&gt;&lt;a href="http://static.flickr.com/118/287801682_917a766853_o.png"&gt;證明結果&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;第四題&lt;br /&gt;計算複數所成的陣列的絕對值,夾角,實部,虛部&lt;br /&gt;&lt;a href="http://static.flickr.com/121/287801721_7622980810_o.png"&gt;絕對值,夾角&lt;/a&gt;&lt;br /&gt;&lt;a href="http://static.flickr.com/113/287801736_b7f0ac424f_o.png"&gt;實部,虛部&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8244750955405541832-6916864443629458633?l=labmatpt.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://labmatpt.blogspot.com/feeds/6916864443629458633/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8244750955405541832&amp;postID=6916864443629458633' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8244750955405541832/posts/default/6916864443629458633'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8244750955405541832/posts/default/6916864443629458633'/><link rel='alternate' type='text/html' href='http://labmatpt.blogspot.com/2006/11/exam41.html' title='Exam4.1答案'/><author><name>Eric Wu</name><uri>http://www.blogger.com/profile/13535510143465079842</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://static.zooomr.com/images/946899_7f30bf0970.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8244750955405541832.post-2198692557987795054</id><published>2006-11-03T06:21:00.001-08:00</published><updated>2009-04-22T19:15:14.695-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Matlab作業'/><category scheme='http://www.blogger.com/atom/ns#' term='Matlab'/><title type='text'>Exam3.1答案</title><content type='html'>第一題：&lt;br /&gt;個人認為減少迴圈加快執行的方式為&lt;br /&gt;n=(1:50).^2;&lt;br /&gt;reshape(n,5,10)&lt;br /&gt;這樣可以得到相同的答案&lt;br /&gt;&lt;br /&gt;第二題&lt;br /&gt;A=magic(5);&lt;br /&gt;for n=1:5&lt;br /&gt;    for m=1:5&lt;br /&gt;        if A(n,m)&gt;10&lt;br /&gt;            A(n,m)=NaN;&lt;br /&gt;        end&lt;br /&gt;    end&lt;br /&gt;end&lt;br /&gt;即利用迴圈一一的去檢查是否符合條件，符合的就替換成NaN&lt;br /&gt;&lt;br /&gt;第三題&lt;br /&gt;A=magic(5);&lt;br /&gt;for n=1:5&lt;br /&gt;    for m=1:5&lt;br /&gt;        if isprime(A(n,m))&lt;br /&gt;            A(n,m)=0;&lt;br /&gt;        end&lt;br /&gt;    end&lt;br /&gt;end&lt;br /&gt;和第二題一樣，以迴圈的方式去檢測&lt;br /&gt;&lt;br /&gt;第四題&lt;br /&gt;將no_of_draw改成[100:100:1000]會發現到結果和no_of_draw的答案差不多，也就是只會執行100次，我們可以利用&lt;br /&gt;a=100;b=(100:100:1000);&lt;br /&gt;c=(a==b)&lt;br /&gt;c=[1 0 0 0 0 0 0 0 0 0]&lt;br /&gt;我想應該是這樣，所以程式裡面的條件&lt;br /&gt;while n&lt;=no_of_draw&lt;br /&gt;因為第一個元素不符條件了，所以程式結束。&lt;br /&gt;如果要一次全部呈現可以改成如下程式&lt;br /&gt;function [B]=draw_number(no_of_draw)&lt;br /&gt;% draw ball numbers within ndraw times&lt;br /&gt;%&lt;br /&gt;for i=1:length(no_of_draw)&lt;br /&gt;    C_i=zeros(1,5);&lt;br /&gt;    n=1;&lt;br /&gt;    while n&lt;=no_of_draw(1,i)&lt;br /&gt;        ball=fix(rand*10);&lt;br /&gt;        if ball&lt;2&lt;br /&gt;            C_i(1)=C_i(1)+1;&lt;br /&gt;        elseif ball&lt;4,&lt;br /&gt;            C_i(2)=C_i(2)+1;&lt;br /&gt;        elseif ball&lt;6,&lt;br /&gt;            C_i(3)=C_i(3)+1;&lt;br /&gt;        elseif ball&lt;8,&lt;br /&gt;            C_i(4)=C_i(4)+1;&lt;br /&gt;        else&lt;br /&gt;            C_i(5)=C_i(5)+1;&lt;br /&gt;        end&lt;br /&gt;        n=n+1;&lt;br /&gt;    end&lt;br /&gt;    B(i,1:5)=C_i;&lt;br /&gt;end&lt;br /&gt;第五題 &lt;br /&gt;clear all&lt;br /&gt;k=input('Please input a number to compare? (0-100)');&lt;br /&gt;l=input('Please input the total number to do?');&lt;br /&gt;a=round(k);&lt;br /&gt;n=0;&lt;br /&gt;num=0;&lt;br /&gt;answer=0;&lt;br /&gt;if a&gt;=0 &amp; a&lt;=100&lt;br /&gt;    for i=1:l&lt;br /&gt;        while round(rand*100)~=a&lt;br /&gt;            n=n+1;&lt;br /&gt;        end&lt;br /&gt;        num=num+1/n;&lt;br /&gt;    end&lt;br /&gt;    answer=num/100;&lt;br /&gt;    fprintf('%d%s%d%s%f\n',l,'次抽中和',a,'相同的號碼機率為千分之',answer*1000);&lt;br /&gt;else&lt;br /&gt;    fprintf('%s\n','你所輸入的號碼範圍號碼不對')&lt;br /&gt;end&lt;br /&gt;可以同時輸入號碼跟比對次數&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8244750955405541832-2198692557987795054?l=labmatpt.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://labmatpt.blogspot.com/feeds/2198692557987795054/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8244750955405541832&amp;postID=2198692557987795054' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8244750955405541832/posts/default/2198692557987795054'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8244750955405541832/posts/default/2198692557987795054'/><link rel='alternate' type='text/html' href='http://labmatpt.blogspot.com/2006/11/exam31.html' title='Exam3.1答案'/><author><name>Eric Wu</name><uri>http://www.blogger.com/profile/13535510143465079842</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://static.zooomr.com/images/946899_7f30bf0970.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8244750955405541832.post-4579936863628384292</id><published>2006-11-02T18:45:00.000-08:00</published><updated>2009-04-22T19:15:14.696-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Matlab訊號分析'/><category scheme='http://www.blogger.com/atom/ns#' term='Matlab'/><title type='text'>EMG之Onset時間點</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://static.zooomr.com/images/576215_8f3a634dea.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px;" src="http://static.zooomr.com/images/576215_8f3a634dea.jpg" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;　　在我們物理治療研究中，不管是研究肌械延遲（electrical mechanical delay），或是病人對於肌肉張力，運動員之力量發展，都需要靠肌電訊號來告訴我們，其中有一個最重要的部份就是，去知道該塊肌肉什麼時候開始動作。&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://static.flickr.com/103/287360541_65510d6719_o.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px;" src="http://static.flickr.com/103/287360541_65510d6719_o.jpg" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://four.fsphost.com/happyeric1120/B934080390004.txt"&gt;下載檔案（點右鍵下載此檔案）&lt;/a&gt;&lt;br /&gt;　　其中，前三條分別為我們下肢小腿後側肌群。最後一條為實驗時我用數位類比轉換卡發出的類比訊號給儀器接收，以作為同步訊號。不過目前先不將同步訊號考慮在內。&lt;br /&gt;&lt;br /&gt;　　我們必須要去找到開始的時間點，此時就要利用到統計學的概念，兩個母群若是差兩個標準差的話，就可以稱作是兩個不同的母群（否決虛無假設）。&lt;br /&gt;不過很不幸的是，通常訊號可能沒有那麼漂亮，或是雜訊很多，可能需要到三個甚至四個標準差以上。&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://static.flickr.com/114/287364740_4cefc701b0_o.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px;" src="http://static.flickr.com/114/287364740_4cefc701b0_o.jpg" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://static.flickr.com/114/287364740_4cefc701b0_o_d.jpg"&gt;點此下載看上圖&lt;/a&gt;&lt;br /&gt;&lt;a href="http://homepage.ntu.edu.tw/~r94428008/firingOnset.txt"&gt;程式檔案&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;　　這個程式就是靠while+break所寫成的，當找到符合條件的點後，就結束迴圈，並且輸出結果。&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://static.flickr.com/115/287360574_6982077063_o.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px;" src="http://static.flickr.com/115/287360574_6982077063_o.jpg" border="0" alt="" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8244750955405541832-4579936863628384292?l=labmatpt.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://labmatpt.blogspot.com/feeds/4579936863628384292/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8244750955405541832&amp;postID=4579936863628384292' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8244750955405541832/posts/default/4579936863628384292'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8244750955405541832/posts/default/4579936863628384292'/><link rel='alternate' type='text/html' href='http://labmatpt.blogspot.com/2006/11/emgonset.html' title='EMG之Onset時間點'/><author><name>Eric Wu</name><uri>http://www.blogger.com/profile/13535510143465079842</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://static.zooomr.com/images/946899_7f30bf0970.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8244750955405541832.post-136646896768978055</id><published>2006-10-29T05:01:00.000-08:00</published><updated>2009-04-22T19:15:14.696-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Matlab上課筆記'/><category scheme='http://www.blogger.com/atom/ns#' term='Matlab'/><title type='text'>上課筆記</title><content type='html'>　　之後都會上傳我的上課筆記，由於是邊上課邊用&lt;br /&gt;writely寫的，所以並不會很有組織的一一紀錄上課&lt;br /&gt;所教的東西，很多都是零碎的片段，或是一些小技巧&lt;br /&gt;。&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8244750955405541832-136646896768978055?l=labmatpt.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://labmatpt.blogspot.com/feeds/136646896768978055/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8244750955405541832&amp;postID=136646896768978055' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8244750955405541832/posts/default/136646896768978055'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8244750955405541832/posts/default/136646896768978055'/><link rel='alternate' type='text/html' href='http://labmatpt.blogspot.com/2006/10/blog-post_29.html' title='上課筆記'/><author><name>Eric Wu</name><uri>http://www.blogger.com/profile/13535510143465079842</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://static.zooomr.com/images/946899_7f30bf0970.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8244750955405541832.post-2950796449103783034</id><published>2006-10-29T04:58:00.000-08:00</published><updated>2009-04-22T19:15:14.696-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Matlab上課筆記'/><category scheme='http://www.blogger.com/atom/ns#' term='Matlab'/><title type='text'>Matlab上課筆記2006-10-27</title><content type='html'>　　switch的用法，以及介紹如何在cell資料型態運用，特別是&lt;br /&gt;利用page的方式，讓整個array多了三度的感覺&lt;br /&gt;&lt;br /&gt;&lt;a href="http://docs.google.com/View?revision=_latest&amp;docID=d264rx2_12d3gd52"&gt;按我看上課筆記&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8244750955405541832-2950796449103783034?l=labmatpt.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://labmatpt.blogspot.com/feeds/2950796449103783034/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8244750955405541832&amp;postID=2950796449103783034' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8244750955405541832/posts/default/2950796449103783034'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8244750955405541832/posts/default/2950796449103783034'/><link rel='alternate' type='text/html' href='http://labmatpt.blogspot.com/2006/10/matlab2006-10-27.html' title='Matlab上課筆記2006-10-27'/><author><name>Eric Wu</name><uri>http://www.blogger.com/profile/13535510143465079842</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://static.zooomr.com/images/946899_7f30bf0970.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8244750955405541832.post-348666941165214249</id><published>2006-10-29T04:54:00.000-08:00</published><updated>2009-04-22T19:15:14.697-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Matlab上課筆記'/><category scheme='http://www.blogger.com/atom/ns#' term='Matlab'/><title type='text'>Matlab上課筆記2006-10-20</title><content type='html'>　　主要以matlab中比較的關係句，以及如何在editor下除錯（筆記很少，看來我很不專心）&lt;br /&gt;&lt;br /&gt;&lt;a href="http://docs.google.com/View?revision=_latest&amp;docID=d264rx2_11dgznbd"&gt;按我看上課筆記&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8244750955405541832-348666941165214249?l=labmatpt.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://labmatpt.blogspot.com/feeds/348666941165214249/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8244750955405541832&amp;postID=348666941165214249' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8244750955405541832/posts/default/348666941165214249'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8244750955405541832/posts/default/348666941165214249'/><link rel='alternate' type='text/html' href='http://labmatpt.blogspot.com/2006/10/matlab2006-10-20.html' title='Matlab上課筆記2006-10-20'/><author><name>Eric Wu</name><uri>http://www.blogger.com/profile/13535510143465079842</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://static.zooomr.com/images/946899_7f30bf0970.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8244750955405541832.post-3883212115874769066</id><published>2006-10-26T18:25:00.000-07:00</published><updated>2009-04-22T19:16:12.407-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='other'/><title type='text'>有感而發</title><content type='html'>　　對於我們大學四年都在醫學院的學生而言，姑且&lt;br /&gt;不論工程，機電的問題，甚至連最基本微積分，聯立&lt;br /&gt;方程式可能都不記得怎麼算，更不用說是寫程式了（&lt;br /&gt;無法像PCman的作者如此厲害)。&lt;br /&gt;　　&lt;br /&gt;　　碩一上結束後的寒假，我毅然決然的決定來學寫&lt;br /&gt;程式，到現在也已經有了半年的時間，剛開始從看似&lt;br /&gt;容易的labview學起（因為看起來不用輸入程式語法）&lt;br /&gt;，寒假大家都在出去玩，而我則一個人埋頭看書，自&lt;br /&gt;己讀程式語言果然很痛苦，而我們醫學院這邊又沒有&lt;br /&gt;提供這樣的資源讓我們可以去學習程式語言。&lt;br /&gt;　　&lt;br /&gt;　　即使是看了整個寒假，九九乘法表幾乎想了快一&lt;br /&gt;個月才寫得出來，迴圈的用法到現在還是"哩哩辣辣"&lt;br /&gt;，不過對於我而言，寫程式反而讓我回到過去高中的&lt;br /&gt;時候，算數學物理時，可以忘卻時間，全心全意思考&lt;br /&gt;一個問題，去嘗試，去失敗，去學習。&lt;br /&gt;&lt;br /&gt;　　半年過去後的暑假，我拿起Matlab的書本，開始&lt;br /&gt;接觸不敢碰觸的語法，直譯式的程式語言，可以快速&lt;br /&gt;的知道自己錯在哪裡，慢慢的我將他利用在我的實驗&lt;br /&gt;分析上面，Matlab和Labview相輔相成。&lt;br /&gt;&lt;br /&gt;　　話說到總區修這堂課，當初心中有著千百個不安&lt;br /&gt;（現在還是），對於我們這種整天都跟骨骼肌肉神經&lt;br /&gt;為伍的人，工程的東西，程式的東西，都是讓我所恐&lt;br /&gt;懼而不敢向前的。但是既然自己決定要學，就該不顧&lt;br /&gt;一切的往前，希望到了這裡，能夠學會如何去思考程&lt;br /&gt;式邏輯，藉由看大家寫程式的經驗，學習一些程式的&lt;br /&gt;撰寫技巧，增進自己的實力。也希望各位先進，不吝&lt;br /&gt;惜自己的實力。&lt;br /&gt;&lt;br /&gt;　　個人願以野人獻曝的心情，且謙卑的向各位學習&lt;br /&gt;。&lt;br /&gt;&lt;br /&gt;　　&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8244750955405541832-3883212115874769066?l=labmatpt.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://labmatpt.blogspot.com/feeds/3883212115874769066/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8244750955405541832&amp;postID=3883212115874769066' title='2 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8244750955405541832/posts/default/3883212115874769066'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8244750955405541832/posts/default/3883212115874769066'/><link rel='alternate' type='text/html' href='http://labmatpt.blogspot.com/2006/10/blog-post_26.html' title='有感而發'/><author><name>Eric Wu</name><uri>http://www.blogger.com/profile/13535510143465079842</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://static.zooomr.com/images/946899_7f30bf0970.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8244750955405541832.post-4853389632911925659</id><published>2006-10-22T20:04:00.000-07:00</published><updated>2009-04-22T19:15:14.697-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Matlab'/><category scheme='http://www.blogger.com/atom/ns#' term='other'/><title type='text'>新增連結-張智星老師的網頁</title><content type='html'>　　一提到MATLAB很多人可能就馬上想到張智星老師&lt;br /&gt;，他的書雖然是入門款，不過剛開始看還真的有點小&lt;br /&gt;難，不過市面上MATLAB的書琳瑯滿目，選擇對自己比&lt;br /&gt;較容易理解的比較重要。&lt;br /&gt;&lt;br /&gt;　　他的網頁裡面有許多東西，也有他上課的講義，&lt;br /&gt;比較值得注意的音訊分析，裡面的一些概念以及濾波&lt;br /&gt;的寫法，對於我們肌電訊號的處理我想應該是非常有&lt;br /&gt;幫助。&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8244750955405541832-4853389632911925659?l=labmatpt.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://labmatpt.blogspot.com/feeds/4853389632911925659/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8244750955405541832&amp;postID=4853389632911925659' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8244750955405541832/posts/default/4853389632911925659'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8244750955405541832/posts/default/4853389632911925659'/><link rel='alternate' type='text/html' href='http://labmatpt.blogspot.com/2006/10/blog-post_22.html' title='新增連結-張智星老師的網頁'/><author><name>Eric Wu</name><uri>http://www.blogger.com/profile/13535510143465079842</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://static.zooomr.com/images/946899_7f30bf0970.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8244750955405541832.post-49195023254602354</id><published>2006-10-22T18:42:00.000-07:00</published><updated>2009-04-22T19:15:14.697-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Matlab'/><category scheme='http://www.blogger.com/atom/ns#' term='other'/><title type='text'>新增連結-Labview技術研討社群</title><content type='html'>　　這是我之前還蠻常瀏覽的網站，可以&lt;br /&gt;參考許多高手對於一些問題的解決方式，&lt;br /&gt;以及一些寫程式的技巧，不過因為我是初&lt;br /&gt;學，很多討論的東西其實我都看不懂，不&lt;br /&gt;然就是也不知道他們為何如此撰寫，不過&lt;br /&gt;對於labview而言，是非長不錯並且可以參&lt;br /&gt;考的地方。&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8244750955405541832-49195023254602354?l=labmatpt.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://labmatpt.blogspot.com/feeds/49195023254602354/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8244750955405541832&amp;postID=49195023254602354' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8244750955405541832/posts/default/49195023254602354'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8244750955405541832/posts/default/49195023254602354'/><link rel='alternate' type='text/html' href='http://labmatpt.blogspot.com/2006/10/labview_22.html' title='新增連結-Labview技術研討社群'/><author><name>Eric Wu</name><uri>http://www.blogger.com/profile/13535510143465079842</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://static.zooomr.com/images/946899_7f30bf0970.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8244750955405541832.post-3890704362312302343</id><published>2006-10-20T20:39:00.000-07:00</published><updated>2009-04-22T19:15:14.697-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Matlab'/><category scheme='http://www.blogger.com/atom/ns#' term='other'/><title type='text'>新增連結-Matlab之工程應用</title><content type='html'>這是馮老師上課內容的網站，介紹matlab的語&lt;br /&gt;法與基本概念。&lt;br /&gt;&lt;br /&gt;　　昨天詢問過老師，同意讓我將他的部落格放入&lt;br /&gt;連結中，這樣可以直接連結到老師的matlab的部落&lt;br /&gt;格。&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8244750955405541832-3890704362312302343?l=labmatpt.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://labmatpt.blogspot.com/feeds/3890704362312302343/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8244750955405541832&amp;postID=3890704362312302343' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8244750955405541832/posts/default/3890704362312302343'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8244750955405541832/posts/default/3890704362312302343'/><link rel='alternate' type='text/html' href='http://labmatpt.blogspot.com/2006/10/blog-post_20.html' title='新增連結-Matlab之工程應用'/><author><name>Eric Wu</name><uri>http://www.blogger.com/profile/13535510143465079842</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://static.zooomr.com/images/946899_7f30bf0970.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8244750955405541832.post-946401148451506409</id><published>2006-10-19T23:47:00.000-07:00</published><updated>2009-04-22T19:15:14.698-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Matlab'/><category scheme='http://www.blogger.com/atom/ns#' term='other'/><title type='text'>若有連結失效請寄信給我</title><content type='html'>　　由於東西都是放於網路免費空間上面，難保可&lt;br /&gt;能會出現連結失效或是網路空間的意外，如有發生&lt;br /&gt;連結失效的情形，請寫信給我：&lt;br /&gt;&lt;br /&gt;我的信箱為happyeric1120@yahoo.com.tw&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8244750955405541832-946401148451506409?l=labmatpt.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://labmatpt.blogspot.com/feeds/946401148451506409/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8244750955405541832&amp;postID=946401148451506409' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8244750955405541832/posts/default/946401148451506409'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8244750955405541832/posts/default/946401148451506409'/><link rel='alternate' type='text/html' href='http://labmatpt.blogspot.com/2006/10/blog-post_19.html' title='若有連結失效請寄信給我'/><author><name>Eric Wu</name><uri>http://www.blogger.com/profile/13535510143465079842</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://static.zooomr.com/images/946899_7f30bf0970.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8244750955405541832.post-1466676283087752142</id><published>2006-10-19T20:44:00.000-07:00</published><updated>2009-04-22T19:17:05.130-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Labview-訊號分析'/><category scheme='http://www.blogger.com/atom/ns#' term='Labview'/><title type='text'>labview分割資料</title><content type='html'>&lt;pre&gt;&lt;br /&gt;　　在EMG訊號中，不管是要作iEMG或是RMS，甚至式自己想要作&lt;br /&gt;windows來分析，還是某一區域的最大最小值，都需要透過分割資&lt;br /&gt;料應用，自己過去也想了一些方式，這份心得筆記是自己之前寫的&lt;br /&gt;，大家不彷嘗試看看，相信一定有更好的方式，也歡迎大家提供。&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;a href="http://four.fsphost.com/happyeric1120/cutdata.doc"&gt;點我看如何擷取某段資料&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8244750955405541832-1466676283087752142?l=labmatpt.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://labmatpt.blogspot.com/feeds/1466676283087752142/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8244750955405541832&amp;postID=1466676283087752142' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8244750955405541832/posts/default/1466676283087752142'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8244750955405541832/posts/default/1466676283087752142'/><link rel='alternate' type='text/html' href='http://labmatpt.blogspot.com/2006/10/labview.html' title='labview分割資料'/><author><name>Eric Wu</name><uri>http://www.blogger.com/profile/13535510143465079842</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://static.zooomr.com/images/946899_7f30bf0970.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8244750955405541832.post-8178877316397835845</id><published>2006-10-15T10:53:00.000-07:00</published><updated>2009-04-22T19:17:05.130-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Labview-訊號分析'/><category scheme='http://www.blogger.com/atom/ns#' term='Labview'/><title type='text'>RMS</title><content type='html'>&lt;a href="http://static.flickr.com/116/270359834_4a499764d5_o.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px;" src="http://static.flickr.com/116/270359834_4a499764d5_o.jpg" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;RMS常用在處理EMG的訊號上面，但是很少有去直接計算RMS的軟體，大多要靠自行寫程式，方法其實很多，在此只是給予一個我所寫的方式。&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8244750955405541832-8178877316397835845?l=labmatpt.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://labmatpt.blogspot.com/feeds/8178877316397835845/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8244750955405541832&amp;postID=8178877316397835845' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8244750955405541832/posts/default/8178877316397835845'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8244750955405541832/posts/default/8178877316397835845'/><link rel='alternate' type='text/html' href='http://labmatpt.blogspot.com/2006/10/rms.html' title='RMS'/><author><name>Eric Wu</name><uri>http://www.blogger.com/profile/13535510143465079842</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://static.zooomr.com/images/946899_7f30bf0970.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8244750955405541832.post-6761132744551783860</id><published>2006-10-13T17:27:00.000-07:00</published><updated>2006-10-16T08:19:29.848-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='other'/><title type='text'>撰寫分類</title><content type='html'>&lt;p&gt;　　為了方便查詢以及分類，所以利用label的方式將文章一一分門。內容包含有&lt;/P&gt;  &lt;br /&gt;      labview-訊號擷取&lt;br /&gt;      labview-訊號分析&lt;br /&gt;      matlab-訊號分析  等等&lt;br /&gt;&lt;br /&gt;　　其他閒聊可以歸類在other。這樣應該會比較容易查找。&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8244750955405541832-6761132744551783860?l=labmatpt.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://labmatpt.blogspot.com/feeds/6761132744551783860/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8244750955405541832&amp;postID=6761132744551783860' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8244750955405541832/posts/default/6761132744551783860'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8244750955405541832/posts/default/6761132744551783860'/><link rel='alternate' type='text/html' href='http://labmatpt.blogspot.com/2006/10/blog-post_7049.html' title='撰寫分類'/><author><name>Eric Wu</name><uri>http://www.blogger.com/profile/13535510143465079842</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://static.zooomr.com/images/946899_7f30bf0970.jpg'/></author><thr:total>0</thr:total></entry></feed>
