Created
November 14, 2014 22:27
-
-
Save miura/c75dc6adc4d569acbb05 to your computer and use it in GitHub Desktop.
JFilament results plotting 1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
scale = 0.083; // マイクロメータ/ピクセル | |
dt = 3; // 秒/フレーム | |
path = File.openDialog("Select a File"); | |
str = File.openAsString(path); | |
strA = split(str, "\n"); | |
// データ格納用の配列の用意 | |
dispA = newArray(strA.length - 13); | |
intdispA = newArray(strA.length - 13); | |
timeA = newArray(intdispA.length); | |
dispA[0] = 0; | |
intdispA[0] = 0; | |
integrate = 0; | |
//データを元に計算、配列に格納。 | |
for (i = 14; i < strA.length; i++){ | |
rowA = split(strA[i], "\t"); | |
dispA[i -13] = parseFloat(rowA[2]); | |
integrate += dispA[i -13]; | |
intdispA[i -13] = integrate * scale ; | |
} | |
//x軸用の配列 | |
for (i = 0; i < intdispA.length; i++){ | |
timeA[i] = i * 3; | |
} | |
//プロット。これは一番簡単な方法である。 | |
Plot.create("MT plus end", "sec", "um", timeA, intdispA); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment