メモ1

「メモ1」の編集履歴(バックアップ)一覧はこちら

メモ1」(2009/06/30 (火) 01:49:31) の最新版変更点

追加された行は緑色になります。

削除された行は赤色になります。

test
#include "stdafx.h" #include"iostream" #include"math.h" #include"fstream"//ファイル出力のコマンドofstreamを使うために使う。 using namespace System; using namespace std; int main(array<System::String ^> ^args) { ofstream outfile("test.dat");//ここでまず出力するファイルをつくる。txtとかでもできる for(int i=0;i<100;i++) { outfile << sin((double)i*0.1) << endl;//てきとうにsincurveを出力。ちなみにendl;とは改行 } ofstream pltfile("test.plt");//.pltとはgnuplotにプロットさせる命令を書くファイル。これをload "test.plt"とうつことでgnuplotはこれをプロットできる。 pltfile << "set xrange[0:10]" << endl;//xのプロットする領域をきめる pltfile << "plot 'test.dat' " << endl;//test.datをプロットする pltfile << "pause -1" << endl; FILE *fp=_popen("pgnuplot.exe","w"); if(fp==NULL) return -1; fputs("load 'test.plt'",fp); fflush(fp); _pclose(fp); return 0; }

表示オプション

横に並べて表示:
変化行の前後のみ表示: