The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Inactive » comp.soft-sys.math.mathematica

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: non optimized inner for loops
Replies: 2   Last Post: Nov 25, 2012 11:38 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Dr. Peter Klamser

Posts: 23
Registered: 6/11/11
Re: non optimized inner for loops
Posted: Nov 25, 2012 4:59 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Hi Sasa,

questions, improving the performance of the Mathematica code are often posted. Many
people think, that usual approaches will help, if you write c, c++ or
pascal code sometimes combined with the Compile[].

Read a book or join a online course programming in Mathematica by WRI and find out
how to use

l = Table[Sin[x], {x, 0, 10 Pi, 10 Pi/10^6}] // N;
Plus @@ l // Timing

or Select[], /@ and & (pure functions) etc..

The Mathematica help system is also useful if you look for @@ and then open one
item under see also.


2012/11/23 Sasa B <>

> I am aware of more advanced functions and approaches, it is just that I
> don't know how to apply them :)
> If anybody tries to evaluate code above, there is one error, variable d1
> needs to be initialized with, say d1=10.
> thanks

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.