Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #7388

Re: Span Set nasty bug

From roby <roby.nowak@gmail.com>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: Span Set nasty bug
Date 2011-12-21 12:00 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <jcshol$2b8$1@smc.vnet.net> (permalink)
References <jcpfn9$qh5$1@smc.vnet.net>

Show all headers | View raw


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...@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}}

Back to comp.soft-sys.math.mathematica | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

Re: Span Set nasty bug Shizu <slivo.vitz@msa.hinet.net> - 2011-12-20 08:07 +0000
  Re: Span Set nasty bug roby <roby.nowak@gmail.com> - 2011-12-21 12:00 +0000

csiph-web