[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Integration with constants?
From: |
Jens Benecke |
Subject: |
Re: Integration with constants? |
Date: |
Sat, 11 Nov 2006 16:02:05 +0100 |
User-agent: |
KNode/0.10.4 |
John W. Eaton wrote:
> On 11-Nov-2006, Jens Benecke wrote:
>
> | I am trying to integrate a function that has constants previously
> | defined in the same matlab file. Like this:
> |
> | [J2, ier, nf, err] = quad(@(x) log( ...
> | sqrt(1 + alpha.^2 + 2.*a.pha.*cos(2.*x)) + alpha + cos(2.*x) ),
> | ...
> | 0, pi/2, 1e-6)
> |
> | "alpha" is a constant that has been calculated before. However, Octave
> | tells me "error: alpha undefined ..."
> |
> What version of Octave are you using? This works in 2.9.9:
> octave:1> a = 2
> a = 2
> octave:2> quad (@(x) x + a, 0, 1)
> ans = 2.5000
Sorry ... 2.1.72, on SuSE Linux.
I can't upgrade because this is installed on a number of computers and we
have created multiple custom RPMs for it (it would be a major amount of
work).
Any way to do this with the 2.1 branch?
Thanks!
--
Jens Benecke (jens at spamfreemail.de)
http://www.spamfreemail.de - 100% saubere Postfächer - garantiert!
http://www.rb-hosting.de - PHP ab 9? - SSH ab 19? - günstiger Traffic
Please DO NOT CC: me, I read the lists and newsgroups I post in!