Sound is simply an airborne version of vibration. The air which carries sound is a mixture of gases. In gases, the molecules contain so much energy that they break free from their neighbors and rush around at high speed. As Figure 1.1(a) shows, the innumerable elastic collisions of these high-speed molecules produce pressure on the walls of any gas container. If left undisturbed in a container at a constant temperature, eventually the pressure throughout would be constant and uniform.
标签: Engineering Audio
上传时间: 2020-06-09
上传用户:shancjb
#include<stdio.h> #define TREEMAX 100 typedef struct BT { char data; BT *lchild; BT *rchild; }BT; BT *CreateTree(); void Preorder(BT *T); void Postorder(BT *T); void Inorder(BT *T); void Leafnum(BT *T); void Nodenum(BT *T); int TreeDepth(BT *T); int count=0; void main() { BT *T=NULL; char ch1,ch2,a; ch1='y'; while(ch1=='y'||ch1=='y') { printf("\n"); printf("\n\t\t 二叉树子系统"); printf("\n\t\t*****************************************"); printf("\n\t\t 1---------建二叉树 "); printf("\n\t\t 2---------先序遍历 "); printf("\n\t\t 3---------中序遍历 "); printf("\n\t\t 4---------后序遍历 "); printf("\n\t\t 5---------求叶子数 "); printf("\n\t\t 6---------求结点数 "); printf("\n\t\t 7---------求树深度 "); printf("\n\t\t 0---------返 回 "); printf("\n\t\t*****************************************"); printf("\n\t\t 请选择菜单号 (0--7)"); scanf("%c",&ch2); getchar(); printf("\n"); switch(ch2) { case'1': printf("\n\t\t请按先序序列输入二叉树的结点:\n"); printf("\n\t\t说明:输入结点(‘0’代表后继结点为空)后按回车。\n"); printf("\n\t\t请输入根结点:"); T=CreateTree(); printf("\n\t\t二叉树成功建立!\n");break; case'2': printf("\n\t\t该二叉树的先序遍历序列为:"); Preorder(T);break; case'3': printf("\n\t\t该二叉树的中序遍历序列为:"); Inorder(T);break; case'4': printf("\n\t\t该二叉树的后序遍历序列为:"); Postorder(T);break; case'5': count=0;Leafnum(T); printf("\n\t\t该二叉树有%d个叶子。\n",count);break; case'6': count=0;Nodenum(T); printf("\n\t\t该二叉树总共有%d个结点。\n",count);break; case'7': printf("\n\t\t该树的深度为:%d",TreeDepth(T)); break; case'0': ch1='n';break; default: printf("\n\t\t***请注意:输入有误!***"); } if(ch2!='0') { printf("\n\n\t\t按【Enter】键继续,按任意键返回主菜单!\n"); a=getchar(); if(a!='\xA') { getchar(); ch1='n'; } } } } BT *CreateTree() { BT *t; char x; scanf("%c",&x); getchar(); if(x=='0') t=NULL; else { t=new BT; t->data=x; printf("\n\t\t请输入%c结点的左子结点:",t->data); t->lchild=CreateTree(); printf("\n\t\t请输入%c结点的右子结点:",t->data); t->rchild=CreateTree(); } return t; } void Preorder(BT *T) { if(T) { printf("%3c",T->data); Preorder(T->lchild); Preorder(T->rchild); } } void Inorder(BT *T) { if(T) { Inorder(T->lchild); printf("%3c",T->data); Inorder(T->rchild); } } void Postorder(BT *T) { if(T) { Postorder(T->lchild); Postorder(T->rchild); printf("%3c",T->data); } } void Leafnum(BT *T) { if(T) { if(T->lchild==NULL&&T->rchild==NULL) count++; Leafnum(T->lchild); Leafnum(T->rchild); } } void Nodenum(BT *T) { if(T) { count++; Nodenum(T->lchild); Nodenum(T->rchild); } } int TreeDepth(BT *T) { int ldep,rdep; if(T==NULL) return 0; else { ldep=TreeDepth(T->lchild); rdep=TreeDepth(T->rchild); if(ldep>rdep) return ldep+1; else return rdep+1; } }
上传时间: 2020-06-11
上传用户:ccccy
#include <stdio.h> #include <stdlib.h> #define SMAX 100 typedef struct SPNode { int i,j,v; }SPNode; struct sparmatrix { int rows,cols,terms; SPNode data [SMAX]; }; sparmatrix CreateSparmatrix() { sparmatrix A; printf("\n\t\t请输入稀疏矩阵的行数,列数和非零元素个数(用逗号隔开):"); scanf("%d,%d,%d",&A.cols,&A.terms); for(int n=0;n<=A.terms-1;n++) { printf("\n\t\t输入非零元素值(格式:行号,列号,值):"); scanf("%d,%d,%d",&A.data[n].i,&A.data[n].j,&A.data[n].v); } return A; } void ShowSparmatrix(sparmatrix A) { int k; printf("\n\t\t"); for(int x=0;x<=A.rows-1;x++) { for(int y=0;y<=A.cols-1;y++) { k=0; for(int n=0;n<=A.terms-1;n++) { if((A.data[n].i-1==x)&&(A.data[n].j-1==y)) { printf("%8d",A.data[n].v); k=1; } } if(k==0) printf("%8d",k); } printf("\n\t\t"); } } void sumsparmatrix(sparmatrix A) { SPNode *p; p=(SPNode*)malloc(sizeof(SPNode)); p->v=0; int k; k=0; printf("\n\t\t"); for(int x=0;x<=A.rows-1;x++) { for(int y=0;y<=A.cols-1;y++) { for(int n=0;n<=A.terms;n++) { if((A.data[n].i==x)&&(A.data[n].j==y)&&(x==y)) { p->v=p->v+A.data[n].v; k=1; } } } printf("\n\t\t"); } if(k==1) printf("\n\t\t对角线元素的和::%d\n",p->v); else printf("\n\t\t对角线元素的和为::0"); } int main() { int ch=1,choice; struct sparmatrix A; A.terms=0; while(ch) { printf("\n"); printf("\n\t\t 稀疏矩阵的三元组系统 "); printf("\n\t\t*********************************"); printf("\n\t\t 1------------创建 "); printf("\n\t\t 2------------显示 "); printf("\n\t\t 3------------求对角线元素和"); printf("\n\t\t 4------------返回 "); printf("\n\t\t*********************************"); printf("\n\t\t请选择菜单号(0-3):"); scanf("%d",&choice); switch(choice) { case 1: A=CreateSparmatrix(); break; case 2: ShowSparmatrix(A); break; case 3: SumSparmatrix(A); break; default: system("cls"); printf("\n\t\t输入错误!请重新输入!\n"); break; } if (choice==1||choice==2||choice==3) { printf("\n\t\t"); system("pause"); system("cls"); } else system("cls"); } }
上传时间: 2020-06-11
上传用户:ccccy
AGV PLC自控程序, AGV PLC自控程序
标签: AGV PLC自控程序
上传时间: 2020-06-24
上传用户:jinjinzhangzhang
#include<iostream> using namespace std; int s=0; int prime(int x){ int i,p=1; for(i=2;i<=x/2;i++){ if(x%i==0){ p=0; break; } } if(p!=0){ cout<<x<< " "; s++; } } int main(){ for (int k=5;k<=100;k++){ prime(k); if(s%5==0) cout<<'\n'; } return 0; }
标签: C++
上传时间: 2020-06-30
上传用户:1274636550
10.2标准版_100站点的免狗补丁(内)
上传时间: 2020-12-15
上传用户:
小波变换用于图像压缩的MATLAB源程序
上传时间: 2020-12-22
上传用户:
如果 PCB 用排线连接,控制排线对应的插头插座必须成直线,不交叉、不扭曲。 连续的 40PIN 排针、排插必须隔开 2mm 以上。 考虑信号流向,合理安排布局,使信号流向尽可能保持一致。 输入、输出元件尽量远离。 电压的元器件应尽量放在调试时手不易触及的地方。 驱动芯片应靠近连接器。 有高频连线的元件尽可能靠近,以减少高频信号的分布参数和电磁干扰。 对于同一功能或模组电路,分立元件靠近芯片放置。 连接器根据实际情况必须尽量靠边放置。 开关电源尽量靠近输入电源座。 BGA 等封装的元器件不应放于 PCB 板正中间等易变形区 BGA 等阵列器件不能放在底面, PLCC 、 QFP 等器件不宜放在底层。 多个电感近距离放置时应相互垂直以消除互感。 元件的放置尽量做到模块化并连线最短。 在保证电气性能的前提下,尽量按照均匀分布、重心平衡、版面美观的标准优化布局。 按电路模块进行布局,实现同一功能的相关电路称为一个模块,电路模块中的元件应采用就近集 中原则,同时数字电路和模拟电路分开; 定位孔、标准孔等非安装孔周围 1.27mm 内不得贴装元、器件,螺钉等安装孔周围 紧固件安装孔、椭圆孔及板中其它方孔外侧距板边的尺寸大于 3mm ; 发热元件不能紧邻导线和热敏元件;高热器件要均衡分布;
上传时间: 2021-06-25
上传用户:xiangshuai
SI-PNP 60 V 0,6 A 0,6 W 100 MHz
标签: 2N2905
上传时间: 2021-07-02
上传用户:xiangshuai
PSP的GIM文件导出工具 gimtools
标签: GimTools
上传时间: 2021-09-04
上传用户:qbkira