Questions on the use of the Table[] command and other functionality related to lists. Use [tag:matrix] for matrix algebra and related methods, and [tag:list-manipulation] for questions about transforming or operating on existing lists.

learn more… | top users | synonyms

3
votes
3answers
108 views

Combination of interpolations doesn't work?

I have tables of function values f[i_] and g[i_] and I need to plot various combinations of the function and its derivatives ...
1
vote
1answer
135 views

Appending elements to a list in parallel table

Is there any way to store values in a list that is being computed in parallel? For example, if ParallelTable is computing some ...
-5
votes
2answers
107 views

How to create and format a table via menu [closed]

I created a 3x3 table via menu Insert > Table/Matrix > New..., but afterwards I cannot add a new line or column. The tool doesn't add a row of 3 columns, but a row of one column at the end; when ...
13
votes
5answers
725 views

Calling Table with custom iterator

I often find myself in situations where I, for example, need to build a table for some expression, but want to set the number of points rather then the step size, so the code ends up looking like this ...
0
votes
1answer
29 views

How can I plot a function of imported data that ends up nested in lists four deep? [closed]

I imported a file of data from a model that I am running for my research. It produces the following output in Mathematica: ...
1
vote
3answers
165 views

How to parallelize a Do loop containing URLFetchAsynchronous?

I'm have a simple piece of code: results={}; Do[If[!FailedQ[g = grab[i]], AppendTo[results, g]], {i, 2000000, 3000000}] I had thought that the simplest way to ...
5
votes
3answers
227 views

How to imitate list comprehensions for constant arrays?

In Python, ['a'] * 10 generates ['a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a'] and ...
1
vote
2answers
39 views

Error Resulting from Placing a Dynamic Variable inside of Table

I want to create a list of values, True or False, and to update those values with a ...
0
votes
1answer
62 views

Count participation of variable list

I have the directed edges of a graph given by a list of variable (vertex) pairs. ...
0
votes
3answers
49 views

Generating a large table of values and selecting some of them following some condition

I am working on a problem where I have to generate a table of components while each component of the table has 18 entries. Six of the indices among 18 run from 0 to 1 while the other 12 can take ...
0
votes
2answers
42 views
1
vote
1answer
29 views

How align Table column on decimal point yet use text styling?

Form a table such as: data = Transpose[{Range[0, 5], RandomReal[{-5, 5}, 6]}]; Display it by wrapping with TableForm. Is ...
0
votes
1answer
86 views

Is there a nice way to display big nested tables?

I have a really big nested table. I can copy my code here if you wish, that is not a problem, but it will be a lot of it and I am not sure if it makes sense. the end expression is this ...
0
votes
0answers
32 views
0
votes
1answer
51 views

Module using for creating a table [closed]

I want to have a 4 tables with using of module. Unfortunately I don't know why doesn't it work ...
1
vote
1answer
42 views

Change data form Table to Array

Ok, I am trying to figure out how exactly to change the data from Table such as ...
1
vote
1answer
41 views
1
vote
0answers
60 views

creation a table from a default module [closed]

I have used of bisection method for finding the root of a function: ...
1
vote
2answers
75 views

Formatting a table of values

How do I display a list of values $\{a_1,a_2,\ldots,a_n\}$ in a two column format? --------- 1 | a_1 2 | a_2 3 | a_3 ...... n | a_n I tried ...
0
votes
0answers
25 views

Exporting data in an output file from a Do-loop evaluation [duplicate]

I want to transfer the output of the following evaluation into a two-columned data file where the first column will be values for a and the second column will be ...
1
vote
1answer
38 views

Generation of list of values for small gap among values

I need to run a loop as Table[expr,{i,imin,imax,di}] where I want di to be as small as order of ...
3
votes
2answers
69 views

Faster use of Condition for a large array (see the example)

Here is the example/problem. I have a array of $n$ random number. n = 2000; p = RandomReal[{0, 9}, n]; I have to create a $n\times n$ sparse matrix with ...
4
votes
2answers
106 views

Why doesn't ParallelTable work on this very simple example?

For some reason, I'd like to use ParallelTable with a variable number of iterators. Table[a[1], {a[1], 0, 10}] works fine: ...
1
vote
3answers
60 views

Controlling the evaluation of other arguments in pure functions [duplicate]

I have a piece of code where I would like to do the something like the following: ...
1
vote
4answers
431 views

Summation over 3 lists

