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: Hold & Evaluate
Replies: 1   Last Post: Feb 25, 2013 2:18 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Jakub Serych

Posts: 51
Registered: 1/27/08
Hold & Evaluate
Posted: Feb 23, 2013 11:31 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Dear mathgroup,
I would like to generate sequence in the form:

1/1.2, 2/2.3, 3/3.4, 4/4.5, etc.

It is very simple by a Table function:

Table[n/(n + 0.1 (n + 1)), {n, 1, 15}]

but as there are real numbers in denominators, Mathematica evaluates all an=
d generates something like:

{0.833333, 0.869565, 0.882353, 0.888889, 0.892857, 0.895522, etc.}

How to evaluate numerators and denominators separately and print the sequen=
ce in that "fraction like" form?

I tested:

#[[1]]/#[[2]] & /@ Table[{n, n + 0.1 (n + 1)}, {n, 1, 15}] and than used Ho=
ld[] and Evaluate[]:

Hold[Evaluate[#[[1]]]/Evaluate[#[[2]]]] & /@
Table[{n, n + 0.1 (n + 1)}, {n, 1, 15}]

But it doesn't work as the Hold has "veto" power over any evaluation.

Thanks in advance for any idea, how to do it


Date Subject Author
Read Hold & Evaluate
Jakub Serych
Read Re: Hold & Evaluate
Ray Koopman

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.