MathGroup Archive 2007

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

Search the Archive

Re: Best practise for defining shortened display versions of custom

  • To: mathgroup at smc.vnet.net
  • Subject: [mg80420] Re: Best practise for defining shortened display versions of custom
  • From: dh <dh at metrohm.ch>
  • Date: Wed, 22 Aug 2007 04:40:40 -0400 (EDT)
  • References: <fabgiq$ibm$1@smc.vnet.net>


Hi Andrew,

fortunately the solution is much easier. Lookup "Format". Here is an 

example: Assume we have a complicated object like myFun[x1,x2,x3] and we 

would like to display this as e.g. myFun[x1], the the following will do 

this:

Format[myFun[x1_,x2_,x3_]]:=myFun[x1]

myFun[1,2,3] will now be printed as mxFun[1].

hope this helps, Daniel



Andrew Moylan wrote:

> Expressions with head InterpolatingFunction display in a shortened format in

> StandardForm:

> 

> Evaluating:

> 

> InterpolatingFunction[{{1, 4}}, {3, 1, 0, {4}, {4}, 0, 0, 0, 

>   0}, {{1, 2, 3, 4}}, {{1}, {4}, {9}, {16}}, {Automatic}]

> 

> yields:

> 

> InterpolatingFunction[{{1,4}},<>]

> 

> How does InterpolatingFunction[] do this? Is it via custom definitions for

> MakeBoxes[] or ToBoxes[] or Format[]? What is the best way to do this for my

> own functions?

> 

> 




  • Prev by Date: Re: Any way to exclude branch-cut fills in this plot?
  • Next by Date: Re: On partitioning lists by intervals
  • Previous by thread: Re: Re: Unicode character property (Open, Close, etc)
  • Next by thread: FWHM, InterpolationFunction & Solve