2016-04-08 15 views
0

Ben oktav için çok yeni biriyim.Resim penceresini oktav ile gösterme

Resim 1'i oktav ile göstermek istiyorum, ancak şekil penceresi görünmüyor. İşte

ben veri kümesi http://openclassroom.stanford.edu/MainFolder/DocumentPage.php?course=DeepLearning&doc=exercises/ex2/ex2.html

I indirilebilir doğrudan

octave plot.m 

komut satırı ile komut dosyasını çalıştırın 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') 

, ben çizmek istediğim şey Site önerisi olarak görüntü paketini yükledim.

İşletim sistemim ubuntu 14.04, bir şey özlediğime emin değilim.

Yardımlarınız için minnettarım.

Teşekkür ederiz!

+2

Grafik oluşturucuda bir sorun olabilir. Octave'de hangi grafik oluşturucuyu seçtiğinizi onaylayabilir misiniz? Octave komut penceresinde 'available_graphics_toolkits' yazın. Hangileri mevcut? Ayrıca, şu anda renderer olarak ne yüklü? 'Arsa' işlevini çalıştırdıktan ve ne aldığınızı gördükten sonra 'load_graphics_toolkits' yazın. – rayryeng

+0

I oktav-cli' '' in available_graphics_toolkits' yazın ve 'ans = { [1,1] = FLTK } ' –

+1

ve I tipi gösterir' loaded_graphics_toolkits', bu' ans = {} (1X0) göstermektedir '. –

cevap

2

Octave'un SSS bölümünde bulunan cevabı buldum.

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. 

http://wiki.octave.org/FAQ

Yani sadece Senaryomun sonunda pause eklemek ve pencereden gösterir.

+0

Serin. Paylaşım için teşekkürler. – rayryeng

+0

@ user3378223: Veya ekleyin --persist – Andy

İlgili konular