I have three lists. As an example, a = {10, 5, 6, 8, 7}; b = {4, 8, 9, 7, 9}; c = {7, 5, 12, 4, 1}; I want to get: $$ x(i)=\sum ...
0
votes
0answers
65 views

Equation Autogeneration

The following is resubmitted as edit here to reflect suggested formatting corrections so indentations separate the lines neatly. I also fixed the unknown D variable which I actually meant to state as ...
0
votes
2answers
116 views

Plot a histogram according to a set of rules using data from two tables

Let's say I have two Tables A={1.0,2.3,1.5,3.0,1.1,} , B={2,10,3,1,0} and I'd like to plot a histogram in the following way: ...
0
votes
1answer
129 views

ParallelTable slower than Table in the presence of an Association?

So after testing some things I am completely reformulating my problem. First an example ...
1
vote
3answers
117 views

Plotting entries of one table vs entries of another with a condition on a third table

I have three Tables, say, A={1,2,3,4,5}, B={1,2,3,4,5}, C={1.1,2.2,17,1.5,5} of the same ...
1
vote
2answers
81 views

Create a table of Mean Values and Standard Deviations from data list

I need to create a table of the Mean Values and Standard Deviations of 18 columns of data from a table. I know how to compute the Mean and Standard Deviation for the different columns, but am unsure ...
0
votes
1answer
53 views

List manipulation performance or how to make independent list copy

I have a task to solve some system of equations with NSolve and print graph of it, depends on parameters. Something like this (maybe it is not a good example and does not always have a solution, but ...
0
votes
1answer
43 views

Issue with Table [closed]

I have a quick question about using the table command in mathematica. Suppose that I define ...
1
vote
1answer
109 views

How to use Table to assign values to variables in a list?

I'm trying to do the following: R = {a, b, c, d, e, f, g, h, i}; Table[R[[n]] = RandomInteger[{0, 20}], {n, 1, Length[R]}] My intention is to assign a random ...
1
vote
0answers
55 views

Fast construction and reshaping of large tensors

I'm trying to construct a large matrix which is derived from some higher rank tensor (the rank of interest to me changes case by case, so it needs to be a general method). Currently, the process of ...
12
votes
5answers
448 views

TableAlignments -> Left not working

Bug introduced in 7.0 or earlier and persisting through 10.1.0 or later For a very simple dataset TableAlignments->Left does not work: ...
2
votes
1answer
64 views

Why isn't Table iterator value inserted in failed NIntegrate arguments?

Consider this simplest example: Table[{z, NIntegrate[f[x], {x, 0, z}]}, {z, {1}}] Here f is not defined, so ...
1
vote
1answer
82 views

Is there a way to convert a string to a Table indicator? [closed]

I have a list like this: list = {"k1","k2"} I want to use the elements in the list as Table indicators: ...
1
vote
1answer
334 views

Usage of Piecewise/RSolve to solve an equation based on condition

I am trying to compute price of call option on a stock using the finite difference method. I have a VBA code for it, and I am trying to find out how I can use Mathematica memoization functions and ...
0
votes
0answers
26 views

Fibonacci series up to 300 terms [duplicate]

I tried to generate a list of Fibonacci numbers up to 300 terms and gets a runtime error. f[0]=0; f[1]=1; f[x_]:=f[x-1]+f[x-2]; Table[f[x],{x,1,300}] Is there ...
1
vote
2answers
101 views

Slicing multidimensional table

Say I have a multidimensional list created in the following way grid= Table[{i, j+1, k+2}, {i, 0, 1}, {j, 0, 1}, {k, 0, 1}] grid={{{{0, 1, 2}, {0, 1, 3}}, {{0, 2, 2}, {0, 2, 3}}}, {{{1, ...
1
vote
2answers
78 views

Table of ParametricPlots crashes Kernel

I can usually crash the Mathematica Kernel by using Table to generate a List of ...
1
vote
1answer
77 views

Importing Data Issue, Breaking Up Elements

I am trying to import a comma delimited text file as a Table and I am having two issues: First, the file imports all of the numbers that should be separate columns as a single string. This is not ...
0
votes
0answers
97 views

NSolve and Loop - getting error that does not occur with single instance

I am having difficulties getting this code to work. Code: ...
0
votes
0answers
67 views

Matrix iteration failing after second step

I am calculating 11x6 matrix using different logics as in below code. Problem is in Do loop in below code where I have two different criteria to update matrix "fd". I am expecting logic in IF which ...