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
0
votes
1answer
38 views

Make a nested list of variable size

I want to try to make a list of lists of variable length in the following way ...
0
votes
1answer
60 views

How can I calculate the value `f(x)` in this table?

I am trying to find f(0) and f(3) to list them into a table, but I can not get that values. That is mean, I want to list the ...
0
votes
0answers
53 views

How to get this table of `(x-a)*(x-b)`, where `a > b`?

I am trying get a table of (x-a)*(x-b), where a > b. I tried ...
0
votes
0answers
46 views

Another tool besides Conjugate

Do you know any way besides Conjugate to normalize the following symmetric function and calculate "ParSym"? I realized that ...
0
votes
0answers
28 views

How to parallelize the following table

Consider a table: ...
5
votes
1answer
68 views

How to create a 2D table with varying step?

I would like to produce a table with 2 coordinates, where a step for one coordinate depends on the value of another one. I tried to do this in the following way: ...
4
votes
2answers
128 views

How do we optimise double Tables?

I have made the following code which I shall explain it in two parts: First Part: ...
1
vote
2answers
44 views

Sum up different arrays into a new array

I have a question regarding sums in arrays. So I have the following array: ...
0
votes
1answer
121 views

Table and FindRoot of a two-variable interpolated function

I am having difficulty solving for the roots of the following interpolating function: ...
0
votes
1answer
64 views

Table and FindRoot of a 2 variable function of x and t : cos(x + 3t)

I am trying implement mathematica commands: Table and FindRoot, of a 2 variable function <...
2
votes
1answer
77 views

How to decorate data in a matrix for reporting purposes?

I want to create a report from two matrices m1 and m2 (already created, and available) with data. The report should (roughly) look like the output of the following code: ...
1
vote
2answers
65 views

Incorrect results from simple `Plot`?

I came across this bizarre behaviour whilst noodling around - a change in 'Plot' results... ...
4
votes
2answers
89 views

Table the LCM of an increasing list

I want to create a table showing LCM[1,2], LCM[1,2,3], LCM[1,2,3,4], ..., LCM[1,2,3,...,m]. ...
3
votes
3answers
69 views

How to add a сolumn from one table to another?

I have a rather naive question. How does one add a column from an already existing table to another already existing table?
1
vote
1answer
67 views

ListPlot3D of the results of FindRoot

I have a system of 2 simultaneous equations where i want to calculate the values of Tc and Tc which ranging with the values of two variables which are wfc and V. I tried to evaluate it by using ...
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): ...
2
votes
2answers
123 views

Table with varying step

I would like to produce a table Table1=Table[{j,j^2},{j,0.0001,Pi,Deltaj}] where Deltaj is 0.0001 for j < 5*10^-3 and 0.01 ...
1
vote
2answers
46 views

Why does ProgressIndicator not work in the following case?

Consider a table: ...
0
votes
2answers
31 views
1
vote
1answer
40 views

How to use a table with two variables as the values for a function with two variables (x and y)? [duplicate]

I'm sorry if this is a dumb question. I am a student and have 0 prior experience with Mathematica or any sort of coding and I have looked at various resources trying to figure it out myself but still ...
0
votes
1answer
63 views

How to transpose a data of N lists?

I am using a command like this data = Transpose[{t1, Table[z1[[i]], {i, 1, 10}]}] //Tableform There will be N lists t1,z1[[1]],...z1[[10]] I would like to ...
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
42 views

Discrepancy in the solution provided by NSolve

I have a code which goes like this: First one ...
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
48 views

Changing the layout of an array in output

I'm curious about the following: if I want to make a table described by the following code, ...
8
votes
2answers
1k views

Why does a table with a defined constant in its index compute 10X slower?

I need to do some iterative summations. Here is a minimum working example: ...
0
votes
2answers
53 views

Remove 0.*I in imported table

I imported some table containing elements with 0.*I. I tried to remove this 0.*I by using ./{"0.*I" -> 0}, however, it did not work. Could you please tell me how to remove it? Edit. I created a table ...
9
votes
1answer
114 views

How to implement a resumable Table?

Motivation (my sob stories) Too many times I've run a notebook for hours and then Mathematica crashes (FE or Kernel, mostly FE) and things are lost. I've made various attempts at custom solutions ...
1
vote
3answers
142 views

Why doesn't Mathematica evaluate the series with recursion relationship as expected?

