Same thing! I just ended up with different order in the train and a superfluous 
rank operator:

   hft=: +>/~@i.@#"_*|:@:+
   ishermitian A
0
   ishermitian hft A
1

Always nice to see Raul's solution too!

Esa
-----Original Message-----
From: programming-boun...@forums.jsoftware.com 
[mailto:programming-boun...@forums.jsoftware.com] On Behalf Of Aai
Sent: 15. tammikuuta 2013 15:05
To: programm...@jsoftware.com
Subject: Re: [Jprogramming] Hermitian from triangular

Why is it easy? From the point of view of a mathematician perhaps. I 
just experimented towards the desired result.

    ishermitian ((]+[*~:) +@|:) A
1
    ishermitian (+ +@|: * >/~@i.@#) A
1


On 15-01-13 11:25, km wrote:
> This is an easy one.  A Hermitian matrix matches its conjugate transpose.  
> Write a verb hft that creates a Hermitian matrix from a triangular one that 
> has a real diagonal.
>
>      ishermitian =: -: +@|:
>      ]A =: 2 2 $ 1 2j3 0 4
>   1 2j3
>   0   4
>      ]B =: hft A
>      1 2j3
>   2j_3   4
>      ishermitian A
>   0
>      ishermitian B
>   1
>
> Kip Murray
>
> Sent from my iPad
> ----------------------------------------------------------------------
> For information about J forums seehttp://www.jsoftware.com/forums.htm

-- 
Met vriendelijke groet,
@@i = Arie Groeneveld

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to