Help us understand the problem. What is going on with this article?

gnuplotでファイルの一行目をtitleにする

More than 5 years have passed since last update.

グヌヌプヨッヨで数値計算の結果をアニメーションにする際、
一行目に時間のデータが入っていて、それをタイトルにしたい…したくない?
となった時のメモ。

コマンドラインでheadコマンドをうってその結果をtimeに格納し、
sprintfで適当に整形してtitleにセット。
今回の場合はtimeがsec.で入っているので、hrに直してタイトルにしてます。

file = (好きなファイル名を入れてね!)
time = system("head -1 " . file)
set title sprintf("%2.2f hrs", time / 3600)
NatsukiLab
天文とか惑星とかの研究してます。 重力多体計算(N-body)とか流体計算とか。 C++とかPerlとかrubyとかPythonとか。 それにMPIとかOpenMPとかAVXとかOpenCLとかOpenGLとかGRAPEとかPezy-SCとか。
http://v1.jmlab.jp/~hosono/
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした