Questions tagged [table]

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.

Filter by
Sorted by
Tagged with
3
votes
3answers
76 views

How to join many tables side by side?

I have function for table $t$ t[n_] := Table[i*n, {i, 1, 3}]; For example t[1]=(1, 2, 3), t[2]=(2, 4, 6), and t[3]=(3, 6, 9) To join $n=3$ tables side by side ...
0
votes
1answer
31 views

Misbehaving `Table`

(To be fair, it's not Mathematica that is 'misbehaving'; this is actually down to my limited coding skills.) I have the following Table: ...
3
votes
2answers
95 views

Print command in matrices to generate inactive numbers

I would like to generate a matrix with elements that come from a print command and are numbers and then multiply the first matrix by another one, element by element. However, I would like the ...
4
votes
3answers
405 views

Generating all 2x2 matrices with entries from 0 to 3 whose det is 1 with mod 2 arithmetic

I am trying to make a list of 2x2 matrices whose entries are all possible permutations of 0,1,2 and det=1 mod 2 arithmetic. First I tried to create a Table like this ...
0
votes
2answers
71 views

Change Equation E(T,u) and N(T,u) in T(E,N) and u(E,N)

I am pretty new on mathematica and I have three functions, each defined by an analytic expression: ...
1
vote
0answers
23 views

Coordinate transformation of a table of multi-variable function values

I've created a table in Mathematica for a function dependent on r and phi of the form ...
2
votes
2answers
103 views

Finding a program that can find integer solutions for large values of a variable

I've the following code: ...
1
vote
1answer
44 views

How to Make Table Headings [duplicate]

In the code below, how can I add (left to right) column headings "n", "pp","aa"? There is also a shift in the alignment across the generated rows. ...
-4
votes
3answers
84 views

How to print by using For loop? [closed]

For[mu = 0; mu < 6, mu++, mu = -4.84*10^(-4) - 17.82*10^(-4)*T1 + 1.53*10^(-4)*T1*2.303*Log[T1]; Print[T1]] I want to get the value of ...
2
votes
0answers
66 views

Unexpected result given by Sum [closed]

Consider the following (minimal?) working example: ...
0
votes
1answer
25 views

error for NMinimize with Parameters in the form f[a_]:=NMinimize

I'm trying to write a function of a variable as the argument of a minimization where that variable comes to play. Here is the code : ...
2
votes
1answer
41 views

Use a list with single number for the second input of Table

As you see both inputs below give the same results. Is there any reason to use List[3] instead of just 3 in the first case? <...
0
votes
0answers
31 views

Simulating a function with no closed form solution

So I am trying to simulate a function in 3d. Suppose our function looks like this: f=k*r*a I am interested in simulating the numerical values of k when r is ...
1
vote
2answers
94 views

Creating tables with Do command [closed]

Why when I perform this code am I not producing tables called roots[j], each containing 3 elements which are the roots of the equation? When I type roots[0] for example I get about 100 answers for z ...
3
votes
2answers
57 views

Progress indicator not working on a table

Consider the following code ...
2
votes
0answers
35 views

NMinimize with real solutions, problem in the resolution and criteria for other ways to solve equations

I have multiple parts in my question. You are welcome to answer to any of them :) Part 1 : I have 3 equations $p(x_1,y_1)=p(x_2,y_2),\mu_x(x_1,y_1)=\mu_x(x_2,y_2),\mu_y(x_1,y_1)=\mu_y(x_2,y_2)$. I'm ...
2
votes
1answer
57 views

Show all dynamic changes on button press

This is probably a silly question, but I've spent all day trying to figure it out and I can't. Below is the code. ...
0
votes
2answers
30 views

Plotting 3-d function using Evaluate and Table

I want to plot $z(F, x, \lambda)$ where I fix a few values of $F$ and $\lambda$ and see how it varies with $x$. With 2-d functions, I could vary the second parameter easily using a combination of <...
6
votes
1answer
66 views

Creating a summation table

Let's say I have a list of values, for example {3,7,8,10}. Now I want to make a function that creates a table T in the following way: $\begin{matrix} 3&7&8&10\\ &10&15&18\\ &...
1
vote
1answer
43 views

Different colors for each curve in a Plot[Table[],{}] [duplicate]

I'd like to plot a few curves in a plot but with different colors, like in this code : ...
0
votes
1answer
43 views

Using NMinimize with Table to plot an energy

I would like to reproduce the solid blue line of Figure 2a in this article. For this, I have used the code found here. Notice, however, that I am not succeeding. Could you help me? Here is my code: <...
6
votes
1answer
141 views

How can I accelerate repeated interpolation of a very large dataset?

I am solving a 4D time-dependent PDE using a discretization method. My query is not about solving this; because I am doing it in the following code. The code is OK and it works fine. My main problem ...
1
vote
1answer
42 views

ListPlot of Table comes back empty

I am trying to do something I assumed would be simple, but I'm hitting a roadblock and I don't know why. I have the following table: ...
2
votes
1answer
59 views

How can I generate an array of plots and export them?

I would like to save a list of plots generated using Table. I've tried to generate a 3 x 3 array of plots using the code shown bellow. (But a general code can ...
0
votes
1answer
43 views

How to create a correct density plot from “NDSolve” solution?

