MathGroup Archive 2011

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

Search the Archive

Re: Span Set nasty bug

  • To: mathgroup at smc.vnet.net
  • Subject: [mg123831] Re: Span Set nasty bug
  • From: roby <roby.nowak at gmail.com>
  • Date: Wed, 21 Dec 2011 06:57:25 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • References: <jcpfn9$qh5$1@smc.vnet.net>

Hi Shizu

Imagine in your example that you would like to adjust the number of
a's to be set.
If you try adjusting the number of a' you need a variable span.
Finaly imagine that you would like to adjust the span such that even
no a's at all would be set.

In my application I am generating some Raster[ ] Graphics[ ] where
some features are Set[ ] via Span[ ].
The feature size shall be variable and even zero such that the feature
vanishes.

Regards
Robert

On 20 Dez., 09:07, Shizu <slivo.v... at msa.hinet.net> wrote:
> But what do you mean by t[[1;;0,1;;1]]?
> Could a Span be from 1 to 0?
> I've never seen this before.
> Can't find an usage/example in Mathematica documents.
>
> This is how I use Span for a matrix:
>
> In[]= t = {{1, 2, 3, 4}, {5, 6, 7, 8}}
> Out[]= {{1, 2, 3, 4}, {5, 6, 7, 8}}
>
> In[]= t[[1 ;; 2, 2 ;; 3]] = a
> Out[]= a
>
> In[]= t
> Out[]= {{1, a, a, 4}, {5, a, a, 8}}




  • Prev by Date: Re: import issue
  • Next by Date: Re: Printing Mathematica Notebooks and WYSIWYG
  • Previous by thread: Re: Span Set nasty bug
  • Next by thread: Re: Span Set nasty bug