1 / 6

融入課程名稱 : LED 原理與應用 融入課程單元 : 函式的呼叫 授課教師 : 吳敏生

計畫名稱 : 1. 雷射技術應用於高亮度 LED 製程之開發 ( 產學計畫 )( 國科會計畫 ,執行期間 99/4/1 ~ 100/9/30 ). 融入課程名稱 : LED 原理與應用 融入課程單元 : 函式的呼叫 授課教師 : 吳敏生. 目錄. 研究融入教學說明 研究計劃報告封面. 本研究的演算法利用 C 語言實現,部分程式融入程式語言 - 「函式的呼叫」之教學. #include <stdio.h> #include <math.h> #include "fractal_proc.h" #include "image_lib.h"

anevay
Télécharger la présentation

融入課程名稱 : LED 原理與應用 融入課程單元 : 函式的呼叫 授課教師 : 吳敏生

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 計畫名稱:1.雷射技術應用於高亮度LED製程之開發(產學計畫)(國科會計畫,執行期間99/4/1~100/9/30)計畫名稱:1.雷射技術應用於高亮度LED製程之開發(產學計畫)(國科會計畫,執行期間99/4/1~100/9/30) 融入課程名稱: LED原理與應用 融入課程單元:函式的呼叫 授課教師: 吳敏生

  2. 目錄 • 研究融入教學說明 • 研究計劃報告封面

  3. 本研究的演算法利用C語言實現,部分程式融入程式語言-「函式的呼叫」之教學本研究的演算法利用C語言實現,部分程式融入程式語言-「函式的呼叫」之教學 #include <stdio.h> #include <math.h> #include "fractal_proc.h" #include "image_lib.h" #define pi 3.14159 前置處理區 double F10(int *v,int rbsz); double F01(int *v,int rbsz); 函數宣告 FILE *ffp; ffp=fopen(fname,"w"); int i,j,k; int *v; float domain_DCT[58081][2],domain_DCT_normal[58081][2]; 變數宣告

  4. for(j=0;j<h-rbsz*2+1;j++) //h-rbsz*2+1 { for(i=0;i<w-rbsz*2+1;i++) //w-rbsz*2+1 { block_get(f,w,h,u2,rbsz*2,rbsz*2,i,j); sample_down(u2,rbsz*2,rbsz*2,u); f10=F10(u,rbsz); f01=F01(u,rbsz); domain_DCT[j*(w-rbsz*2+1)+i][0]=f10; domain_DCT[j*(w-rbsz*2+1)+i][1]=f01; } } 迴圈的使用 函式呼叫 當程式執行函式呼叫後,將會中斷主程式的執行,跳至函式本體的地方去執行函式的內容,當函式執行完後會回到原先呼叫的地方繼續執行主程式的程式。 double F10(int *vv,int rbsz) { double F[8]={0},f10=0; int i,j; for(i=0;i<rbsz;i++) {for(j=0;j<rbsz;j++) F[i]+=*(vv+i+8*j); f10+=F[i]*cos((2*i+1)*3.14159/16); } f10=(sqrt(2)/8)*f10; return fabs(f10); } 函式本體 函式返回

More Related