/ / Figureウィンドウをオクターブで表示 - matlab、plot、octave

オクターブと図形のウィンドウを表示する - matlab、プロット、オクターブ

私はオクターブするのがとても初心者です。

オクターブでプロットした図形を表示したいのですが、Figureウィンドウが表示されません

これは私がプロットしたいもの、plot.mです。

x = load("ex2x.dat");
y = load("ex2y.dat");
figure % open a new figure window
plot(x, y, "o");
ylabel("Height in meters")
xlabel("Age in years")

コマンドラインで直接スクリプトを実行します

octave plot.m

データセットは、からダウンロードできます。 http://openclassroom.stanford.edu/MainFolder/DocumentPage.php?course=DeepLearning&doc=exercises/ex2/ex2.html

サイトが示唆しているように、私は画像パッケージをインストールしました。

私のOSはubuntu 14.04です、私が何かを逃したかどうかはわかりません。

私はどんな助けにも感謝します。

ありがとうございました!

回答:

回答№1は2

OctaveのFAQにある答えを見つけました。

http://wiki.octave.org/FAQ

If you are running an Octave script that includes a plotting command,
the script and Octave may terminate immediately. So the plot window
does show up, but immediately closes when Octave finishes execution.
Alternatively, if using fltk, the plot window needs a readline loop to
show up (the time when Octave is sitting around doing nothing waiting for interactive input).
A common solution is to put a pause command at the end of your script.

だから私は追加するだけです pause スクリプトの最後に、ウィンドウが表示されます。