I define a series $dg(i)$ as the $i$th derivative of a function $g[t]$ for $i>0$ and known the first term $dg(1)=(t-x)g(t)$. In mathematica, the code is: ...
-1
votes
2answers
43 views

Conditional formatting of table

I have a table (from this question) as follows: ...
0
votes
0answers
30 views

Create `Table` where each line is a function of the line before [duplicate]

I've been noodling around with primitive Pythagorean triples. One of the 'branches' of the ternary tree that generates all possible PPTs from the initial parent PPT ...
2
votes
1answer
43 views

Problem with multi-columns using Grid

I am working on a data table, ...
4
votes
3answers
825 views

How to speed up large double sums in a table?

I am calculating a 3-by-3 matrix whose elements are given as follows: $$ M_{mn} = \frac{1}{N}\sum_{i=1}^N \sum_{j=1}^N (r^i_m - r^j_m)(r^i_n - r^j_n) \tag{1} $$ where $N$ is the total number of ...
1
vote
1answer
43 views

How to display properly Dataset with index column?

I'm trying to construct and display properly DataSet. Everything works fine, except the index column('Year'). I'm trying different variants: Example 1: ...
1
vote
1answer
64 views

Extracting data from Table to do arithmetic operations

I have a code, which goes like this: ...
0
votes
1answer
57 views

Variable nesting depth inside table

I hope my title makes sense. The idea is the make a function in which a set of variables, $l_1$, $l_2$, etc. are accessible inside the innermost body of a nested (/folded) function. Each of these ...
0
votes
1answer
70 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{\{ \{...
0
votes
1answer
37 views

Table and NonlinearModelFit

I am trying to make data and fit it tp a power law model. but it doesn't work. I don't know what the problem is. ...
0
votes
1answer
64 views

How do I fill a table with values from my function?

With the following function, ...
0
votes
2answers
31 views

Piecewise vector

I need to have a vector with the length of 15000. The first 4000 elements have value 12, the next 3000 elements, that is 4001 to 7000 be 0 and the rest of it to the last be 5. I have written it with ...
1
vote
2answers
56 views

Matrix whose coefficients are functions

What is the right way to declare of matrix whose coefficients are functions of a variable $x$ ? I tried : Table[Table[a[i,j][x_],{j,1,NN}],{i,1,NN}]
0
votes
1answer
77 views

Produce result faster than “Table[If[…]]”

I would like to generate a list of output satisfying some condition for instance an equation but faster than the following code: ...
0
votes
2answers
78 views

Creating a table of points for a 3D Plot [closed]

Suppose $X$ can take integer values from 0 to 10. Suppose further that $Y$ is continuous from 0 to 1. Finally, let us define $Z = X\,Y$. I now want to create a table that contains values of $Z$ by ...
0
votes
1answer
25 views

Listing Permutations of Two Elements

Let $S_{k}^{(n)}$ be the set of all possible lists of length $n$ containing exactly $k$-times $\sigma$ and $(n-k)$-times $\Delta$. For instance, $S_{2}^{(4)}=\bigl\{\{\sigma,\sigma,\Delta,\Delta\},\{\...
2
votes
0answers
72 views

ListDensityPlot using

I have two data tables with identical parts along the vertical axis. For example: ...
0
votes
1answer
43 views

Getting named functions from an sequence of parameter values applied to a parametric function [closed]

The general question is how can I loop on names and indices? An example: I have pfun = ParametricNDSolveValue[{y'[t] == a y[t], y[0] == b}, y, {t, 0, 10}, {a,b}] ...
0
votes
0answers
31 views

Table with two functions to output matrix with values

So I have a wing modeled as an .STL and I am analyzing its structure so I need its cross sectional area and moment of inertia at points along its span. I do this by moving an infinite plane across the ...
0
votes
0answers
25 views

Gradient method in vectorfield on surface table does not work, module is slow

For teaching purposes I want to generate a vectorfield on a surface an visualize the path of the gradient method. The surface and the gradient are generated by ...
0
votes
0answers
54 views

Creating a dynamic list with different subset lengths in while loop

I am trying to create 2D list or table in a while loop as below: ...
-2
votes
1answer
54 views

Show tabulated equations in matrix form [closed]

How do i put last equation, eqm[x, t, k, n] into matrix form? I want every row to end with == 0 ...