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
-3
votes
3answers
65 views

How to print by using For loop?

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 T1 for values of mu ...
2
votes
0answers
66 views

Unexpected result given by Sum [on hold]

Consider the following (minimal?) working example: ...
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 ...
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
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 ...
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
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
140 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
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 ...
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
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 ...
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)]}] ...
0
votes
0answers
22 views

Error in plot - normalize

Generated equations using this: ...
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. ...
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
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
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 ...
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
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 ...
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
40 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
52 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 ...
5
votes
1answer
157 views

How to set Color range for ContourPlots?

I'd like to set the color range for a set of ContourPlots within a Table. Please notice that the colors in the uploaded picture aren't the same from one plot to the other, (take a look to the ...
1
vote
1answer
29 views

StartingStepSize as a table in NDSolve

I would like to solve a list of equation with NDSolve with each equation having a different StartingStepSize. When I tried naively to use a table in the option NDSolve gave me an error. The only ...
2
votes
1answer
33 views

Make a table for a function that varies depending on the argument ranges

I would like to create a Table for the value of a function $f(x,y)$, the form of which changes depending on the ranges of $x$ and $y$. For instance, $f=x+y$ for $x\...
0
votes
1answer
73 views

Mathematica quits its calculations automatically

I am trying to plot the ListPlot3D but mathematica quits calculations without any warning or error. ...
3
votes
3answers
216 views

How to plot multiple functions from a list

I'd like to get separate plots for the functions in a list, and I'm trying the following, which doesn't work. What is the correct way to do that? ...
8
votes
4answers
333 views

Optimising Table wrapping over a Select

Suppose we have the following lists: ...