We’re rewarding the question askers & reputations are being recalculated! Read more.

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
2
votes
0answers
45 views

Unexpected result given by Sum

Consider the following (minimal?) working example: ...
0
votes
2answers
50 views

Problems with creating a matrix with functions

I have a function which gives me all the coordinates of a certain bloc in a lattice (with the help of another function for rows and columns): ...
0
votes
1answer
22 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
27 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
90 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
50 views

Progress indicator not working on a table

Consider the following code ...
2
votes
0answers
34 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 ...
0
votes
1answer
83 views

How to make split tables in Join?

I have a command Table0[mS_]:=Table[{mS*i,i^2},{i,1,20}] Table1=Join[Table0[1],Table0[2],Table0[3]] When calling Table1[[1]] I expect to get the element Table0[1]...
0
votes
1answer
58 views

Making a table excluding a region; conditional iteration

I just would like to create the table with the following condition; selecting the points outside a circle Norm[{x, y}] > 0.5 I used ...
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 <...
0
votes
1answer
95 views

Breaking up a list of lists

I have a list of values stored in SortedLat, where SortedLat is a list of 74 sublists, and each sublist has its first element be a string. As you can see I am trying to create the first column for a ...
0
votes
1answer
30 views

Sets of k expressions, being k a variable

I need to write something like Table[Subscript[A,i] = i, {i,5}] in order to define a set of expressions. All is OK with this, but if I try to left the number of expressions as a variable k... Table[...
6
votes
1answer
64 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
34 views

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

I'd like to plot a few curves in a plot but with different colors, like in this code : ...
0
votes
1answer
42 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
139 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 ...
3
votes
1answer
1k views

Cartesian product of sets

I have two types of sets, one of them is a list of points of the form $\{t_{k}\}$ and the other one is an interval of the form $[a,b]$. And my custom set consists of these type of sets and I need to ...
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
56 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
40 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 ...
0
votes
1answer
69 views

Generate a table of data points from a surface in 3D

I'm trying to extract the data points from a general 3D surface and saving the data points, in the form of the coordinate triples $\mathbf{ \{ x,y,z\} }$, in a table/array in the format: $\mathbf{\{ \{...
3
votes
2answers
96 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
26 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
39 views

Nested Table With Iterable Bounds

I have a set of data that looks vaguely like this: ...
1
vote
1answer
36 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
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
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
42 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 ...
1
vote
1answer
96 views
1
vote
3answers
90 views

Replacing an element in table with indices other than i & j

I have a function F, of four other f functions, as shown below (1, 2, 3, 4 are indices here, while m is an integer) F = f[m, 1]*f[m, 2]*f[m, 3]*f[m, 4] I want to ...
0
votes
1answer
33 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
46 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)]}] ...
1
vote
1answer
103 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. ...
0
votes
0answers
22 views

Error in plot - normalize

Generated equations using this: ...
1
vote
3answers
37 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
768 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
188 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
2answers
99 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 ...
0
votes
1answer
56 views

Problem with {table values} when plotting

I have a Piecewise and Nintegrate both defined with NumericQ. The NIntegrate part of the Piecewise operates when first inserted into a working program, but not when called from inside a table. Their ...
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? ...
13
votes
2answers
376 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
94 views

ParallelTable giving totally wrong answer

Following suggestion I created the simplest error giving code ...
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 ...
14
votes
3answers
5k views

Table of Variables

I use a list of variables {x1, x2, x3} to Solve a particular set of equations. I am now trying to generalise this depending on ...
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...