help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

An error message concerning plot


From: Haitao Cai
Subject: An error message concerning plot
Date: Fri, 5 Sep 2014 14:02:09 -0400

Hi all,

      I just installed Octave in my OSX via the binary installer and some other things according to http://jatinganhotra.com/blog/2014/01/21/installing-octave-on-os-x-10-dot-9-mavericks/ . However, I cannot make 1 and 6 in the link. Then I started Octave from the Launch Pad and run a simple script containing the following code:

" CA CB are REWARD prob.

Nturns=1000; gamma=0.005
A=zeros(Nturns,1);
B=zeros(Nturns,1);
CA = 0.6;
CB = 0.3;
A(1) = 0.9;
B(1) = 0.1;
for n=2:Nturns
    if rand(1)<A(1)
        Output = rand(1)<CA;
A(n) = (1.0-gamma)*A(n-1) + gamma*Output;
  B(n) = 1.0-A(n);
    else
Output = rand(1)<CB;
B(n) = (1.0-gamma)*B(n-1)  + gamma*Output;
A(n) = 1.0-B(n);
    endif
end
plot(1:Nturns,A,'r',1:Nturns,B,'b')



CA CB are PENALTY prob.

Nturns=1000; gamma=0.005
A=zeros(Nturns,1);
B=zeros(Nturns,1);
CA = 0.6;
CB = 0.3;
A(1) = 0.5;
B(1) = 0.5;
for n=2:Nturns
    if rand(1)<A(1)
        Output = rand(1)>CA;
A(n) = (1.0-gamma)*A(n-1) + gamma*Output;
  B(n) = 1.0-A(n);
    else
Output = rand(1)>CB;
B(n) = (1.0-gamma)*B(n-1)  + gamma*Output;
A(n) = 1.0-B(n);
    endif
end
plot(1:Nturns,A,'r',1:Nturns,B,'b') "


What I got from Octave is the following error message:

"gamma =  0.0050000

gamma =  0.0050000

Unknown or ambiguous terminal name 'qt'


gnuplot> set terminal aqua enhanced title "Figure 1" size 560 420  font "*,6" dashlength 1

                      ^

         line 0: unknown or ambiguous terminal type; type just 'set terminal' for a list"


What can I do to solve this problem?

Thanks in advance!
Haitao

reply via email to

[Prev in Thread] Current Thread [Next in Thread]