help-octave
[Top][All Lists]
Advanced

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

Problem with ploting and some other stuff


From: Ivo Babarovic
Subject: Problem with ploting and some other stuff
Date: Tue, 02 Mar 1999 23:26:26 +0100

Hi there!

I have a problem when I wan't to plot more then aprox. 25  curves at once.
I'm working on my school assignmet and one of my problems is solving
nonlinear equations with iterative metods.  I use fix-point metod.
Here is my problem:
equation: y=ax(1-x)
The point is, that 'a' is changing from 2:0.01:4(example) and convergence of
iterative equation  x[i+1]=ax[i](1-x[i]) is changing acordingly.
I wrote a simple function:

function y=quadd(a,x);
        y=a.*x.*(1-x);

I'm calling this function with another function.

% a is usualy 2:0.001:4
% x is first approx. usualy 0.5.
% m is the nuber of iterations that wan't be seen on the graph but will
% be computed within x
% n is the number of iterations that are ploted on graph
function A=itera(a,x,m,n);
A=[];

% Iterations that wan't be ploted on the graph
for i=1:m
   x=quadd(a,x);
end

 for i=1:n
    A=[A;x];
    x=quadd(a,x);
end
plot(a,A,'.');
------------------------------
If I call function itera like: itera(a,0.5,10,20) everything is OK.
But if I call it like itera(a, 0.5,10,30) octave sends me an error.
Actualy gnuplot sends me an error. Something like:
gnuplot> "tmp/oct-00362Eaa" t "line 1" w dots ...
...
...


                                                                      ^
line 0: expecting "title" for plot

gnuplot> "line 25" w dots...
...
...
            line 0:invalid command
--------------------------------
I think this happens becouse to many lines (line 1-, line 2-, line 3-, ...)
are printed in gnuplot window.
When I work with Matlab at my faculty everything is OK.
I'm new to  Linux and Octave and Gnuplot and ...
Maybe my problem is trivial but I really can't find my way out.
I have tried to "ungset" some options in Octave but it didn't work
out.

Also, I dont know how to set up path for external functions in my .ocatverc .
And can I turn off messages that show up, when I run non built-in function?
Maybe somebody has a god .ocatverc and he or she can send to me.

thanx
           ivo
BTW: try the function , it's quite interesting.




reply via email to

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