简单有限元计算程序。 NJF---结点自由度数 E---弹性模量 NE---单元数 T---板厚度 VM---泊松比 z---实型二维数组,用来存放结点坐标 ZJ---实型二维数组,用来存放每个约束自由度方向和该方向的约束值, ie---实型二维数组,存放布尔矩阵 p---实型一维数组,先存放等效结点载荷,解完方程后存放输出的结点位移 a,b,a---实型数组,存放各个单元的面积及由结点坐标计算的bi,bj,ci,cj g---实型数组,存放单刚子块 zk---实型二维数组,存放整刚矩阵
上传时间: 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创建的a w k编程语言的较新版本之一。a w k出自创建者姓的首字母。a w k语言(在其所有的版本中)是一种具有很强能力的模式匹配和过程语言。a w k获取一个文件(或多个文件)来查找匹配特定模式的记录。当查到匹配后,即执行所指定的动作。作为一个程序员,你不必操心通过文件打开、循环读每个记录,控制文件的结束,或执行完后关闭文件。
上传时间: 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的经过调试多次已经能够实现在指定的位置显示特定的数据。 程序lcd1.c实现基本的功能,即:键盘输入0、1、2、3、4、5、6、7、8、9、a\b\c\d\e\f 在液晶的指定位置显示实现满屏或半屏显示点阵和字符,调入一幅图画的代码进行显示;
上传时间: 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
一个能够分析三种整数、标识符、主要运算符和主要关键字的词法分析程序。 ㈠、基本要求: 标识符 <字母>(<字母>|<数字字符>)* 十进制整数 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)(0|1|2|3|4|5|6|7)* 十六进制整数 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 ㈡、附加要求: 标识符 <字母>(<字母>|<数字字符>)*(ε|_|.)(<字母>|<数字字符>)* 十进制整数 (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)* 八进制整数 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)* 十六进制整数 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段数码是纯组合电路,通常的小规模专用IC,如74或4000系列的器件只能作十进制BCD码译码,然而数字系统中的数据处理和运算都是2进制的,所以输出表达都是16进制的,为了满足16进制数的译码显示,最方便的方法就是利用VHDL译码程序在FPGA或CPLD中实现。本项实验很容易实现这一目的。例6-1作为7段BCD码译码器的设计,输出信号LED7S的7位分别接如图6-1数码管的7个段,高位在左,低位在右。例如当LED7S输出为 "1101101" 时,数码管的7个段:g、f、e、d、c、b、a分别接1、1、0、1、1、0、1,接有高电平的段发亮,于是数码管显示“5”。
上传时间: 2014-01-08
上传用户:wff