Re: ? operate only on selected nodes in MatLab

看板Programming作者時間18年前 (2006/08/25 18:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串2/2 (看更多)
b=size(find(a>=0.5),1) %May I suggest some basic reading like "getting started"? %Just a thought. ※ 引述《ccos ( )》之銘言: > a = rand(3,2); > b = 0.0; > for m = 1:1:3 > for n = 1:1:2 > if a(m,n) >= 0.5 > b = b+1.0; > end > end > end > How to implement the above in a more efficient way? > Thanks, > by Cheng Cosine > Aug/23/2k6 NC -- ┌─────KKCITY─────┐  KKBOX動態歌詞緊緊跟著你 bbs.kkcity.com.tw \^_^ / http://www.kkbox.com.tw └──From:24.218.41.138 ──┘   唱片公司授權,音樂盡情下載 --
文章代碼(AID): #14xigJ00 (Programming)
文章代碼(AID): #14xigJ00 (Programming)