C/C++の宿題を片付けます 99代目at TECH
C/C++の宿題を片付けます 99代目 - 暇つぶし2ch89:デフォルトの名無しさん
07/11/07 20:07:16
// >>80 ガウス窓
// gnuplot でやるには plot sin(x)*exp(-x*x/0.03*0.03)
#include <iostream>
#include <math>
#include <fstream>
#define pi 3.141592

int main (void) // window function - Gauss window
{
double x, sigma=0.03;
std::ofstream window("window.csv");

for (x=-pi; x<pi; x+=0.01){
window << x << ", " << sin(x) * exp(-x*x/sigma*sigma) << std::endl;
}
return 0;
}



次ページ
続きを表示
1を表示
最新レス表示
レスジャンプ
類似スレ一覧
スレッドの検索
話題のニュース
おまかせリスト
オプション
しおりを挟む
スレッドに書込
スレッドの一覧
暇つぶし2ch