簡單有限元計算程序。 NJF---結點自由度數(shù) E---彈性模量 NE---單元數(shù) T---板厚度 VM---泊松比 z---實型二維數(shù)組,用來存放結點坐標 ZJ---實型二維數(shù)組,用來存放每個約束自由度方向和該方向的約束值, ie---實型二維數(shù)組,存放布爾矩陣 p---實型一維數(shù)組,先存放等效結點載荷,解完方程后存放輸出的結點位移 a,b,a---實型數(shù)組,存放各個單元的面積及由結點坐標計算的bi,bj,ci,cj g---實型數(shù)組,存放單剛子塊 zk---實型二維數(shù)組,存放整剛矩陣
上傳時間: 2014-01-24
上傳用戶:cuibaigao
g a w k或GNU awk是由Alfred V. A h o,Peter J.We i n b e rg e r和Brian W. K e r n i g h a n于1 9 7 7年為U N I X創(chuàng)建的a w k編程語言的較新版本之一。a w k出自創(chuàng)建者姓的首字母。a w k語言(在其所有的版本中)是一種具有很強能力的模式匹配和過程語言。a w k獲取一個文件(或多個文件)來查找匹配特定模式的記錄。當查到匹配后,即執(zhí)行所指定的動作。作為一個程序員,你不必操心通過文件打開、循環(huán)讀每個記錄,控制文件的結束,或執(zhí)行完后關閉文件。
上傳時間: 2014-01-02
上傳用戶:hwl453472107
題目:利用條件運算符的嵌套來完成此題:學習成績>=90分的同學用A表示,60-89分之間的用B表示,60分以下的用C表示。 1.程序分析:(a>b)?a:b這是條件運算符的基本例子。
上傳時間: 2015-01-08
上傳用戶:lifangyuan12
prolog 找路例子程序: === === === === === === Part 1-Adding connections Part 2-Simple Path example | ?- path1(a,b,P,T). will produce the response: T = 15 P = [a,b] ? Part 3 - Non-repeating path As an example, the query: ?- path2(a,h,P,T). will succeed and may produce the bindings: P = [a,depot,b,d,e,f,h] T = 155 Part 4 - Generating a path below a cost threshold As an example, the query: ?- path_below_cost(a,[a,b,c,d,e,f,g,h],RS,300). returns: RS = [a,b,depot,c,d,e,g,f,h] ? RS = [a,c,depot,b,d,e,g,f,h] ? no ==================================
標簽: Part connections example prolog
上傳時間: 2015-04-24
上傳用戶:ljt101007
The government of a small but important country has decided that the alphabet needs to be streamlined and reordered. Uppercase letters will be eliminated. They will issue a royal decree in the form of a String of B and A characters. The first character in the decree specifies whether a must come ( B )Before b in the new alphabet or ( A )After b . The second character determines the relative placement of b and c , etc. So, for example, "BAA" means that a must come Before b , b must come After c , and c must come After d . Any letters beyond these requirements are to be excluded, so if the decree specifies k comparisons then the new alphabet will contain the first k+1 lowercase letters of the current alphabet. Create a class Alphabet that contains the method choices that takes the decree as input and returns the number of possible new alphabets that conform to the decree. If more than 1,000,000,000 are possible, return -1. Definition
標簽: government streamline important alphabet
上傳時間: 2015-06-09
上傳用戶:weixiao99
BNB20 Finds the constrained minimum of a function of several possibly integer variables. % Usage: [errmsg,Z,X,t,c,fail] = % BNB20(fun,x0,xstatus,xlb,xub,A,B,Aeq,Beq,nonlcon,settings,options,P1,P2,...) % % BNB solves problems of the form: % Minimize F(x) subject to: xlb <= x0 <=xub % A*x <= B Aeq*x=Beq % C(x)<=0 Ceq(x)=0 % x(i) is continuous for xstatus(i)=0 % x(i) integer for xstatus(i)= 1 % x(i) fixed for xstatus(i)=2 %
標簽: constrained variables function possibly
上傳時間: 2014-01-13
上傳用戶:youth25
LCD-7279的經(jīng)過調試多次已經(jīng)能夠實現(xiàn)在指定的位置顯示特定的數(shù)據(jù)。 程序lcd1.c實現(xiàn)基本的功能,即:鍵盤輸入0、1、2、3、4、5、6、7、8、9、a\b\c\d\e\f 在液晶的指定位置顯示實現(xiàn)滿屏或半屏顯示點陣和字符,調入一幅圖畫的代碼進行顯示;
上傳時間: 2014-01-14
上傳用戶:hgy9473
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
一個能夠分析三種整數(shù)、標識符、主要運算符和主要關鍵字的詞法分析程序。 ㈠、基本要求: 標識符 <字母>(<字母>|<數(shù)字字符>)* 十進制整數(shù) 0 | (1|2|3|4|5|6|7|8|9)(0|1|2|3|4|5|6|7|8|9)* 八進制整數(shù) 0(1|2|3|4|5|6|7)(0|1|2|3|4|5|6|7)* 十六進制整數(shù) 0x(0|1|2|3|4|5|6|7|8|9|a|b|c|d|e|f)(0|1|2|3|4|5|6|7|8|9|a|b|c|d|e|f)* 運算符和分隔符 + - * / > < = ( ) ; 關鍵字 if then else while do ㈡、附加要求: 標識符 <字母>(<字母>|<數(shù)字字符>)*(ε|_|.)(<字母>|<數(shù)字字符>)* 十進制整數(shù) (0|1|2|3|4|5|6|7|8|9)(0|1|2|3|4|5|6|7|8|9)*(ε|.)(0|1|2|3|4|5|6|7|8|9)(0|1|2|3|4|5|6|7|8|9)* 八進制整數(shù) 0(1|2|3|4|5|6|7)(0|1|2|3|4|5|6|7)* (ε|.)(0|1|2|3|4|5|6|7)(0|1|2|3|4|5|6|7)* 十六進制整數(shù) 0x(0|1|2|3|4|5|6|7|8|9|a|b|c|d|e|f)(0|1|2|3|4|5|6|7|8|9|a|b|c|d|e|f)* (ε|.) (0|1|2|3|4|5|6|7|8|9|a|b|c|d|e|f)(0|1|2|3|4|5|6|7|8|9|a|b|c|d|e|f)*
上傳時間: 2016-03-03
上傳用戶:zhengjian
7段數(shù)碼是純組合電路,通常的小規(guī)模專用IC,如74或4000系列的器件只能作十進制BCD碼譯碼,然而數(shù)字系統(tǒng)中的數(shù)據(jù)處理和運算都是2進制的,所以輸出表達都是16進制的,為了滿足16進制數(shù)的譯碼顯示,最方便的方法就是利用VHDL譯碼程序在FPGA或CPLD中實現(xiàn)。本項實驗很容易實現(xiàn)這一目的。例6-1作為7段BCD碼譯碼器的設計,輸出信號LED7S的7位分別接如圖6-1數(shù)碼管的7個段,高位在左,低位在右。例如當LED7S輸出為 "1101101" 時,數(shù)碼管的7個段:g、f、e、d、c、b、a分別接1、1、0、1、1、0、1,接有高電平的段發(fā)亮,于是數(shù)碼管顯示“5”。
上傳時間: 2014-01-08
上傳用戶:wff