1
$\begingroup$

I have several columns. two of them look like the following (one for gamma, one for sigma):

columnA = 
  Column[{γ, 0.1, 0.1, 0.1, 0.1, 0.6, 0.6, 0.6, 0.6, 1.1, 1.1, 1.1, 1.1, 1.6, 1.6, 1.6, 1.6}]

One of them is generated from table:

ColumnC =
  Column[
    Table[
      Limit[f(k, γ, σ), k -> ∞], 
      {γ, {0.1, 0.1, 0.1, 0.1, 0.6, 0.6, 0.6, 0.6, 1.1, 1.1, 1.1, 1.1, 1.6, 1.6, 1.6, 1.6}}, 
      {σ, {0.1, 0.6, 1.1, 1.6, 0.1, 0.6, 1.1, 1.6, 0.1, 0.6, 1.1, 1.6, 0.1, 0.6, 1.1, 1.6}}]]

When ColumnC is generated, it is a 16*16 matrix, though I expected column of 16 values that are limits, which take corresponding values of γ and σ.

In the end, I want to be able to do

Grid[columnA, columnB, columnC]
$\endgroup$
1
$\begingroup$

I think you really want something like

gammas = {0.1, 0.1, 0.6, 0.6};
sigmas = {0.1, 0.6, 0.1, 0.6};
data = 
  MapThread[{#1, #2, Limit[f[k, #1, #2], k -> ∞]} &, {gammas, sigmas}]
Grid[Prepend[data, {"γ", "σ", "Limit"}]]

grid

$\endgroup$
0
$\begingroup$

Here's one approach:

allgammas = {0.1, 0.1, 0.1, 0.1, 0.6, 0.6, 0.6, 0.6, 1.1, 1.1, 1.1, 
   1.1, 1.6, 1.6, 1.6, 1.6};
allsigmas = {0.1, 0.6, 1.1, 1.6, 0.1, 0.6, 1.1, 1.6, 0.1, 0.6, 1.1, 
   1.6, 0.1, 0.6, 1.1, 1.6};
allfs = Limit[f[k, #[[1]], #[[2]]], k -> \[Infinity]] & /@ 
 Transpose[{allgammas, allsigmas}]

This gives you a list of all the f[ ]'s evaluated at the values in the allgammas and allsigma lists. Then you can get your grid as

Grid[Transpose[{allgammas, allsigmas, allfs}]]

Of course you'll need to define f[ ] to have it do anything useful.

$\endgroup$
  • $\begingroup$ Thanks! I will upvote your answer as soon as I get reputation of 15. $\endgroup$ – user3349993 Sep 10 '16 at 0:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.