Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2004
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2004

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Re: Creating a symmetric matrix

  • To: mathgroup at smc.vnet.net
  • Subject: [mg46917] Re: [mg46889] Re: Creating a symmetric matrix
  • From: "Sseziwa Mukasa,,(978) 536-2359" <mukasa at jeol.com>
  • Date: Tue, 16 Mar 2004 02:37:20 -0500 (EST)
  • References: <c2p9ld$dns$1@smc.vnet.net> <200403130440.XAA15145@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

On Mar 12, 2004, at 11:40 PM, Bobby R. Treat wrote:

> How's this?
>
> symmetric[a_?MatrixQ] :=
>   Array[a[[Min[#1, #2], Max[#1, #2]]] &, {Length@a, Length@a}]
>

It avoids forming the transpose, but it's no faster than those 
solutions on my machine, 60 seconds to process a 2000x2000 array.

Regards,

Ssezi


  • Prev by Date: Problem with AltGr key on german keyboard
  • Next by Date: How to read a string from a file?
  • Previous by thread: Re: Creating a symmetric matrix
  • Next by thread: Re: Re: Creating a symmetric matrix