2011/11/17 Juan Pablo Carbajal <carba...@ifi.uzh.ch>:
> Octave 3.4.3, financial 0.3.2
> octave:2> rate(30, 510.19, 10000)
> error: @pv (x, 30, 510.19, 0, "e") - 10000: no function and no method found
> error: called from:
> error:   /usr/local/share/octave/3.4.3-rc0/m/optimization/fsolve.m at
> line 149, column 9
> error:   /home/juanpi/octave/financial-0.3.2/rate.m at line 69, column 5
>
> You may want to move forward in the version of Octave. If you are in
> 32bits you can try out this binaries, they were successfully tested
> many times by now.
> http://ubuntuone.com/6l35Gf3j8alWL7fGeYW388
>

Juan, what do you mean by "successfully tested many times by now"? You
show an example of failure from the last Octave/financial pair. Why
should I change the version if it seams to not solve the issue?

By the way, irr() and rate() do errors because they call fsolve() with
a string as an argument. Example:

octave:3> fsolve("pv (x, 30, 510.19, 0, \"e\") - 10000",0)
error: error creating function handle "@pv (x, 30, 510.19, 0, "e") - 10000"
error: called from:
error:   /usr/share/octave/3.2.4/m/optimization/fsolve.m at line 138, column 9

But with another syntax:

octave:4> fsolve(@(x)pv(x, 30, 510.19) - 10000 , 0)
ans =  0.019085  # wrong. 0.03 is correct.

octave:6> fsolve(@(x)x-1 , 0)
ans =  1.0000  # right

octave:7> fsolve(@(x)-x^2+4, 0)
warning: division by zero
warning: division by zero
.
.
.
ans = 0  # wrong, but initial value is not good.

octave:8> fsolve(@(x)-x^2+4, 0.1)
ans =  2.0000  # now right, with a good initial value.

I am new to octave and I don't know if the way to call fsolve() is an issue.

Cheers,

Júlio

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
Octave-dev mailing list
Octave-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/octave-dev

Reply via email to