MathGroup Archive 2011

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

Search the Archive

Re: Preventing unwanted threading by Inner

  • To: mathgroup at smc.vnet.net
  • Subject: [mg123559] Re: Preventing unwanted threading by Inner
  • From: DrMajorBob <btreat1 at austin.rr.com>
  • Date: Sun, 11 Dec 2011 03:47:12 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • References: <jbni23$47f$1@smc.vnet.net> <jbq49t$itm$1@smc.vnet.net>
  • Reply-to: drmajorbob at yahoo.com

I think Chris meant:

Sum[(HoldForm[#1^2] & )[i], {i, 1, 10}]

1^2+2^2+3^2+4^2+5^2+6^2+7^2+8^2+9^2+10^2

or

(I converted the first cell to InputForm in Mathematica, copied the output  
as Plain Text, and pasted both into e-mail.)

Bobby

On Sat, 10 Dec 2011 06:31:49 -0600, Chris Young <cy56 at comcast.net> wrote:

> On 2011-12-08 10:42:05 +0000, Ray Koopman said:
>
>> This is a little better than my first suggestion.
>>
>> Inner[Times, {a1,a2,a3}, HoldForm /@
>> {{b11,b12},{b21,b22},{b31,b32}}, Plus]
>>
>> a1 {b11,b12} + a2 {b21,b22} + a3 {b31,b32}
>
> I see in the Help that HoldForm can help with preventing unwanted
> expansion of a lot of formulas:
>
> Display a sum of squares in unevaluated form:
>
> \!\(
> \*UnderoverscriptBox[\(\[Sum]\), \(i = 1\), \(10\)]\(\((HoldForm[
> \*SuperscriptBox[\(#1\), \(2\)]] &)\)[i]\)\)
>
> \!\(\*
> TagBox[
> SuperscriptBox["1", "2"],
> HoldForm]\) + \!\(\*
> TagBox[
> SuperscriptBox["2", "2"],
> HoldForm]\) + \!\(\*
> TagBox[
> SuperscriptBox["3", "2"],
> HoldForm]\) + \!\(\*
> TagBox[
> SuperscriptBox["4", "2"],
> HoldForm]\) + \!\(\*
> TagBox[
> SuperscriptBox["5", "2"],
> HoldForm]\) + \!\(\*
> TagBox[
> SuperscriptBox["6", "2"],
> HoldForm]\) + \!\(\*
> TagBox[
> SuperscriptBox["7", "2"],
> HoldForm]\) + \!\(\*
> TagBox[
> SuperscriptBox["8", "2"],
> HoldForm]\) + \!\(\*
> TagBox[
> SuperscriptBox["9", "2"],
> HoldForm]\) + \!\(\*
> TagBox[
> SuperscriptBox["10", "2"],
> HoldForm]\)
>
>


-- 
DrMajorBob at yahoo.com



  • Prev by Date: Re: C/Fortran-like #include functionality for large expressions?
  • Next by Date: Re: NMinimize problem: fct minimized uses FindRoot
  • Previous by thread: Re: Preventing unwanted threading by Inner
  • Next by thread: Study of a real function