This demo nstrates the use of the reversible jump MCMC algorithm for neural networks. It uses a hierarchical full Bayesian model for neural networks. This model treats the model dimension (number of neurons), model parameters, regularisation parameters and noise parameters as random variables that need to be estimated. The derivations and proof of geometric convergence are presented, in detail, in: Christophe Andrieu, Nando de Freitas and Arnaud Doucet. Robust Full Bayesian Learning for Neural Networks. Technical report CUED/F-INFENG/TR 343, Cambridge University Department of Engineering, May 1999. After downloading the file, type "tar -xf rjMCMC.tar" to uncompress it. This creates the directory rjMCMC containing the required m files. Go to this directory, load matlab5 and type "rjdemo1". In the header of the demo file, one can select to monitor the simulation progress (with par.doPlot=1) and modify the simulation parameters.
標簽: reversible algorithm the nstrates
上傳時間: 2014-01-08
上傳用戶:cuibaigao
For advanced geometry, most apps will prefer to load pre-authored meshes from a file. Fortunately, when using meshes, D3DX does most of the work for this, parsing a geometry file and creating vertx buffers for us. This tutorial shows how to use a D3DXMESH object, including loading it from a file and rendering it. One thing D3DX does not handle for us is the materials and textures for a mesh, so note that we have to handle those manually.
標簽: pre-authored Fortunately advanced geometry
上傳時間: 2013-12-26
上傳用戶:sssl
The tca package is a Matlab program that implements the tree-dependent component analysis (TCA) algorithms that extends the independent component analysis (ICA), where instead of looking for a linear transform that makes the data components independent, we are looking for components that can be best fitted in a tree structured graphical model. The TCA model can be applied in any situation where the data can be assumed to have been transformed by an unknown linear transformation.
標簽: tree-dependent implements component analysis
上傳時間: 2016-09-17
上傳用戶:cazjing
LTV350QV-F09 is a TMR(Transmissive with Micro Reflective) type color active matrix TFT (Thin Film Transistor) liquid crystal display (LCD) that uses amorphous silicon TFT as a switching devices. This model is composed of a TFT-LCD module, a driver circuit and a back-light unit and a touch screen panel(TSP). The resolution of a 3.5" contains 320RGBx240 dots and can display up to 16.7M colors.
標簽: Transmissive Reflective active matrix
上傳時間: 2013-12-11
上傳用戶:大三三
Whenever there is an application to write, breaking it up to small pieces is a great idea. The smallest piece of any application would probably be a data object, or a simple Bean in Java. Java Beans are simple Java classes that have a distinctive look and behavior. Their simplest purpose is to contain data and they accomplish this by having properties. Each property is actually a data-member containing/referencing the actual data and a couple of methods, a getter method and a setter method. Thus, the simplest data-bean describing a person could be expressed as such:
標簽: small application Whenever breaking
上傳時間: 2016-11-07
上傳用戶:lingzhichao
CAN1.c and CAN2.c are a simple example of configuring a CAN network to transmit and receive data on a CAN network, and how to move information to and from CAN RAM message objects. Each C8051F040-TB CAN node is configured to send a message when it s P3.7 button is depressed/released, with a 0x11 to indicate the button is pushed, and 0x00 when released. Each node also has a message object configured to receive messages. The C8051 tests the received data and will turn on/off the target board s LED. When one target is loaded with CAN2.c and the other is loaded with CAN1.c, one target board s push-button will control the other target board s LED, establishing a simple control link via the CAN bus and can be observed directly on the target boards.
標簽: CAN configuring and transmit
上傳時間: 2013-12-11
上傳用戶:weiwolkt
Learn how to: * Tokenize a null-terminated string * Create a search and replace function for strings * Implement subtraction for string objects * Use the vector, deque, and list sequence containers * Use the container adaptors stack, queue, and priority_queue * Use the map, multimap, set, and multiset associative containers * Reverse, rotate, and shuffle a sequence * Create a function object * Use binders, negators, and iterator adapters * Read and write files * Use stream iterators to handle file I/O * Use exceptions to handle I/O errors * Create custom inserters and extractors * Format date, time, and numeric data * Use facets and the localization library * Overload the [ ], ( ), and -> operators * Create an explicit constructor * And much, much more
標簽: null-terminated Tokenize Create string
上傳時間: 2014-01-18
上傳用戶:yph853211
C++ From Scratch: An Object-Oriented Approach is designed to walk novice programmers through the analysis, design and implementation of a functioning object-oriented application using C++. You will learn all the critical programming concepts and techniques associated with the language in the context of creating a functioning application. Best selling C++ author Jesse Liberty shows you how to create "Decryptix", a game of decoding a hidden pattern as quickly as possible, using nothing but successive guesses and the application of logic. Every example and technique is put into the context of achieving a goal and accomplishing an end.
標簽: Object-Oriented programmers Approach designed
上傳時間: 2013-12-25
上傳用戶:225588
單片機音樂中音調和節拍的確定方法:調號-音樂上指用以確定樂曲主音高度的符號。很明顯一個八度就有12個半音。A、B、C、D、E、F、G。經過聲學家的研究,全世界都用這些字母來表示固定的音高。比如,A這個音,標準的音高為每秒鐘振動440周。 升C調:1=#C,也就是降D調:1=BD;277(頻率)升D調:1=#D,也就是降E調:1=BE;311升F調:1=#F,也就是降G調:1=BG;369升G調:1=#G,也就是降A調:1=BA;415升A調:1=#A,也就是降B調:1=BB。466,C 262 #C277 D 294 #D(bE)311 E 330 F 349 #F369 G 392 #G415A 440. #A466 B 494 所謂1=A,就是說,這首歌曲的“導”要唱得同A一樣高,人們也把這首歌曲叫做A調歌曲,或叫“唱A調”。1=C,就是說,這首歌曲的“導”要唱得同C一樣高,或者說“這歌曲唱C調”。同樣是“導”,不同的調唱起來的高低是不一樣的。各調的對應的標準頻率為: 單片機演奏音樂時音調和節拍的確定方法 經常看到一些剛學單片機的朋友對單片機演奏音樂比較有興趣,本人也曾是這樣。在此,本人將就這方面的知識做一些簡介,但愿能對單片機演奏音樂比較有興趣而又不知其解的朋友能有所啟迪。 一般說來,單片機演奏音樂基本都是單音頻率,它不包含相應幅度的諧波頻率,也就是說不能象電子琴那樣能奏出多種音色的聲音。因此單片機奏樂只需弄清楚兩個概念即可,也就是“音調”和“節拍”。音調表示一個音符唱多高的頻率,節拍表示一個音符唱多長的時間。 在音樂中所謂“音調”,其實就是我們常說的“音高”。在音樂中常把中央C上方的A音定為標準音高,其頻率f=440Hz。當兩個聲音信號的頻率相差一倍時,也即f2=2f1時,則稱f2比f1高一個倍頻程, 在音樂中1(do)與 ,2(來)與 ……正好相差一個倍頻程,在音樂學中稱它相差一個八度音。在一個八度音內,有12個半音。以1—i八音區為例, 12個半音是:1—#1、#1—2、2—#2、#2—3、3—4、4—#4,#4—5、5一#5、#5—6、6—#6、#6—7、7—i。這12個音階的分度基本上是以對數關系來劃分的。如果我們只要知道了這十二個音符的音高,也就是其基本音調的頻率,我們就可根據倍頻程的關系得到其他音符基本音調的頻率。 知道了一個音符的頻率后,怎樣讓單片機發出相應頻率的聲音呢?一般說來,常采用的方法就是通過單片機的定時器定時中斷,將單片機上對應蜂鳴器的I/O口來回取反,或者說來回清零,置位,從而讓蜂鳴器發出聲音,為了讓單片機發出不同頻率的聲音,我們只需將定時器予置不同的定時值就可實現。那么怎樣確定一個頻率所對應的定時器的定時值呢?以標準音高A為例: A的頻率f = 440 Hz,其對應的周期為:T = 1/ f = 1/440 =2272μs 由上圖可知,單片機上對應蜂鳴器的I/O口來回取反的時間應為:t = T/2 = 2272/2 = 1136μs這個時間t也就是單片機上定時器應有的中斷觸發時間。一般情況下,單片機奏樂時,其定時器為工作方式1,它以振蕩器的十二分頻信號為計數脈沖。設振蕩器頻率為f0,則定時器的予置初值由下式來確定: t = 12 *(TALL – THL)/ f0 式中TALL = 216 = 65536,THL為定時器待確定的計數初值。因此定時器的高低計數器的初值為: TH = THL / 256 = ( TALL – t* f0/12) / 256 TL = THL % 256 = ( TALL – t* f0/12) %256 將t=1136μs代入上面兩式(注意:計算時應將時間和頻率的單位換算一致),即可求出標準音高A在單片機晶振頻率f0=12Mhz,定時器在工作方式1下的定時器高低計數器的予置初值為 : TH440Hz = (65536 – 1136 * 12/12) /256 = FBH TL440Hz = (65536 – 1136 * 12/12)%256 = 90H根據上面的求解方法,我們就可求出其他音調相應的計數器的予置初值。 音符的節拍我們可以舉例來說明。在一張樂譜中,我們經常會看到這樣的表達式,如1=C 、1=G …… 等等,這里1=C,1=G表示樂譜的曲調,和我們前面所談的音調有很大的關聯, 、 就是用來表示節拍的。以 為例加以說明,它表示樂譜中以四分音符為節拍,每一小結有三拍。比如: 其中1 、2 為一拍,3、4、5為一拍,6為一拍共三拍。1 、2的時長為四分音符的一半,即為八分音符長,3、4的時長為八分音符的一半,即為十六分音符長,5的時長為四分音符的一半,即為八分音符長,6的時長為四分音符長。那么一拍到底該唱多長呢?一般說來,如果樂曲沒有特殊說明,一拍的時長大約為400—500ms 。我們以一拍的時長為400ms為例,則當以四分音符為節拍時,四分音符的時長就為400ms,八分音符的時長就為200ms,十六分音符的時長就為100ms。可見,在單片機上控制一個音符唱多長可采用循環延時的方法來實現。首先,我們確定一個基本時長的延時程序,比如說以十六分音符的時長為基本延時時間,那么,對于一個音符,如果它為十六分音符,則只需調用一次延時程序,如果它為八分音符,則只需調用二次延時程序,如果它為四分音符,則只需調用四次延時程序,依次類推。通過上面關于一個音符音調和節拍的確定方法,我們就可以在單片機上實現演奏音樂了。具體的實現方法為:將樂譜中的每個音符的音調及節拍變換成相應的音調參數和節拍參數,將他們做成數據表格,存放在存儲器中,通過程序取出一個音符的相關參數,播放該音符,該音符唱完后,接著取出下一個音符的相關參數……,如此直到播放完畢最后一個音符,根據需要也可循環不停地播放整個樂曲。另外,對于樂曲中的休止符,一般將其音調參數設為FFH,FFH,其節拍參數與其他音符的節拍參數確定方法一致,樂曲結束用節拍參數為00H來表示。下面給出部分音符(三個八度音)的頻率以及以單片機晶振頻率f0=12Mhz,定時器在工作方式1下的定時器高低計數器的予置初值 : C調音符 頻率Hz 262 277 293 311 329 349 370 392 415 440 466 494TH/TL F88B F8F2 F95B F9B7 FA14 FA66 FAB9 FB03 FB4A FB8F FBCF FC0BC調音符 1 1# 2 2# 3 4 4# 5 5# 6 6# 7頻率Hz 523 553 586 621 658 697 739 783 830 879 931 987TH/TL FC43 FC78 FCAB FCDB FD08 FD33 FD5B FD81 FDA5 FDC7 FDE7 FE05C調音符 頻率Hz 1045 1106 1171 1241 1316 1393 1476 1563 1658 1755 1860 1971TH/TL FB21 FE3C FE55 FE6D FE84 FE99 FEAD FEC0 FE02 FEE3 FEF3 FF02
上傳時間: 2013-10-20
上傳用戶:哈哈haha
The JICQ is the bureau area which JAVA writes according to "Customer s Machine/Server"(C/S) mode message solid hour correspond by letter tool system, the system adopted the SQL Server2000 of Microsoft company as a backstage database, the system passes a JDBC interview database. The system is divided into the server procedure and customer s procedure two parts, server and customer adoption "Transmission Control Protocol"(TCP), connect a word (Socket) conjunction through a set, the adoption "User Datagram Protocol "(UDP) of the customer s, pass a data report a set to connect a word (DatagramSocket) establishment a conjunction. The system has customer registration, customer to register, increase good friend, delete good friend and send out and receive news etc. function.
標簽: according Customer Machine Server
上傳時間: 2014-01-04
上傳用戶:jyycc