針對航天測試系統中提出的多通道數據采集要求,采用PXI采集卡,設計了多路溫度、液位、電壓等信號的采集系統。使用VC++2008編寫了采集控制程序,可以實時顯示和處理多路測試數據。本系統已成功應用于某測試任務。
上傳時間: 2013-10-19
上傳用戶:牛津鞋
C++完美演繹 經典算法 如 /* 頭文件:my_Include.h */ #include <stdio.h> /* 展開C語言的內建函數指令 */ #define PI 3.1415926 /* 宏常量,在稍后章節再詳解 */ #define circle(radius) (PI*radius*radius) /* 宏函數,圓的面積 */ /* 將比較數值大小的函數寫在自編include文件內 */ int show_big_or_small (int a,int b,int c) { int tmp if (a>b) { tmp = a a = b b = tmp } if (b>c) { tmp = b b = c c = tmp } if (a>b) { tmp = a a = b b = tmp } printf("由小至大排序之后的結果:%d %d %d\n", a, b, c) } 程序執行結果: 由小至大排序之后的結果:1 2 3 可將內建函數的include文件展開在自編的include文件中 圓圈的面積是=201.0619264
標簽: my_Include include define 3.141
上傳時間: 2014-01-17
上傳用戶:epson850
數字運算,判斷一個數是否接近素數 A Niven number is a number such that the sum of its digits divides itself. For example, 111 is a Niven number because the sum of its digits is 3, which divides 111. We can also specify a number in another base b, and a number in base b is a Niven number if the sum of its digits divides its value. Given b (2 <= b <= 10) and a number in base b, determine whether it is a Niven number or not. Input Each line of input contains the base b, followed by a string of digits representing a positive integer in that base. There are no leading zeroes. The input is terminated by a line consisting of 0 alone. Output For each case, print "yes" on a line if the given number is a Niven number, and "no" otherwise. Sample Input 10 111 2 110 10 123 6 1000 8 2314 0 Sample Output yes yes no yes no
上傳時間: 2015-05-21
上傳用戶:daguda
源代碼\用動態規劃算法計算序列關系個數 用關系"<"和"="將3個數a,b,c依次序排列時,有13種不同的序列關系: a=b=c,a=b<c,a<b=v,a<b<c,a<c<b a=c<b,b<a=c,b<a<c,b<c<a,b=c<a c<a=b,c<a<b,c<b<a 若要將n個數依序列,設計一個動態規劃算法,計算出有多少種不同的序列關系, 要求算法只占用O(n),只耗時O(n*n).
上傳時間: 2013-12-26
上傳用戶:siguazgb
c語言版的多項式曲線擬合。 用最小二乘法進行曲線擬合. 用p-1 次多項式進行擬合,p<= 10 x,y 的第0個域x[0],y[0],沒有用,有效數據從x[1],y[1] 開始 nNodeNum,有效數據節點的個數。 b,為輸出的多項式系數,b[i] 為b[i-1]次項。b[0],沒有用。 b,有10個元素ok。
上傳時間: 2014-01-12
上傳用戶:變形金剛
用C51寫的單片機程序,在Wave600環境下測試通過,利用平板電容器測試液位。
上傳時間: 2015-07-22
上傳用戶:asasasas
We have a group of N items (represented by integers from 1 to N), and we know that there is some total order defined for these items. You may assume that no two elements will be equal (for all a, b: a<b or b<a). However, it is expensive to compare two items. Your task is to make a number of comparisons, and then output the sorted order. The cost of determining if a < b is given by the bth integer of element a of costs (space delimited), which is the same as the ath integer of element b. Naturally, you will be judged on the total cost of the comparisons you make before outputting the sorted order. If your order is incorrect, you will receive a 0. Otherwise, your score will be opt/cost, where opt is the best cost anyone has achieved and cost is the total cost of the comparisons you make (so your score for a test case will be between 0 and 1). Your score for the problem will simply be the sum of your scores for the individual test cases.
標簽: represented integers group items
上傳時間: 2016-01-17
上傳用戶:jeffery
超聲波測距器,可以應用于汽車倒車、建筑施工工地以及一些工業現場的位置監控,也可用于如液位、井深、管道長度的測量等場合。要求測量范圍在0.10-5.00m,測量精度1cm,測量時與被測物體無直接接觸,能夠清晰穩定地顯示測量結果。由于超聲波指向性強,能量消耗緩慢,在介質中傳播的距離較遠,因而超聲波經常用于距離的測量,如測距儀和物位測量儀等都可以通過超聲波來實現。利用超聲波檢測往往比較迅速、方便、計算簡單、易于做到實時控制,并且在測量精度方面能達到工業實用的要求,因此在移動機器人的研制上也得到了廣泛的應用。
標簽: 超聲波測距
上傳時間: 2014-01-08
上傳用戶:ggwz258
在工業生產和科學技術研究的各行業中,常常利用PC或工控機對各種數據進行采集。這其中有很多地方需要對各種數據進行采集,如液位、溫度、壓力、頻率等?,F在常用的采集方式是通過數據采集板卡,常用的有A/D卡以及422、485等總線板卡。采用板卡不僅安裝麻煩、易受機箱內環境的干擾,而且由于受計算機插槽數量和地址、中斷資源的限制,不可能掛接很多設備。而通用串行總線(Universal Aerial Bus,簡稱USB)的出現,很好地解決了以上這些沖突,很容易就能實現低成本、高可靠性、多點的數據采集。
上傳時間: 2016-05-21
上傳用戶:aix008
用游標的方法實現對稱差的計算,即 (A-B)+(B-A)
上傳時間: 2016-05-23
上傳用戶:遠遠ssad