MathGroup Archive 2006

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

Search the Archive

HoldForm

  • To: mathgroup at smc.vnet.net
  • Subject: [mg68094] HoldForm
  • From: Bruce Colletti <vze269bv at verizon.net>
  • Date: Sun, 23 Jul 2006 03:42:11 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

Re Mathematica 5.2.0.0.

This code displays the component differences of matrix subtraction (A-B):

A = {{1, 2}, {3, 4}};

B = {{5, 6}, {7, -8}};

Map[MapThread[HoldForm[#1 - #2] &, {A[[#]], B[[#]]}] &, Range@2]

As desired, the output is {{1 - 5, 2 - 6}, {3 - 7, 4--8}}.

Two questions:

- What's a better way to do this?

- How can I replace the -- by +? 

Thankx.

Bruce



  • Follow-Ups:
  • Prev by Date: Re: Quaternion problem--> Jacobian derivation/ Metric
  • Next by Date: Re: FindRoot::nlnum error
  • Previous by thread: Re: Quaternion problem--> Jacobian derivation/ Metric
  • Next by thread: Re: HoldForm