第一章關鍵字...................................................................................................................................9 1.1,最寬恒大量的關鍵字----auto..........................................................................................11 1.2,最快的關鍵字---- register............................................................................................... 11 1.2.1,皇帝身邊的小太監----寄存器............................................................................. 11 1.2.2,使用register 修飾符的注意點.............................................................................11 1.3,最名不符實的關鍵字----static........................................................................................12 1.3.1,修飾變量...............................................................................................................12 1.3.2,修飾函數...............................................................................................................13 1.4,基本數據類型----short、int、long、char、float、double........................................... 13 1.4.1,數據類型與“模子”............................................................................................... 14 1.4.2,變量的命名規則...................................................................................................14 1.5,最冤枉的關鍵字----sizeof...............................................................................................18 1.5.1,常年被人誤認為函數...........................................................................................18 1.5.2,sizeof(int)*p 表示什么意思?........................................................................18 1.4,SIGNED、unSIGNED 關鍵字................................................................................................19 1.6,if、else 組合.................................................................................................................... 20 1.6.1,bool 變量與“零值”進行比較...............................................................................20 1.6.2, float 變量與“零值”進行比較.................................................................................21 1.6.3,指針變量與“零值”進行比較...............................................................................21 1.6.4,else 到底與哪個if 配對呢?...............................................................................22 1.6.5,if 語句后面的分號............................................................................................... 23 1.6.6,使用if 語句的其他注意事項.............................................................................. 24 1.7,switch、case 組合........................................................................................................... 24 1.7.1,不要拿青龍偃月刀去削蘋果.............................................................................. 24 1.7.2,case 關鍵字后面的值有什么要求嗎?.............................................................. 25 1.7.3,case 語句的排列順序...........................................................................................25 1.7.4,使用case 語句的其他注意事項..........................................................................27 1.8,do、while、for 關鍵字................................................................................................... 28 1.8.1,break 與continue 的區別.....................................................................................28 1.8.2,循環語句的注意點...............................................................................................29 1.9,goto 關鍵字......................................................................................................................30 1.10,void 關鍵字....................................................................................................................31 1.10.1,void a?............................................................................................................31 1.10,return 關鍵字................................................................................................................. 34 1.11,const 關鍵字也許該被替換為readolny....................................................................... 34 1.11.2,節省空間,避免不必要的內存分配,同時提高效率.................................... 35 1.12,最易變的關鍵字----volatile.......................................................................................... 36 1.13,最會帶帽子的關鍵字----extern.................................................................................... 37 1.14,struct 關鍵字..................................................................................................................38
標簽: c語言深度剖析
上傳時間: 2015-05-01
上傳用戶:cascas
matlab有限元網格劃分程序 DistMesh is a simple MATLAB code for generation of unstructured triangular and tetrahedral meshes. It was developed by Per-Olof Persson (now at UC Berkeley) and Gilbert Strang in the Department of Mathematics at MIT. A detailed description of the program is provided in our SIAM Review paper, see documentation below. One reason that the code is short and simple is that the geometries are specified by SIGNED Distance Functions. These give the shortest distance from any point in space to the boundary of the domain. The sign is negative inside the region and positive outside. A simple example is the unit circle in 2-D, which has the distance function d=r-1, where r is the distance from the origin. For more complicated geometries the distance function can be computed by interpolation between values on a grid, a common representation for level set methods. For the actual mesh generation, DistMesh uses the Delaunay triangulation routine in MATLAB and tries to optimize the node locations by a force-based smoothing procedure. The topology is regularly updated by Delaunay. The boundary points are only allowed to move tangentially to the boundary by projections using the distance function. This iterative procedure typically results in very well-shaped meshes. Our aim with this code is simplicity, so that everyone can understand the code and modify it according to their needs. The code is not entirely robust (that is, it might not terminate and return a well-shaped mesh), and it is relatively slow. However, our current research shows that these issues can be resolved in an optimized C++ code, and we believe our simple MATLAB code is important for demonstration of the underlying principles. To use the code, simply download it from below and run it from MATLAB. For a quick demonstration, type "meshdemo2d" or "meshdemond". For more details see the documentation.
標簽: matlab有限元網格劃分程序
上傳時間: 2015-08-12
上傳用戶:凜風拂衣袖
#include <hidef.h> /* common defines and macros */ #include "derivative.h" /* derivative-specific definitions */ #include <mc9s12xs128.h> //定義PID參數 #define VV_KPVALUE 3 //比例 #define VV_KIVALUE 40 //積分 #define VV_KDVALUE 3 //微分 #define VV_MAX 10000 //返回的最大值,是pwm的周期值 #define VV_MIN 0 #define VV_DEADLINE 0X08 //速度PID,設置死區范圍 typedef struct PID //定義數法核心數據 { SIGNED int vi_Ref; //速度PID,速度設定值 SIGNED int vi_FeedBack; //速度PID,速度反饋值
上傳時間: 2016-04-27
上傳用戶:547453159
According to the statistics of the Federal Communications Commission (FCC), temporal and geographical variations in the utilization of the as- SIGNED spectrum range from 15% to 85%. The limited available radio spec- trum and the inefficiency in spectrum usage necessitate a new commu- nication paradigm to exploit the existing spectrum dynamically.
上傳時間: 2020-05-26
上傳用戶:shancjb
VIP專區-嵌入式/單片機編程源碼精選合集系列(157)資源包含以下內容:1. 嵌入式486手冊.2. 奔騰-486處理器指令集手冊.3. 1602液晶顯示程序+1302溫度測量+18b20顯示時間(C語言).4. 51寫的SLE4442程序實驗用的SLE4442卡初始密碼PSC1、PSC2、PSC3均為0FFH.5. 語音芯片的驅動程序.6. 嵌入式平臺入門--嵌入式系統內存泄漏的檢查和預防.7. 從PCI一直講到PCI EXPRESS的文章.8. 基于TMS320F2812的工控實時時鐘.9. 新代數控系統.10. S3C2442 官方 原理圖 網上收集的一份原理圖!.11. 高級數據鏈路控制(HDLC)協議的介紹文檔.12. ARMSYS實驗二十四:FAT16文件系統的移植與應用 描述:對Nandflash進行格式化.13. pxa270 的bootloader源碼.14. ds1302源程序 (為輔試驗箱調試通過).15. FPGA開發板的原理圖很詳細的.16. HT單片機模擬I2C通訊.17. easy web build on NXP LPC2300 LPc2400.18. 藍牙耳機的SCH,與PCB圖,可適合于自己動手的朋友們進行創作..19. ti的12位AD采集c實現.20. wince 下測試串口.21. 本系列所采用的所有技術都將“以實例來定義”.22. 用運算放大器做正弦波振蕩器在學校時老師就教過.23. FPGA/CPLD數字電路設計經驗分享。大唐公司的!.24. NorFlash的燒寫及相關說明可以通過串口實現程序的在線升級.25. 嵌入式操作系統實時性比對與評價,尤其對windowsce性能的測試大有幫助。.26. 東芯IV的SEP3203ARM的源代碼.27. 1702的資料.28. 數字邏輯交通信號燈課程設計代碼請指正.29. C#程序開發范例寶典 圖書光盤附帶源碼 第20章.30. 介紹了嵌入式linux操作系統的知識以及arm編程.31. P,PI D控制系統仿真設計的例子.32. 32位元2進位SIGNED乘法器32位元SIGNED乘法器.33. 用8051單片機和6個數碼管加一片DS1302時鐘芯片做成實用鬧鐘.34. UP-NETARM 2410-S 開發平臺 電路原理圖.35. 通過時鐘芯片計算按鍵開關閉合次數和時間.36. 通過對雙口ram 操作判斷硬件正確性.37. Nokia 3310 驅動程序 ... KeilC.38. MPC03-LV運動控制卡驅動程序.39. 一個51整開發板的應用(源程序電路圖功能全實用給有需要的人).40. I2C : 用C語言編譯的I2C.
上傳時間: 2013-07-21
上傳用戶:eeworm