I would like to create the projection of a solution in plane from the differential equation set solution. However, the way I did it is not as I would like it, it does not have a smoothness. Here's ...
3
votes
2answers
98 views

Table to generate colossally abundant numbers not working

I'm trying to tabulate the first 8 colossally abundant numbers defined by critical epsilon values, with epsilon listed in ...
0
votes
0answers
27 views

How to count n observations/ rows in a table?

What is the expression to count the rows/ observations? This is how I entered data: ...
1
vote
2answers
40 views

Nested Table With Iterable Bounds

I have a set of data that looks vaguely like this: ...
1
vote
1answer
37 views

ContourPlot a list of equations generated by the Table command

The first command below produces proper contour lines while the second command produces an empty plot. I would think that the two commands should produce the same output. What's going on? ...
2
votes
2answers
54 views

Hiding variable names in function definitions

I have a problem where Table and similar functions' substitution variable name can conflict with names in my function it self. Here's a minimal example ...
2
votes
2answers
86 views

Optimising Table iteration

I've asked a question here which was resolved by tweaking my code a little. So I shall reiterate, for the following list, ...
0
votes
0answers
47 views

Iterating over a list and defining the range accordingly

I have the following list, l = {{"a", "b"}, {"a", "b"}, {"c", "d"}, {"e", "f"}, {"e", "f"}, {"x", "y", "z"}, {"m", "n", "o"}, {"p", "q", "s"}}; for each ...
3
votes
1answer
50 views

Conditional formatting of `Table` with `Join` and `Transpose`

A simple example of what I'm trying to do (but I want to be able to apply the same principle to much larger data sets and with more complicated functions for low ...
0
votes
0answers
24 views

Contour 3DPlot of four sets of data

I have four different functions that can generate four different datasets. I want to be able to generate a single 3D contour of the result. I've tried many things and basically I am not getting ...
0
votes
1answer
34 views

Create a table from a list with lag values

Suppose I have a list as list1 = {1,2,3,4,5} How could I create a table such that the first entry is the lagged entry of this list, i.e: table1 = {{0,1},{1,2},{2,3},{3,4},{4,5}} Thank you.
0
votes
1answer
48 views

Building a table from two lists taking every element from the 1st list and every 5th from the 2nd

How do you get a conditional to work in the bounds of a Table: Table[{A[[i]], "->", B[[j]]}, {i, 2}, {j, If[j = 1, 5, (5*i)]}] ...
0
votes
0answers
27 views

Error in plot - normalize

Generated equations using this: ...
1
vote
1answer
104 views

Combining 2 Files . 1 line to many lines

2 Files A and B. A has 2593 lines and B has 18900000. I would like to Take A[i] and associate(added to the same line) it with 720 lines of B. Then A[1+1] associate it with the next 720 lines in B. ...
1
vote
3answers
41 views

Highlight largest value in each column of `Table // TableForm`

I am exploring colossally abundant numbers; in particular the set of specific 'critical epsilon values'. I table the function DivisorSigma[1, n]/n^(1 + \[Epsilon]) ...
8
votes
4answers
770 views

How best to join tables, which have different lengths on the same column values which exist in both tables?

I think my problem is pretty simple, and in SQL this would be trivial. I have two tables ...
11
votes
1answer
197 views

What is the best way to use errors in mathematica M12?

Since ErrorListPlot has been superseded by new functionality in ListPlot for Mathematica 12.0, what is the best way to handle ...
2
votes
1answer
43 views

How to preserve multirows when exporting TableForm results?

I've created a table of data in Mathematica with a list of values with each data point. So for example, I have the following dummy data: ...
2
votes
2answers
100 views

Map vs. Table for index-specific operations on 2D arrays–Part II

This is an extension of my recent question, Map vs. Table for index-specific operations on 2D arrays For that question I gave a minimal working example, since I was more interested in learning ...
1
vote
3answers
47 views

How to making a repeting list out of tables?

I'm a little bit trouble with the below task, I'd like to make a repeting list out of a table. This is the starting point for the list And I like to make them into this form: How should I make this? ...
0
votes
1answer
48 views

How to use a Table to generate numerical data from tridimensional scalar or vector function? [closed]

I am interested to generate numerical values for a scalar and vector function (both are complex functions). My question and concern are how is possible to evaluate if the functions have three ...
13
votes
2answers
388 views

Map vs. Table for index-specific operations on 2D arrays

Many experienced users on this site tend to use Map (and its variants, MapAt, MapIndexed, etc.) rather than Table. When applying the same operation to every element of an array, Map does seem more ...
2
votes
1answer
99 views

ParallelTable giving totally wrong answer

Following suggestion I created the simplest error giving code ...
13
votes
1answer
150 views

Can't make more than 249 Internal`Bags in a Table

I need a lot of Internal`Bags so I made them with Table. It works fine for 249 or fewer Bags...
0
votes
2answers
41 views

Table with multiple indices and constraints (conditions)

I want to make a table with following data, $a_{ij} = b_{ij}$ for $1\le i <j\le n-2$ and $|i-j| \ge 2$.
0
votes
1answer
53 views

How to plot multiple functions in a graph with different colors?

I have a general {i,x,y} dimensional matrix, and I want to plot all "i" {x,y} matrices in one graph. How can I do it in a way that I can still distinguish each "i"th curve from the other (I mean ...