Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #1910
| From | Ratnesh K <ratneshk@gmail.com> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: Short-cut for reiteration, via postfix usage of Table as pure |
| Date | 2011-04-27 09:36 +0000 |
| Organization | Steven M. Christensen and Associates, Inc and MathTensor, Inc. |
| Message-ID | <ip8o2t$pdc$1@smc.vnet.net> (permalink) |
Hello,
Is there a way to convert given Mathematica code into standalone exe?
Regards,
Ratnesh Khandelwal
09739098961
GE India Technology Centre
Bangalore-India
On 25 April 2011 16:57, Christopher O. Young <cy56@comcast.net> wrote:
> I get a little tired of the excess typing involved with using Table for
> simple reiteration of functions with a parameter list. Since Mathematica
> doesn't seem to use "T" for anything, it's handy to just re-define this to
> mean Table. Then use a postfix call with a "#" as a slot for the argument
> and an ampersand "&" at the end to indicate a pure function. See
> ref/Function in the Mathematica Help for details.
>
>
> T = Table;
>
>
>
> Graphics[
> Line[{{0, 10 - k}, {k, 0}}] // T[#, {k, 0, 9}] &
> ]
>
> >> I have the following bit of graphics:
> >>
> >> Graphics[{
> >> Line[{{0, 10}, {1, 0}}],
> >> Line[{{0, 9}, {2, 0}}],
> >> Line[{{0, 8}, {3, 0}}],
> >> Line[{{0, 7}, {4, 0}}],
> >> Line[{{0, 6}, {5, 0}}],
> >> Line[{{0, 5}, {6, 0}}],
> >> Line[{{0, 4}, {7, 0}}],
> >> Line[{{0, 3}, {8, 0}}],
> >> Line[{{0, 2}, {9, 0}}],
> >> Line[{{0, 1}, {10, 0}}],
> >> }]
> >>
> >>
> >> I want to simplify it to do some sort of iteration to compute the end
> points
> >> of the lines. I can do this easily in a variety of procedural languages
> but
> >> I haven't yet grokked how Mathematica would do this.
>
>
>
--
Regards,
Ratnesh Khandelwal
Contact: +919739098961
Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread
Re: Short-cut for reiteration, via postfix usage of Table as pure Ratnesh K <ratneshk@gmail.com> - 2011-04-27 09:36 +0000
csiph-web