axiom-mail
[Top][All Lists]
Advanced

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

[Axiom-mail] A tiny type conversion problem


From: Alasdair McAndrew
Subject: [Axiom-mail] A tiny type conversion problem
Date: Sat, 19 Jul 2008 09:05:45 +1000

I'm a bit embarrassed not to be able to work this out for myself, but, anyway...  Now that I've discovered the joys of the NumericalQuadrature package, I want to use it to calculate the total variation of some functions; the total variation being defined (for differentiable functions) as the integral of the absolute value of the derivative.  So I'd like to use something like

romberg(x+->abs(D(x/(x^3+1),x)),0.0,1.0,0.1,0.1,10,10)

But this doesn't work.  Romberg requires an anonymous function float -> float, but the use of D returns an _expression_. (_expression_ integer, in this example).  How, and where, do I place the type conversions so that romberg will do its job?

Thanks,
Alasdair

--
Blog: http://amca01.wordpress.com

reply via email to

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