steppedchirp子函數產生一個子脈沖數為N的步進頻信號,子脈沖為chirp信號,參數可在Main函數中設置,結果保存在數組y[]中。
標簽: steppedchirp 函數 信號 脈沖
上傳時間: 2013-12-16
上傳用戶:txfyddz
arm2200的蜂鳴器驅動,這里是Main函數,其它啟動代碼不用改
上傳時間: 2014-01-21
上傳用戶:kikye
已知數據文件IN.dat中存有200個四位數,并已調用讀函數rData()把這些數存入數組a中,請編寫函數spellNum(),其功能是:把個位數字和千位數字重新組成一個新的二位數(新二位數的十位數字是原四位數的個位數字,新二位數的個位數字是原四位數的千位數字),以及把百位數字和十位數字組成另一個新的二位數(新二位數的十位數字是原四位數的百位數字,新二位數的個位數字是原四位數的十位數字),如果新組成的兩個二位數一個是奇數,另一個為偶數,并且兩個二位數中至少有一個數能被17整除,同時兩個新數的十位數字均不為0,則將滿足此條件的四位數按從大到小的順序存入數組b中,并要計算滿足上述條件的四位數的個數count。最后Main()函數調用寫函數wData(),把結果count以及數組b中符合條件的四位數輸出到OUT.dat文件中。
上傳時間: 2014-10-29
上傳用戶:李彥東
TdcHintEx Provides your users with a cool transparent hint. It replaces standard Delphi hint window. Just drop a TdcHintEx in your Main form. Set Enabled to True. And run your application. Oh btw, please set ShowHint to True.. :) Drop me a line, and tell me what you think of it. Antony Hoon antony7777@telkom.net
標簽: hint transparent TdcHintEx Provides
上傳時間: 2014-01-12
上傳用戶:181992417
PixelFusion.dsp This file (the project file) contains information at the project level and is used to build a single project or subproject. Other users can share the project (.dsp) file, but they should export the makefiles locally. PixelFusion.h This is the Main header file for the application. It includes other project specific headers (including Resource.h) and declares the CPixelFusionApp application class. PixelFusion.cpp This is the Main application source file that contains the application class CPixelFusionApp. PixelFusion.rc This is a listing of all of the Microsoft Windows resources that the program uses. It includes the icons, bitmaps, and cursors that are stored in the RES subdirectory. This file can be directly edited in Microsoft Visual C++. PixelFusion.clw This file contains information used by ClassWizard to edit existing classes or add new classes. ClassWizard also uses this file to store information needed to create and edit message maps and dialog data maps and to create prototype member functions.
上傳時間: 2015-03-16
上傳用戶:313777423
#include <iostream> using namespace std; int Main(){ int t; cin>>t; while(t--){ long long n; cin>>n; if(n%2==1) cout<<(n*n-1)/4<<endl; else if (n%4==0) cout <<(n*n)/4-1<<endl; else{ if(n==2) cout<<1<<endl; else{ long long k=n/2-1; cout <<k*k+2*k-3<<endl; } } } return 0; }
標簽: 天津大學acm4022 代碼
上傳時間: 2015-04-20
上傳用戶:nr607
兩個鏈表的交集 #include<stdio.h> #include<stdlib.h> typedef struct Node{ int data; struct Node *next; }Node; void initpointer(struct Node *p){ p=NULL; } int printlist(struct Node* head){ int flag=1; head=head->next; /* 因為標記1的地方你用了頭結點,所以第一個數據域無效,應該從下一個頭元結點開始 */ if(head==NULL) printf("NULL\n"); else { while(head!=NULL) { if(flag==1) { printf("%d",head->data); flag=0; } else { printf(" %d",head->data); } head=head->next; } printf("\n"); } return 0; } struct Node *creatlist(struct Node *head) { int n; struct Node *p1=(struct Node *)malloc(sizeof(struct Node)); p1->next=NULL; while(scanf("%d",&n),n!=-1) { struct Node *pnode=(struct Node *)malloc(sizeof(struct Node)); pnode->next=NULL; pnode->data=n; if(head==NULL) head=pnode; p1->next=pnode; p1=pnode; } return head; } struct Node *Intersect(struct Node *head1, struct Node *head2) { struct Node *p1=head1,*p2=head2;/*我這里沒有用頭指針和頭結點,這里是首元結點head1里面就是第一個數據,一定要理解什么事頭指針, 頭結點,和首元結點 具體你一定要看這個博客:http://blog.sina.com.cn/s/blog_71e7e6fb0101lipz.html*/ struct Node *head,*p,*q; head = (struct Node *)malloc(sizeof(struct Node)); head->next = NULL; p = head; while( (p1!=NULL)&&(p2!=NULL) ) { if (p1->data == p2->data) { q = (struct Node *)malloc(sizeof(struct Node)); q->data = p1->data; q->next = NULL; p->next = q;//我可以認為你這里用了頭結點,也就是說第一個數據域無效 **標記1** p = q; p1 = p1->next; p2 = p2->next; } else if (p1->data < p2->data) { p1 = p1->next; } else { p2 = p2->next; } } return head; } int Main() { struct Node *head=NULL,*headt=NULL,*t; //initpointer(head);//這里的函數相當于head=NULL; // initpointer(headt);//上面已經寫了headt=NULL那么這里可以不用調用這個函數 head=creatlist(head); headt=creatlist(headt); t=Intersect(head,headt); printlist(t); }
標簽: c語言編程
上傳時間: 2015-04-27
上傳用戶:coco2017co
1.此代碼基于紅牛開發板,請根據自己的板子進行修改。 2.通過修改網上的代碼實現,修改前的功能開了一個很大的緩存接收app數據,然后一次性全部數據寫入, 但是這個在實際應用中沒多大用,所以修改為一次寫入128個字節。 3.程序flash的偏移地址為0x8010000,所以app編譯前應該在mdk中設置 Option窗口->Target頁->IROM1,start 改為 0x8010000 4.設置中斷向量重映射,我用的方法是在app端的Main函數起始位置添加語句 SCB->VTOR = FLASH_BASE | 0x10000; 5.啟動時如果發現沒有app,會進入bootloader模式(燈全亮),如果發現有程序就要看程序的功能了。 如果有app,但是又想重新升級的話就按住某個鍵(我這里是Tamper),然后按復位,松開復位之前不要松開 按鍵,這樣就會進入bootloader模式。 6.進入bootloader后通過串口1接收升級app數據,bin文件數據,接收完成后按User1鍵進行升級操作,完成后 復位或者按User2鍵可以運行剛寫入的app。
上傳時間: 2015-05-18
上傳用戶:llma2017
#include<stdio.h> #include<stdlib.h> #include<conio.h> #include<string.h> Main(void) { char new_name[4], name[4]; int new_sn ,sn; printf(" 【注冊】\n\n"); printf("請輸入用戶名(四位英文字母):"); scanf("%s", &new_name); printf("請輸入密碼(六位數字):") ; scanf("%d" ,&new_sn); /*system("PAUSE");*/ system("CLS");/*清屏*/ /*system("PAUSE");*/ printf(" 【登陸】\n\n"); printf("輸入用戶名:"); scanf("%s" , &name); if(!strcmp(new_name,name)){printf("輸入用戶名錯誤!"); }/*判斷用戶是否正確*/ printf("輸入密碼:"); scanf("%d" , &sn); if(new_sn != sn){printf("輸入密碼錯誤!"); }/*判斷密碼是否正確*/ system("CLS"); printf("恭喜你,登陸成功!\n"); getchar(); return 0; }
標簽: C語言
上傳時間: 2015-12-30
上傳用戶:gjatd1987
#include<reg51.h> #define uchar unsigned char #define uint unsigned int uint i,j; sbit dula=P2^6; sbit wela=P2^7; uchar code table[]={0x3f,0x06,0x5b,0x4f,0x66,0x6d, 0x7d,0x07,0x7f,0x6f,0x77,0x7c, 0x39,0x5e,0x79,0x71}; void Main() { j=0; i=0; TMOD=0X01; TH0=(65536-50000)/256; TL0=(65536-50000)%6; EA=1; ET0=1; TR0=1; while(1); } void time0() interrupt 1 { TH0=(65536-50000)/256; TL0=(65536-50000)%6; i++; if(i==15) { P0=table[j]; dula=1; dula=0; P0=0XC0; wela=1; wela=0; j++; i=0; if(j==16) { j=0; } } }
標簽: 用定時器以間隔500MS在6位數碼管上依次顯示0、1、 2、3….C、D、E、F,重復。
上傳時間: 2016-02-11
上傳用戶:嬌縱Pamper