function y=lagr(x0,y0,x) %x0,y0為節點 %x是插值點 n=length(x0); m=length(x); for i=1:m z=x(i); s=0.0; for k=1:n p=1.0; for j=1:n if j~=k p=p*(z-x0(j))/(x0(k)-x0(j)); end end s=p*y0(k)+s; end y(i)=s; end
標簽: lagr
上傳時間: 2020-06-09
上傳用戶:shiyc2020
P P I I CK I I T T3 3 使用 說明--- - 連機 、 脫 機操作試用 MPLAB IDE 軟件一 、 P P I I C CK K I I T3 接 口說 明, , 硬 件 二 、 P P I I C CK K I I T3 連 接 電腦 MPL L AB I I DE 聯機三 、 聯機四 、聯機讀芯片程序五 、 脫機 燒寫 調試
上傳時間: 2022-03-24
上傳用戶:
ADT串的實現:主要包括以下操作:§ copy(s1,s2)把串s1復制到s2 § concat(s,s1,s2)連接S1,S2,結果放在S中 § delete(s,i,j)將串s中從第i個字符開始的連續j個字符刪除,如果i+j>s.len則一直刪除到串尾 § insert(s,s1,i)將串S1插入串S的第i個字符后
上傳時間: 2013-12-11
上傳用戶:奇奇奔奔
算法ebook(10部算法經典著作的合集) 算法ebook> 10部算法經典著作的合集 chm格式 (1)Fundamentals of Data Structures by Ellis Horowitz and Sartaj Sahni (2)Data Structures, Algorithms and Program Style Using C by James F. Korsh and Leonard J. Garrett (3)Data Structures and Algorithm Analysis in C by Mark Allen Weiss (4)Data Structures: From Arrays to Priority Queues by Wayne Amsbury (5)Information Retrieval: Data Structures & Algorithms edited by William B. Frakes and Ricardo Baeza-Yates (6)Introduction to Algorithms by Thomas H. Cormen, Charles E. Leiserson, and Ronald L. Rivest (7)Practical Data Structures in C++ by Bryan Flamig (8)Reliable Data Structures in C by Thomas Plum (9)Data Structures and Algorithms Alfred V. Aho, Bell Laboratories, Murray Hill, New Jersey John E. Hopcroft, Cornell University, Ithaca, New York Jeffrey D. Ullman, Stanford University, Stanford, California (10)DDJ Algorithms and Data Structures Articles
標簽: ebook Fundamentals Structures Ellis
上傳時間: 2015-04-04
上傳用戶:tfyt
This a very simple baseband simulator for SC-FDMA system. This simulator is part of the upcoming book “Single Carrier FDMA: A New Air Interface for Long Term Evolution” (Wiley, Nov. 2008) which I co-authored with professor David J. Goodman at Polytechnic University. The purpose of this simulator is to give some concrete idea of how SC-FDMA system works. It does lack many realistic and sophisticated features such as channel coding, time-varying fading channel model, soft decision decoding, etc. Regardless, I am hoping that it will help you understand SC-FDMA which is a fairly new development in 3GPP LTE.
標簽: simulator This baseband upcoming
上傳時間: 2016-08-26
上傳用戶:小草123
Visual 開發 希望對你們有幫助 public static int Rom(int n, int m)//雙寄或雙偶 { int count = 0 //第一排Y坐標上要幾個 if (n < m) { for (int i = 1 i <= n i = i + 2) { count++ } } else { for (int j = 1 j <= m j = j + 2) { count++ } } return count }
上傳時間: 2013-12-13
上傳用戶:懶龍1988
設某物質有m個產地,n個銷地,如果以 aij 表示由第 i 個產地銷往第 j 個銷地的數量,則這類物質的調運方案,可用一個數表表示如下
標簽:
上傳時間: 2013-12-21
上傳用戶:yuanyuan123
void DFS(MGraph G, int i) { int j; visited[i] = TRUE; printf("%c ", G.vexs[i]); for (j=0; j<G.numVertexes; ++j) { if (G.arc[i][j]!=INFINITY && !visited[j]) DFS(G, j); } }
上傳時間: 2016-12-28
上傳用戶:chenyameng
本源代碼是基于STM32F4xx硬件平臺設計的貪吃蛇小游戲,主要難點在:隨機點產生、貪吃蛇轉向、貪吃蛇貪吃點;本部分主要接收產生隨機點,產生隨機點需要注意兩個方面:1、隨機點在有效的范圍內;2、貪吃點與貪吃蛇不重合。產生隨機點主要有兩個函數,分別如下://隨機數產生任務void rng_chansheng(void *p_arg){OS_ERR err;while(1){OSSemPend(&RNG_SEM,0,OS_OPT_PEND_BLOCKING,0,&err);zou.x = RNG_Get_RandomRange(0,50)*8 + 40;zou.y = RNG_Get_RandomRange(0,50)*8 + 260;lcd_fangkuan(zou.x,zou.y,zou.x+SHE_FAANGKUAN_SIZE,zou.y+SHE_FAANGKUAN_SIZE);OSTimeDlyHMSM(0,0,0,500,OS_OPT_TIME_HMSM_STRICT,&err); //延時500ms}}//往下方向畫一個實心的正方形,代表貪食蛇的一段void lcd_fangkuan(u16 x1,u16 y1,u16 x2 ,u16 y2){u16 i,j;u16 xx,yy;if(((x2 - x1) != SHE_FAANGKUAN_SIZE)||((y2 - y1) != SHE_FAANGKUAN_SIZE))return ;if(x1 > x2) {xx = x1;x1 = x2;x2 = xx;}if(y1 > y2){yy = y1;y1 = y2;y2 = yy;}if((y1 < 260)|| (y2 > 660)||(x1 < 40)||(x2 > 448)){game_yun_error = 1;LCD_ShowString(150,300,500,24,24,"GAME OVER!!");return ;}for(i=x1; i<x2; i++){for(j=y1; j<y2; j++){LCD_DrawPoint(i,j);}}}
上傳時間: 2022-08-10
上傳用戶:
Programming Windows程式開發設計指南
標簽: Programming Windows 程式
上傳時間: 2015-03-18
上傳用戶:agent