Fwd: Re: Array function & atvalue()



If someone was asking how it went with this

(%i1) r[n](t):=r(t,n);
(%o1)                          r (t) := r(t, n)
                                 n
(%i2) %theta[n](t):=%theta(t,n);
(%o2)                     %theta (t) := %theta(t, n)
                                 n
(%i3) r(t,n):=%e^(%i*%theta[n](t));
                                        %i %theta (t)
                                                 n
(%o3)                     r(t, n) := %e
(%i4) r[n](t);
                                  %i %theta(t, n)
(%o4)                          %e
(%i5) %theta[4](t):=t;
(%o5)                           %theta (t) := t
                                       4
(%i6) r[4](t);
                                       %i t
(%o6)                               %e


I got to keep the nice formatting, and the functionality. Thanks for 
your help, Barton!


Edgar
--
TU Delft
Faculty of industrial design engineering
Product engineering section
Landbergstraat 15, Delft, 2628CE, Nederland
Office number: 32 B-0-320
Phone number +31 015 27 86367


-------- Original Message --------
Subject: Re: [Maxima] Array function & atvalue()
Date: Thu, 25 Oct 2012 15:26:50 +0200
From: Edgar Fco. Rios Soltero
To: Barton Willis

Thanks, Barton. I will miss the nice printed format, but at least I can
work with it now.


Edgar
--
TU Delft
Faculty of industrial design engineering
Product engineering section
Landbergstraat 15, Delft, 2628CE, Nederland
Office number: 32 B-0-320
Phone number +31 015 27 86367

On 25/10/12 14:26, Barton Willis wrote:
> As a workaround, consider switching to non-subscripted functions:
>
>    (%i11) r(t,n) :=%e^(%i*%theta(t,n));
>    (%o11) r(t,n):=%e^(%i*%theta(t,n))
>
>    (%i12) atvalue(theta(t,n),[t=0],%pi);
>    (%o12) %pi
>
>    (%i13) theta(0,42);
>    (%o13) %pi
>
> Maxima subscripted fuction are memoizing, so there are differences. But if you were purely using subscripted functions because you liked
> the way they are printed, try the workaround.
>
> --Barton
>
>
>> (%i1) r[n](t):=%e^(%i*%theta[n](t));
>>                                        %i %theta (t)
>                                                  n
>> (%o1)                      r (t) := %e
>>                              n
>> (%i2) atvalue(theta[4](t),[t=0],%pi);
>
>