Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

1
vote
3answers
28 views

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

I have a rather naive doubt. How to add a column from an already existing table to another already existing table?
1
vote
1answer
60 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
1answer
28 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
89 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
35 views
1
vote
1answer
32 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
50 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
48 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
41 views

Discrepancy in the solution provided by NSolve

I have a code which goes like this: First one ...
0
votes
1answer
56 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
44 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
48 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
106 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
135 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
39 views

Conditional formatting of table

I have a table (from this question) as follows: ...
0
votes
0answers
24 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
38 views

Problem with multi-columns using Grid

I am working on a data table, ...
4
votes
3answers
795 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
28 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
60 views

Extracting data from Table to do arithmetic operations

I have a code, which goes like this: ...
0
votes
1answer
53 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
54 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
33 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
59 views

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

With the following function, ...
0
votes
2answers
29 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
50 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
68 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
57 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
24 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
59 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
29 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
21 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
50 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
49 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 ...
0
votes
1answer
65 views

Generate a “real time” table of data from an animation

I have a basic animation of a parametric plot: ...
1
vote
1answer
39 views

Apply conditional styling to the rows of a table

This is a follow-on from a similar question here. If I already have a table of data, say ...
0
votes
1answer
51 views
0
votes
1answer
32 views

find in list almost equal elements, make new list correspond to position or some list

I have a list of elements called q and wish to compute Total Multiplicity of each element, and put these values in the list tm. ...
3
votes
2answers
82 views

How to create table with 2D function values?

Consider some function f[x,y]. I want to create a table in the form table = {{x1,y1,f[x1,y1]},{x1,y2,f[x1,y2]},...,{x2,y1,f[x2,y1]},{x2,y2,f[x2,y2]},...}, where $...
2
votes
1answer
76 views

Why is Mathematica “de-evaluating” my expressions when I try to generate a Table? [duplicate]

I am attempting to plot a combination of StreamPlot and ParametricPlot that is a function of a parameter. When using Manipulate or Animate, the evaluation is slow but the graphs are outputted as ...
2
votes
1answer
134 views

Problems with plot interference of two waves

I'm trying to make motion plot interference of two waves i used lines to represent amplitude and wave envelope separately. This works for the traveling waves, but no the interfering wave. i'm ...
0
votes
0answers
22 views

Simulates Timeseries with Table

i need your help again. I would like to calculate EW[k_] with EW[1],EW[2] and EW[3]. My code works only for one calculation from EW (in the code below it is EW[1]) but i would like to calculate the ...
0
votes
1answer
46 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 ...
0
votes
3answers
90 views

How can I join several plots a single figure using a Table?

It is possible to joint different kind of plot using a Table, The idea is to have a single plot. I have been trying using Show function y. But I can not get it. So It is possible also to add ...
2
votes
2answers
55 views

Table counting divisors

I have a simple table that I can't quite make work. Columns are as follows A function returning 1 if x divides ...
0
votes
1answer
60 views

Narrowing down loop to only print if certain conditions are satisfied

I have the following code Table[Riffle[Mod[{i, DivisorSigma[1, 7 i + 4]}, 47], Sqrt[7 i + 4]], {i, 200}] and it works perfectly fine. There are two modifications ...
2
votes
2answers
57 views