[Maxima] Function with other function as argument and other functions as output
macrakis at alum.mit.edu
Sun May 13 16:51:22 CDT 2012
On Sun, May 13, 2012 at 5:42 PM, Miguel Marinho <miguelmarinho at seoutopia.com
> Dear Stavros Macrakis,
> First of all , I would like to thank you for your reply.
> Secondly, your way is working fine, but there is just a little problem,
> doing this I'm defining "vi" without any argument, imagine I want to
> calculate vi(2) , is there any way?
> Once again, thank you!
> Yours Sincerely,
> Miguel Marinho
> Em 13-05-2012 22:26, Stavros Macrakis escreveu:
> There are several technical problems with your definition:
> * Function and block arguments should be symbols, not expressions
> like x(t).
> * ''(...) evaluates at the time the expression is *read*, not the time
> it is evaluated, so this almost certainly doesn't do what you want,
> But actually you don't need any of that. Instead of defining
> "functions", it is easier just to define *expressions*, e.g.
> test(expr) := block([vi,ve,T,vu],
> vi: diff(expr,'t),
> ve: sqrt(vi . vi)
> vu : ...,
> T: subst(vu, 't , ...)
> On Sun, May 13, 2012 at 8:28 AM, Miguel Marinho <
> miguelmarinho at seoutopia.com> wrote:
>> Dear Sir/Madam,
>> I would like to creat a function with other function as argument, example:
>> define(VelocidadeInst(t), diff(x, t)),
>> where x(t) could be something like: x(t):=[t,cos(t)], so when I ran the
>> function test(x(t)) it should return the functions:
>> VelocidadeInst(t),VelocidadeEsc(t) and T(t), instead of "define: in
>> definition of test, found bad argument x(t)".
>> Thank you,
>> Yours faithfully,
>> Miguel Marinho
>> Maxima mailing list
>> Maxima at math.utexas.edu
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Maxima