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

Maximaで点をplotする

More than 5 years have passed since last update.

plot2dを使ってdata.txtに書かれた値をplotする。

data.txt
0 0
1 2
2 4
3 6
4 8
5 10

こんな感じのdata.txtを用意する。左がx座標、右がy座標。

maximaを起動して

data: transpose(read_matrix("/path/to/data.txt"));
plot2d([discrete,data[1],data[2]],[style,points]);

これで、点がプロットされる。style,pointsを消せば、直線が表示される。
data[1],data[2]というのが、最初に取り込んだdata.txtの列を表しているので
この値を変えれば、どの列をどの座標の値にするかを変更できる(はず)

参考資料

http://maxima.sourceforge.jp/maxima_12.html

opamp
最近はLisp、主にCommon LispとEmacs Lispにハマっている(書けるとは言ってない) それとClojureも少しやってる。Schemeは今のところはまだ。 OSは基本ArchLinuxを使ってる。シェルはzshでエディタはEmacs
http://opamp.hatenablog.jp/
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
ユーザーは見つかりませんでした