Hold & Evaluate
- To: mathgroup at smc.vnet.net
- Subject: [mg129897] Hold & Evaluate
- From: Šerých Jakub <Serych at panska.cz>
- Date: Sat, 23 Feb 2013 23:31:40 -0500 (EST)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- Delivered-to: l-mathgroup@wolfram.com
- Delivered-to: mathgroup-newout@smc.vnet.net
- Delivered-to: mathgroup-newsend@smc.vnet.net
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
Jakub
- Follow-Ups:
- Re: Hold & Evaluate
- From: Tomas Garza <tgarza10@msn.com>
- Re: Hold & Evaluate
- From: Tomas Garza <tgarza10@msn.com>
- Re: Hold & Evaluate
- From: Bob Hanlon <hanlonr357@gmail.com>
- Re: Hold & Evaluate
- From: Fred Simons <f.h.simons@tue.nl>
- Re: Hold & Evaluate