/ / Mostrando a janela da figura com oitava - matlab, plot, oitava

Mostrando a janela da figura com oitava - matlab, plot, oitava

Eu sou muito novato na oitava.

Quero mostrar a figura que traço com oitava, mas nenhuma janela de figura aparece.

Aqui está o que eu quero plotar, enredo.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")

Eu corro o script com a linha de comando diretamente

octave plot.m

O conjunto de dados pode ser baixado http://openclassroom.stanford.edu/MainFolder/DocumentPage.php?course=DeepLearning&doc=exercises/ex2/ex2.html

Eu instalei o pacote de imagens como o site sugeriu.

Meu sistema operacional é Ubuntu 14.04, não tenho certeza se eu sinto falta de algo.

Eu aprecio qualquer ajuda.

Obrigado!

Respostas:

2 para resposta № 1

Eu encontrei a resposta que pode ser encontrada no FAQ do Octave.

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.

Então eu so adiciono pause no final do meu script e mostra a janela.