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

1
vote
0answers
56 views

creation a table from a default module [on hold]

I have used of bisection method for finding the root of a function: ...
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 ...
3
votes
2answers
49 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 ...
1
vote
2answers
67 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 ...
1
vote
3answers
57 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: ...
0
votes
0answers
63 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
107 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: ...
1
vote
3answers
114 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 ...
4
votes
2answers
94 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: ...
2
votes
1answer
64 views

Performance of a bootstrap - time of computation not linear with number of iterations

I'm doing a bootstrap based on this thread with the following code (file.txt here): ...
0
votes
1answer
126 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
2answers
69 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
39 views

Issue with Table [closed]

I have a quick question about using the table command in mathematica. Suppose that I define ...
0
votes
1answer
49 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
3answers
41 views
1
vote
1answer
67 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
50 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 ...
2
votes
1answer
58 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
80 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: ...
0
votes
0answers
24 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
88 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
1answer
73 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: ...
1
vote
1answer
331 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 ...
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 ...
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 ...
1
vote
2answers
59 views

How can I manipulate this list?

I performed a loop with Table where I solve a system of 4 equations that depends on two parameters: eta and p. I create two lists for each parameter as follows: ...
1
vote
5answers
109 views
1
vote
3answers
61 views

Delete permutations of subtables in a table [closed]

I've got a table of tables: $A=\{\{a,b\},\{b,a\},...,\{a,b,c,d,e\},\{e,d,c,a,b\},...\}$. How do I do to remove backward duplicates, or more generally permutations of duplicates in the table? For ...
0
votes
1answer
43 views

Create a Table depending of two variables [closed]

I tried to create a table depending of two variables as: W= Table[{G[[i]], G[[j]]}, {i, 1, 3}, {j, 1, 3}] I wanted it to look like ...
0
votes
0answers
43 views

RunScheduledTask hide typing data table

I created a task that removes itself when an external variable x,is changed: ...
1
vote
1answer
98 views

Summing terms in Table

I have a table that looks like Table[m, {k, 10}, {j, k}, {i, j}] where, m is a square matrix that depends on the indices $i, ...
2
votes
2answers
76 views

How to apply list of values to a list of functions

I have the following: first= {1+a,2+a,3+a,4+a} and a list t={0,1,2,3} I want to evaluate the first element of "first" at ...
1
vote
1answer
64 views

Data Table Manipulation in Mathematica 10

I would like to select columns from a table by column name. I tried the solution described here: Data Table Manipulation in Mathematica: Step 2 . I am using Mathematica 10. (I would write a comment ...
1
vote
0answers
22 views

How do I set a PlotStyle when plotting a Table of functions? [duplicate]

I want to plot several functions each with its own color. A MWE is as follows : Plot[{2 x, 3 x}, {x, 0, 1}, PlotStyle -> {Red, Green}] which works fine. Now, ...
-1
votes
1answer
49 views

ListLinePlot plots my table, but the table doesn't contain numerical values

I am trying to export a table of data to file, but the code does not appear to be returning numerical data even though ListLinePlot can plot it. Can you please ...
2
votes
5answers
134 views

Turning Pascal's Triangle 90 degrees counter clockwise

I have a function that returns a list containing sub-lists that have the numbers for each row in the list. (ex.{{1},{1,1},{1,2,1}}) If I was going to represent it regularly I would use table form and ...
0
votes
1answer
54 views

Using FindRoot in a Table of Iterations [closed]

So I have a tanh curve and a straight line that cross at the point: msol=FindRoot[Tanh[x] == (T/Tc03) x, {x, 1}] This gives me the roots that I need at a certain ...
12
votes
7answers
575 views

How to properly inject iterators into table? [duplicate]

Goofing off on a prior question, I was fiddling with other methods, which led me to the need to inject a constructed set of iterators into a table construct. Now, ...
0
votes
0answers
40 views

NDSolveValue:dsvar error in a system of non linear differential equations generated using a Table

I have a system of 4 non-linear differential equation, that I generate using Table command. On solving, I keep getting a dsvar error that is not going away. I debugged my code and figured it has to do ...
1
vote
1answer
36 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 ...
1
vote
1answer
41 views

RecurrenceTable [closed]

I got an error saying ...
0
votes
1answer
48 views

Table yields unexpected result [duplicate]

I evaluated Table[#[[i]] &, {i, 1, 5}] and got ...
1
vote
1answer
34 views

Export nested list with complex structure

I have a list that looks like this l = {elem1, elem2, ...} Where elem_={t, {d1,d2,d3} } How can I export it? I tried ...
0
votes
2answers
53 views

Constructing a table from a constraint on another table

I have a 1000X6 table, where in each row the first three columns are dependent on the second three. I then make smaller tables of 1000X2 from these first three columns and basically ...
2
votes
2answers
104 views

how to remove Null's from output? [duplicate]

I'm a math enthusiast and I'm looking for examples of rare divisibilities, let's look at the following one: ...
0
votes
1answer
58 views

How to speed up ReplaceAll in Table?

I am writing a code which solve a list of equations and then create a Table with resulst of equation solving. In applications where I use this code, I create a bunch of equations and my computations ...
0
votes
2answers
75 views

Function that creates a table from two lists

I have two lists shown below: list1 = {(0,0,0,0),(0,0,0,1),(0,0,1,0),...,(1,1,1,1)} list2 = {1,5,5,5,...,5} How can I construct a function that outputs a table similar to this: $$\begin{array}{c|c} ...
0
votes
1answer
46 views

Why Table is not giving me the same sequence for eigenvalues of matrix

Let consider a matrix and evaluate the time dependent eigenvalues M[t_]:={{Sin[t],Cos[t]},{t,t*t}}; e1[t_]:= Eigenvalues[M[t]] Now If I evaluate ...
0
votes
2answers
52 views

Table results within loops

I have the following code. ...