Like this?
dgerund=:3 :0"0
{.(y`:6 d.1)`''
)
r=:4 :0
dx=. dgerund x
ddx=. dgerund dx
NB. fill in the rest...
)
Note that if you have verbs which can't be handled by d. you'll have
to use a cover for d.1 which does what you need for those cases.
Thanks,
--
Raul
On Tue, Nov 3, 2015 at 4:43 PM, David Lambert <[email protected]> wrote:
> In algebraic notation I have a parametric curve
> x=u(t), y=v(t), z=v(t)
> and need radius_of_curvature(t)
>
> Would like the verb r taking a gerund argument,
> u`v`w r t
> but requires first and second derivatives.
>
> In LaTeX linear notation, with \times representing cross product, curvature
> is
> \[\frac{\|\vec{r'}\|^3}{\|\vec{r'}\times\vec{r''}\|}\]
>
> This being messy, derivatives of a gerund packed back into a gerund would be
> great, then `:0 would generate the vectors.
>
> Thanks, Dave.
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm