support vector classification machine
% soft margin
% uses "kernel.m"
%
% xtrain: (Ltrain,N) with Ltrain: number of points N: dimension
% ytrain: (Ltrain,1) containing class labels (-1 or +1)
% xrun: (Lrun,N) with Lrun: number of points N: dimension
% atrain: alpha coefficients (from svcm_train on xtrain and ytrain)
% btrain: offest coefficient (from svcm_train on xtrain and ytrain)
%
% ypred: predicted y (Lrun,1) containing class labels (-1 or +1)
% margin: (signed) separation from the separating hyperplane (Lrun,1
LCD and Keyboard ARMulator model for the ADS Source Code
Copy the provided ARMulate folder into your ADS directory tree
at the root, for example in c:\ADSv1_1. If prompted to
overwrite files, choose Yes.
The batch file copy_console.bat will place the appropriate
files inside the \Bin directory so that they will be found by
the ARMulator. You still need to follow the instructions
under "Using the Model" to set up the configuration files.
輸入:以十進(jìn)制的形式讀入要判斷的年份,從鍵盤取得的一個(gè)十進(jìn)制數(shù)轉(zhuǎn)換為二進(jìn)制數(shù)存入BX寄存器中,再將BX中的內(nèi)容保存在變量year中。
判斷:首先將year中的內(nèi)容首先除以4,不能被4整除,則一定不是閏年,能被4整除的,需再將year中的內(nèi)容除以100,不能被100整除的,則一定是閏年,能被100整除的,需再將year中的內(nèi)容除以400,能被400整除的,則是閏年,不能被400整除的,則不是閏年。
輸出:經(jīng)判斷后,是閏年的輸出“This is a leap year!”,不是閏年的則輸出“
This is not a leap year! ”,然后輸出是否要繼續(xù)判斷另一年份是否是閏年的提示字符串“ Continue jugding(y/n)?”,輸入‘y’,則輸入要判斷的年份,輸入其它字符則結(jié)束程序。