[Top][All Lists]

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

Integration with constants?

From: Jens Benecke
Subject: Integration with constants?
Date: Sat, 11 Nov 2006 14:48:10 +0100
User-agent: KNode/0.10.4


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 ..."

Do I have to write a seperate .m file for each function I want to be able to
integrate? I thought it was possible using the "@(x)" anonymous function

I would appreciate any help or pointers to the right documentation. Thank

Jens Benecke (jens at - 100% saubere Postfächer - garantiert! - PHP ab 9? - SSH ab 19? - günstiger Traffic

reply via email to

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