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