-
FFT,即為快速傅氏變換,是離散傅氏變換的快速算法,它是根據離散傅氏變換的奇、偶、虛、實等特性,對離散傅立葉變換的算法進行改進獲得的。它對傅氏變換的理論并沒有新的發現,但是對于在計算機系統或者說數字系統中應用離散傅立葉變換,可以說是進了一大步。 設x(n)為N項的復數序列,由DFT變換,任一X(m)的計算都需要N次復數乘法和N-1次復數加法,而一次復數乘法等于四次實數乘法和兩次實數加法,
標簽:
FFT
上傳時間:
2013-12-29
上傳用戶:13517191407
-
RSA ( Rivest Shamir Adleman )is crypthograph system that used to give a secret information and digital signature . Its security based on Integer Factorization Problem (IFP). RSA uses an asymetric key. RSA was created by Rivest, Shamir, and Adleman in 1977. Every user have a pair of key, public key and private key. Public key (e) . You may choose any number for e with these requirements, 1< e <Æ (n), where Æ (n)= (p-1) (q-1) ( p and q are first-rate), gcd (e,Æ (n))=1 (gcd= greatest common divisor). Private key (d). d=(1/e) mod(Æ (n)) Encyption (C) . C=Mª mod(n), a = e (public key), n=pq Descryption (D) . D=C° mod(n), o = d (private key
標簽:
crypthograph
information
Adleman
Rivest
上傳時間:
2017-09-01
上傳用戶:chfanjiang
-
某市進行了一次英語競賽,一共有N個人報名參加(N<1000000),按照報名順序分別是1號~N號。英語競賽的得分范圍是0~100分,可能會有0.5分存在。現在給你N的值和按照號碼排列的得分,要求輸出第一名的號碼。若是有并列第一名則需要同屬輸出多個第一名的號碼。
標簽:
C語言代碼
上傳時間:
2016-03-29
上傳用戶:我是鑫鑫
-
輸入N*N(N<100)的矩陣,輸出它的轉置矩陣。
第一行為整數N。
接著是一個N*N的矩陣
標簽:
矩陣轉置
上傳時間:
2016-03-29
上傳用戶:我是鑫鑫
-
簡單命令使用grep等的使用
[zorro@isch ~]$ history
1 ifconfig
2 su
3 exit
4 ls
5 cd Desktop/
6 ls
7 tar zxcf VMwareTools-8.4.5-324285.tar.gz
8 tar zxvf VMwareTools-8.4.5-324285.tar.gz
9 cd vmware-tools-distrib/
10 ls
11 ./vmware-install.pl
12 su
13 ls
14 cd ..
15 ls
16 rm VMwareTools-8.4.5-324285.tar.gz
17 rm -r vmware-tools-distrib
18 ls
19 make
20 ls
21 cd redis/
22 quit
23 ls
24 ca redis/
25 cd redis/
26 cd redis-2.8.17
27 make
28 cd redis-2.8.17
29 ls
30 cd redis-2.8.17
31 cd str
32 cd src
33 ls
34 ./redis-cli
35 ls
36 cd redis-2.8.17 tar.gz
37 make
38 cd src
39 ./redis-server .. /redis.conf
40 ./redis-cli
41 ./redis-server ../redis.conf
42 vi test1.sh
43 ./test1.sh
44 vi test.sh
45 ./test.sh
46 ls
47 chmod 777 test.sh
48 ./test.sh
49 vi express
50 $ grep –n ‘the’ express
51 clear
52 grep -n 'the' express
53 vi express
54 grep -n 'the' express
55 grep -vn 'the'express
56 grep -vn 'the' express
57 grep -in 'the' express
58 vi test2.c
59 grep -l 'the' *.c
60 grep -n 't[ae]st' express
61 grep -n 'oo' express
62 grep -n '[^g]oo' express
63 grep -n '[a^z]oo' express
64 grep -n '[0^9]' express
65 grep -n '^the' express
66 vi express
67 sed -e 'd' express
68 sed -e '1d' express
69 sed -e '1~7d' express
70 sed -e '$d' express
71 sed -e '1,/^$/d' express
72 ls
73 cd
74 pwd
75 history
[zorro@isch ~]$
標簽:
簡單命令使用
上傳時間:
2016-05-24
上傳用戶:12345678gan
-
#include <malloc.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define NULL 0
#define MaxSize 30
typedef struct athletestruct /*運動員*/
{
char name[20];
int score; /*分數*/
int range; /**/
int item; /*項目*/
}ATH;
typedef struct schoolstruct /*學校*/
{
int count; /*編號*/
int serial; /**/
int menscore; /*男選手分數*/
int womenscore; /*女選手分數*/
int totalscore; /*總分*/
ATH athlete[MaxSize]; /**/
struct schoolstruct *next;
}SCH;
int nsc,msp,wsp;
int ntsp;
int i,j;
int overgame;
int serial,range;
int n;
SCH *head,*pfirst,*psecond;
int *phead=NULL,*pafirst=NULL,*pasecond=NULL;
void create();
void input ()
{
char answer;
head = (SCH *)malloc(sizeof(SCH)); /**/
head->next = NULL;
pfirst = head;
answer = 'y';
while ( answer == 'y' )
{
Is_Game_DoMain:
printf("\nGET Top 5 when odd\nGET Top 3 when even");
printf("\n輸入運動項目序號 (x<=%d):",ntsp);
scanf("%d",pafirst);
overgame = *pafirst;
if ( pafirst != phead )
{
for ( pasecond = phead ; pasecond < pafirst ; pasecond ++ )
{
if ( overgame == *pasecond )
{
printf("\n這個項目已經存在請選擇其他的數字\n");
goto Is_Game_DoMain;
}
}
}
pafirst = pafirst + 1;
if ( overgame > ntsp )
{
printf("\n項目不存在");
printf("\n請重新輸入");
goto Is_Game_DoMain;
}
switch ( overgame%2 )
{
case 0: n = 3;break;
case 1: n = 5;break;
}
for ( i = 1 ; i <= n ; i++ )
{
Is_Serial_DoMain:
printf("\n輸入序號 of the NO.%d (0<x<=%d): ",i,nsc);
scanf("%d",&serial);
if ( serial > nsc )
{
printf("\n超過學校數目,請重新輸入");
goto Is_Serial_DoMain;
}
if ( head->next == NULL )
{
create();
}
psecond = head->next ;
while ( psecond != NULL )
{
if ( psecond->serial == serial )
{
pfirst = psecond;
pfirst->count = pfirst->count + 1;
goto Store_Data;
}
else
{
psecond = psecond->next;
}
}
create();
Store_Data:
pfirst->athlete[pfirst->count].item = overgame;
pfirst->athlete[pfirst->count].range = i;
pfirst->serial = serial;
printf("Input name:) : ");
scanf("%s",pfirst->athlete[pfirst->count].name);
}
printf("\n繼續輸入運動項目(y&n)?");
answer = getchar();
printf("\n");
}
}
void calculate() /**/
{
pfirst = head->next;
while ( pfirst->next != NULL )
{
for (i=1;i<=pfirst->count;i++)
{
if ( pfirst->athlete[i].item % 2 == 0 )
{
switch (pfirst->athlete[i].range)
{
case 1:pfirst->athlete[i].score = 5;break;
case 2:pfirst->athlete[i].score = 3;break;
case 3:pfirst->athlete[i].score = 2;break;
}
}
else
{
switch (pfirst->athlete[i].range)
{
case 1:pfirst->athlete[i].score = 7;break;
case 2:pfirst->athlete[i].score = 5;break;
case 3:pfirst->athlete[i].score = 3;break;
case 4:pfirst->athlete[i].score = 2;break;
case 5:pfirst->athlete[i].score = 1;break;
}
}
if ( pfirst->athlete[i].item <=msp )
{
pfirst->menscore = pfirst->menscore + pfirst->athlete[i].score;
}
else
{
pfirst->womenscore = pfirst->womenscore + pfirst->athlete[i].score;
}
}
pfirst->totalscore = pfirst->menscore + pfirst->womenscore;
pfirst = pfirst->next;
}
}
void output()
{
pfirst = head->next;
psecond = head->next;
while ( pfirst->next != NULL )
{
// clrscr();
printf("\n第%d號學校的結果成績:",pfirst->serial);
printf("\n\n項目的數目\t學校的名字\t分數");
for (i=1;i<=ntsp;i++)
{
for (j=1;j<=pfirst->count;j++)
{
if ( pfirst->athlete[j].item == i )
{
printf("\n %d\t\t\t\t\t\t%s\n %d",i,pfirst->athlete[j].name,pfirst->athlete[j].score);break;
}
}
}
printf("\n\n\n\t\t\t\t\t\t按任意建 進入下一頁");
getchar();
pfirst = pfirst->next;
}
// clrscr();
printf("\n運動會結果:\n\n學校編號\t男運動員成績\t女運動員成績\t總分");
pfirst = head->next;
while ( pfirst->next != NULL )
{
printf("\n %d\t\t %d\t\t %d\t\t %d",pfirst->serial,pfirst->menscore,pfirst->womenscore,pfirst->totalscore);
pfirst = pfirst->next;
}
printf("\n\n\n\t\t\t\t\t\t\t按任意建結束");
getchar();
}
void create()
{
pfirst = (struct schoolstruct *)malloc(sizeof(struct schoolstruct));
pfirst->next = head->next ;
head->next = pfirst ;
pfirst->count = 1;
pfirst->menscore = 0;
pfirst->womenscore = 0;
pfirst->totalscore = 0;
}
void Save()
{FILE *fp;
if((fp = fopen("school.dat","wb"))==NULL)
{printf("can't open school.dat\n");
fclose(fp);
return;
}
fwrite(pfirst,sizeof(SCH),10,fp);
fclose(fp);
printf("文件已經成功保存\n");
}
void main()
{
system("cls");
printf("\n\t\t\t 運動會分數統計\n");
printf("輸入學校數目 (x>= 5):");
scanf("%d",&nsc);
printf("輸入男選手的項目(x<=20):");
scanf("%d",&msp);
printf("輸入女選手項目(<=20):");
scanf("%d",&wsp);
ntsp = msp + wsp;
phead = (int *)calloc(ntsp,sizeof(int));
pafirst = phead;
pasecond = phead;
input();
calculate();
output();
Save();
}
標簽:
源代碼
上傳時間:
2016-12-28
上傳用戶:150501
-
#include <iostream.h>
#include <string.h>
#include <iomanip.h>
#include "Stud.h"
Stud::Stud(){}
char *Stud::getno() //獲取學號
{
return no;
}
char *Stud::getname() //獲取姓名
{
return name;
}
char *Stud::getsex() //獲取性別
{
return sex;
}
char *Stud::getminzu() //獲取民族
{
return minzu;
}
char *Stud::getaddress() //獲取出生地
{
return address;
}
char *Stud::getbirth() //獲取出生年月
{
return birth;
}
int Stud::gettag() //獲取姓名
{
return tag;
}
void Stud::changeno(char n[]) //設置學號
{
strcpy(no,n);
}
void Stud::changename(char na[]) //設置姓名
{
strcpy(name,na);
}
void Stud::changesex(char s[]) //設置性別
{
strcpy(sex,s);
}
void Stud::changeminzu(char m[]) //設置民族
{
strcpy(minzu,m);
}
void Stud::changeaddress(char a[]) //設置出生地
{
strcpy(address,a);
}
void Stud::changebirth(char b[]) //設置出生年月
{
strcpy(birth,b);
}
void Stud::addstudent(char *rn,char *rna) //增加學生
{
strcpy(no,rn);
strcpy(name,rna);
}
void Stud::addstudent(char *rn,char *rna,char *rs,char *rm,char *ra,char *rb) //增加學生
{
tag=0;
strcpy(no,rn);
strcpy(name,rna);
strcpy(sex,rs);
strcpy(minzu,rm);
strcpy(address,ra);
strcpy(birth,rb);
}
void Stud::delstud() //設置刪除標記
{
tag=1;
}
void Stud::disp() //輸出學生信息
{
cout<<setw(15)<<no<<setw(10)<<name<<setw(10)<<sex<<setw(10)<<minzu<<setw(10)<<address<<setw(10)<<birth<<endl;
}
void Stud::display() //輸出學生信息
{
cout<<setw(15)<<no<<setw(10)<<name;
}
標簽:
學生
上傳時間:
2016-12-29
上傳用戶:767483511
-
module M_GAUSS
!高斯列主元消去法模塊
contains
subroutine LINEQ(A,B,X,N)
!高斯列主元消去法
implicit real*8(A-Z)
integer::I,K,N
integer::ID_MAX !主元素標號
real*8::A(N,N),B(N),X(N)
real*8::AUP(N,N),BUP(N)
!A,B為增廣矩陣
real*8::AB(N,N+1)
real*8::VTEMP1(N+1),VTEMP2(N+1)
AB(1:N,1:N)=A
AB(:,N+1)=B
標簽:
fortan
Newton
程序
數值分析
方程
非線性
上傳時間:
2018-06-15
上傳用戶:answer123
-
:消落帶土壤由于在水陸交替的特殊生境和復雜的地球化學共同作用下形成,具有獨特的理化性質和生態功能。各營養鹽
含量在時間和空間上具有較高的變異性,土壤中有機質的分布及遷移和轉化均受到復雜的影響。針對官廳水庫流域上游媯水
河段消落帶,選擇典型消落帶落水區,對該區土壤有機質含量的時空分布特征進行研究。結果表明:1)研究區消落帶土壤有機
質含量較為貧瘠,變化范圍在1.64—26∥蠅之間,平均值僅為13.169/kg,變異系數達50.59%。說明消落帶由于季節性干濕交
替的特殊水文條件的影響,土壤養分的分布具有較高的空間異質性。淹水頻繁區有機質含量平均值為15.74∥婦,高于長期出
露區的10.12∥k,且變異系數為41.38%,小于長期出露區的54.98%。說明淹水頻繁區對土壤養分的持留能力更強,且周期性
的淹水條件使得研究區近岸具有相似的生境類型,不同采樣點土壤有機質含量的差異相對較小。2)不同植物群落下.蘆葦和
香蒲群落土壤有機質含量最高,平均值為17.089/kg;含量最低的是以小葉楊和白羊草為主的中旱生植物帶,平均值為9.12,∥
kg;其次是酸模葉蓼、大刺兒菜為優勢物種的濕生植物帶,土壤有機質含量平均值為15.499/kg。3)不同土壤層次有機質含量差
異較大,總體變化趨勢均由表層向下逐漸減少,各層之間體現出顯著差異性(P<0.05)。研究區土壤C/N變化范圍在1.64—
18.95,平均值為8.95。說明研究區土壤碳氮比相對較低,有機質的腐殖化程度較高,且長期出露區土壤有機質更容易發生分
解,C的累積速度遠小于N。土壤C/N垂直分布大致呈先增大后減小趨勢,在30cm處達到最大值,而后隨著土壤深度的增加逐
漸減小。4)消落帶土壤有機質分布的影響因素分析中,土壤有機質與全磷呈極顯著正相關,相關系數為0.62(P<0.01):與土壤
全氮和C/N呈顯著正相關(R=0.57,O.60;P<0.05)。這說明研究區土壤全磷、全氮、C/N和有機質明顯具有相同的變化趨勢.和
有機質存在相互影響。其次,土壤有機質和濕度在呈顯著負相關(R=一O.51;P<0.05),表明研究區土壤濕度對有機質含量具有
顯著的影響。氣候因子中,溫度對研究區土壤有機質的分布具有顯著的影響,相關系數為一0.51(P<0.05)。植被因子中.植被
覆蓋度和土壤有機質含量呈顯著正相關,相關系數為0.64,表明植被因子也是影響土壤有機質分布的重要因素之一。
標簽:
水庫
分布
特征
上傳時間:
2018-08-13
上傳用戶:閩外莯莯
-
% Computation of ST-ZCR and STE of a speech signal.
%
% Functions required: zerocross, sgn, winconv.
%
% Author: Nabin Sharma
% Date: 2009/03/15
[x,Fs] = wavread('so.wav'); % word is: so
x = x.';
N = length(x); % signal length
n = 0:N-1;
ts = n*(1/Fs); % time for signal
% define the window
wintype = 'rectwin';
winlen = 201;
winamp = [0.5,1]*(1/winlen);
標簽:
短時過零率和短時能量
上傳時間:
2019-09-23
上傳用戶:minwenji