Thanks to all who presented their ideas on how to address this issue with
J. As usual, I learn a lot from the users of this Forum!

F.

On Fri, Dec 18, 2020 at 8:58 AM Francesco Pedulla' <[email protected]> wrote:

> Dear all,
> I need to represent the 2D rotation matrix 'R'
>
> R = |cos(t)  -sin(t)|
>        |sin(t)   cos(t)|
>
> and compute it for different values of the rotation angle 't'. I am aware
> the matrix of function can be represented as a gerund, which I like:
>
> R =: 2 2$cos`(-@sin)`sin`cos .
>
> To compute R(t), I wrote the following definition:
>
> mf =: conjunction : '($x)$,(,x)/.((+/$x)$y)'
>
>
> so that "R mf pi%4" returns R(pi/4). But I find the code for 'mf' not very
> elegant. Is there a better way to achieve this?
> Thanks in advance for any hint,
>
> Francesco
>
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to