Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2013

[Date Index] [Thread Index] [Author Index]

Search the Archive

create a list fulfill special requirement by specifying only the

  • To: mathgroup at smc.vnet.net
  • Subject: [mg130630] create a list fulfill special requirement by specifying only the
  • From: Joug Raw <jougraw at gmail.com>
  • Date: Fri, 26 Apr 2013 23:10:58 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • Delivered-to: l-mathgroup@wolfram.com
  • Delivered-to: mathgroup-outx@smc.vnet.net
  • Delivered-to: mathgroup-newsendx@smc.vnet.net

I want to generate a list of number bewteen 2.5 and 6 with 14 elements
totally.

The number of the list should fulfill such requirement that it will be very
tight at the beginning then loos at the end. That means the numbers started
from 2.5 will be more closed then the number at around 6. Something like
{2.5, 2.52, 2.55, 2.60, 2.71, 2.80, 2.95, 3.1...4.2, 5, 6}

I tried exponential as well as power function for generating this list with
the following code:

1. list = With[{a = 3},
  Array[a^# &, 14, {x, y}] /.
   Join[Solve[a^x == 2.5, x][[-1]], Solve[a^y == 6., y][[-1]]]]

which fit the list points with exponential function

2. list = With[{a = 5},
  Array[#^a &, 14, {x, y}] /.
   Join[Solve[x^a == 2.5, x][[-1]], Solve[y^a == 6., y][[-1]]]]

which fit the list points with power function

The 1st one gives me output
{2.5, 2.67416, 2.86045, 3.05972, 3.27286, 3.50086, 3.74474, 4.00561, \
4.28466, 4.58314, 4.90242, 5.24393, 5.60924, 6.}

The 2nd one gives me output
{2.5, 2.6895, 2.89031, 3.10295, 3.32792, 3.56575, 3.81699, 4.0822, \
4.36195, 4.65683, 4.96744, 5.29441, 5.63838, 6.}

They are indeed tight at the end closed to 2.5 and lose at the end near 6, *
BUT* it is not enough for me, what I need is VERY tight and VERY lose at
the two ends such as {2.5, 2.52, 2.6, 2.69...
and ...3.0, 4.2, 6.0} and in between the transition should be gradually and
smoothly done.

I tired to adjust the number "a" in the exponential function and the power
function in my codes. Even if I gave it a very big value for a, this dose
not really change so much the tight and the lose of the numbers at both
ends.

What function should I use to generate the list as I wished?

And, how to make my codes a bit smarter? The code I used I think is bit
more complected. Any suggestion that I could bypass the "With" and the "/."
in my code which still allow me to define directly the two ends{2.5, 6} and
size of "a" in a more straightforward and easier way?




  • Prev by Date: Re: Limiting the number of cores used by a single kernel?
  • Next by Date: Convolve : Different Looking Results
  • Previous by thread: Re: Wrong Answer
  • Next by thread: Convolve : Different Looking Results