Location:
Search - TX-1
Search list
Description: 计算方法实验。自己做的
实 验3 梯形法求定积分值
【实验内容】
1、方法简介
复化梯形公式: ,
2、基本原理
设将求积区间[a,b]划分为n等分,步长 ,分点为xi=a+ih,i=0,1,…,n。所谓复化求积法,就是先用低阶求积公式求得每个子段[xi,xi+1]上的积分值Ii,然后再将他们累加求和,用各段积分之和 作为所求积分的近似值。
3、使用说明
(1)本程序在windows xp + vc6.0完美运行,为了保证其正确,请在此环境下运行。
(2)变量说明
a:实变量,积分下界
b:实变量,积分上界
n:区间被分割数
y:实变量,积分结果
(3)子程序用于解实例
float f(float x)
{
float y
y=(float)cos(x)
return y
}
Platform: |
Size: 62491 |
Author: 000 |
Hits:
Description: 郭天祥TX-1C的USB开发板原码,内有驱动文件,固件程序
Platform: |
Size: 3088522 |
Author: 江天珠 |
Hits:
Description: 可过阿波罗apollo,露娜,梦幻古龙,TX的驱动源码!!!含调用例子 1]xmOx[mb
恢复NtOpenProcess成功,恢复NtOpenThread成功,恢复NtReadVirtualMemory成功,恢复NtWriteVirtualMemory成功 .
没什么好说的,做外挂的应该都知道.
Platform: |
Size: 86439 |
Author: 102442 |
Hits:
Description: /*PL/0编译系统C版本头文件pl0.h*/
/*
typedef enum
{
false,
true
} bool;
*/
#define norw 13 /*关键字个数*/
#define txmax 100 /*名字表容量*/
#define nmax 14 /*number的最大位数*/
#define al 10 /*符号的最大长度*/
#define amax 2047 /*地址上界*/
#define levmax 3 /*最大允许过程嵌套声明层数[0,levmax]*/
#define cxmax 200 /*最多的虚拟机代码数*/
/*符号*/
enum symbol{
nul, ident, number, plus, minus,
times, slash, oddsym, eql, neq,
lss, leq, gtr, geq, lparen,
rparen, comma, semicolon, period, becomes,
beginsym, endsym, ifsym, thensym, whilesym,
writesym, readsym, dosym, callsym, constsym,
varsym, procsym,
};
#define symnum 32
/*名字表中的类型*/
enum object{
constant,
variable,
procedur,
};
/*虚拟机代码*/
enum fct{
lit, opr, lod,
sto, cal, inte,
jmp, jpc,
};
#define fctnum 8
/*虚拟机结构代码*/
struct instruction
{
/*454*/
enum fct f; // 虚拟机代码指令
int l; //引用层与声明层的层次差
int a; //根据f的不同而不同
};
FILE * fas; //输出名字表
FILE * fa; //输出虚拟机代码
FILE * fa1; //输出源文件及其各行对应的首地址
FILE * fa2; //输出结果
bool listswitch; //显示虚拟机代码与否
bool tableswitch; //显示名字与否
char ch; //获取字符的缓冲区,getch使用
enum symbol sym; //当前的符号
char id[al+1]; //当前ident,多出的一个字节用于存放0
int num; //当前number
int cc,ll; //getch使用的计数器,cc表示当前字符(ch)的位置
int cx; //虚拟机代码指针,取值范围[0,cxmax-1]
char line[81]; //读取行缓冲区
char a[al+1]; //临时符号,多出的一个字节用于存放0
struct instruction code[cxmax]; //存放虚拟机代码的数组
char word[norw][al]; //保留字
enum symbol wsym[norw]; //保留字对应的符号值
enum symbol ssym[256]; //单字符的符号值
char mnemonic[fctnum][5]; //虚拟机代码指令名称
bool declbegsys[symnum]; //表示声明开始的符号集合
bool statbegsys[symnum]; //表示语句开始的符号集合
bool facbegsys[symnum]; //表示因子开始的符号集合
//名字表结构
struct tablestruct
{
char name[al]; //名字
enum object kind; //类型:const,var,array or procedure
int val; //数值,仅const使用
int level; //所须层,仅const不能用
int adr; //地址,仅const不能用
int size; //需要分配的数据空间,仅procedure使用
};
struct tablestruct table[txmax]; //名字表
FILE * fin;
FILE * fout;
char fname[al];
int err; //错误计数器
//当函数中发生fatal error时,返回-1告知调用它的函数,最终退出程序
#define getsymdo if(-1==getsym()) return -1
#define getchdo if(-1==getch()) return -1
#define testdo(a,b,c) if(-1==test(a,b,c)) return -1
#define gendo(a,b,c) if(-1==gen(a,b,c)) return -1
#define expressiondo(a,b,c) if(-1==expression(a,b,c)) return -1
#define factordo(a,b,c) if(-1==factor(a,b,c)) return -1
#define termdo(a,b,c) if(-1==term(a,b,c)) return -1
#define conditiondo(a,b,c) if(-1==condition(a,b,c)) return -1
#define statementdo(a,b,c) if(-1==statement(a,b,c)) return -1
#define constdeclarationdo(a,b,c) if(-1==constdeclaration(a,b,c)) return -1
#define vardeclarationdo(a,b,c) if(-1==vardeclaration(a,b,c)) return -1
void error(int n);
int getsym();
int getch();
void init();
int gen(enum fct x,int y ,int z);
int test(bool *s1,bool *s2,int n);
int inset(int e,bool *s);
int addset(bool *str,bool * s1,bool * s2,int n);
int subset(bool *str,bool * s1,bool * s2,int n);
int mulset(bool *str,bool * s1,bool * s2,int n);
int block(int lev,int tx,bool * fsys);
void interpret();
int factor(bool * fsys,int * ptx,int lev);
int term(bool * fsys,int * ptx,int lev);
int condition(bool * fsys,int * ptx,int lev);
int expression(bool * fsys,int * ptx,int lev);
int statement(bool * fsys,int * ptx,int lev);
void listcode(int cx0);
int vardeclaration(int *ptr, int lev,int *ptx);
int constdeclaration(int *ptr, int lev,int *ptx);
int position(char * idt,int tx);
void enter(enum object k,int * ptx,int lev, int * pdx);
int base(int l,int * s,int b)
Platform: |
Size: 25139 |
Author: xqq771084591 |
Hits:
Description: 一个简单的Email收发工具-a simple tool Email TX
Platform: |
Size: 1974272 |
Author: 温尔士 |
Hits:
Description: 短消息收发程序,简单易懂-SMS transceiver procedures, simple
Platform: |
Size: 1921024 |
Author: |
Hits:
Description: 类似于foxmail得邮件编写 收发程序-similar to the mail I in the preparation of procedures TX
Platform: |
Size: 5233664 |
Author: 温靖 |
Hits:
Description: 基于EVC的wince下的TCP消息收发程序,可以与PC机或装WINCE的系统进行TCP通讯,聊天。-based EVC wince under the TCP news TX procedures, with the PC or the installation of the system WINCE TCP communications and chat.
Platform: |
Size: 166912 |
Author: cliburn |
Hits:
Description: 郭天祥TX-1C的USB开发板原码,内有驱动文件,固件程序-郭天祥TX-1C of USB development board the original code, there are driver files, firmware
Platform: |
Size: 3088384 |
Author: 江天珠 |
Hits:
Description: TX-1B DS18B20温度传感器可在电脑上显示-TX-1B DS18B20 temperature sensor can be displayed on the computer
Platform: |
Size: 6493184 |
Author: Mark |
Hits:
Description: TX-1开发板的Proteus仿真(大部分功能)-TX-1 development board of the Proteus simulation (most features)
Platform: |
Size: 24576 |
Author: 罗 |
Hits:
Description: 赠送两个学生毕业设计,里面包含USB开发资料-Presented two students graduated from the design, which contains information on USB Development
Platform: |
Size: 5335040 |
Author: 温耀军 |
Hits:
Description: 天翔开发板的所有程序和一些我自己整理的小程序模块。嘿嘿我是初学者,有什么好东西一起交流分享。有些改进的请大家提意见-Tianxiang development board for all programs and some of my finishing a small program modules. Hei hei I am a beginner, what with the exchange of good things to share. Some comments for improvement please
Platform: |
Size: 7134208 |
Author: 陈志卿 |
Hits:
Description: 此压缩包里有单片机学习的18B20、串口等许多有用程序,程序简单容易懂。-The compression bag with MCU learning 18B20, serial port and many other useful programs, the program is simple and easy to understand.
Platform: |
Size: 6800384 |
Author: 李大伟 |
Hits:
Description: 郭天祥AX-1开发板原理图,DSN格式,可以有效地帮助初学者在不购买实物的情况下,通过PROTEUS进行仿真学习,非常方便;-GuoTianXiang AX- 1 development board diagram, DSN format, can effectively help beginners in not buy real situation, PROTEUS through simulation study, very convenient,
Platform: |
Size: 35840 |
Author: jack |
Hits:
Description: 用蚁群算法和贪心算法解决0/1背包问题。可用于不同算法的比较。-Solving 0/1 Knapsack Problem by ant colony algorithm and greed method.Can be used to compare two algorithms.
Platform: |
Size: 536576 |
Author: wangnan |
Hits:
Description: TX-1C 开发板 PDIUSBD12 驱动开发包-TX-1C board PDIUSBD12 Driver Development Kit
Platform: |
Size: 9149440 |
Author: 刘建军 |
Hits:
Description: 郭天祥TX-1C开发板 PDIUSBD12驱动C程序-Debates TX-1C development board PDIUSBD12 drive C program
Platform: |
Size: 10157056 |
Author: |
Hits:
Description: TX-1.dsn仿真学习板 郭天祥的开发板-TX-1.dsn simulation learning board
Platform: |
Size: 35840 |
Author: leolee987 |
Hits:
« 12
3
4
5
6
7
8
9
10
...
50
»