Stack Exchange Network

Stack Exchange network consists of 174 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
2answers
49 views

Extracting first 2 elements of table

I have a table in Mathematica as follows: table1 = {{2,4,51,2017},{20,5,21,2018},{300,1,22,2016}} From this, I was wondering how one could extract only the first ...
1
vote
2answers
37 views

Storing values of NDSolve or NIntegrate

I am looking in plotting some solutions of NDSolve or NIntegrate but they take too much time to run, thus it is not handy if I ...
1
vote
1answer
71 views

Is there any way to save time using of “Cross” or “Table”?

I need to solve a equation by NDSlove, so I write the equation first, but it takes me a lot of time. The follow is my code ...
1
vote
1answer
41 views

How can I know the value of parameters?

In the the attached image I plot two function for the parameter $a1, a2, a4$. I take $a2$ as particular value, $a1$ as discrete set and $a4$ continuous value. In the plot how can i recognize for which ...
3
votes
2answers
110 views

How to generate a “value-frequency” table with random numbers?

I want to create a "value-frequency" table from the following expression. Counts[Sort[RandomInteger[{1, 5}, 500]]] // TableForm The generated table should be in ...
1
vote
2answers
70 views

how can I make a grid?

I would like to make a grid for x between 0 to 1 and use following Table ...
0
votes
1answer
84 views

Why can”t I get a smooth curve?

I used "Table" to calculate and plot the following complicated function. First, we choose an initial value for $G$ and other parameters, but at later times $G$ changes with function $I_a$. ...
4
votes
3answers
120 views

Linearly change the step size in a table

I am trying to create a table of points, where the size of the step would change linearly from a certain value to another. Bellow is a simple code to demonstrate a table of points with a constant step ...
4
votes
4answers
268 views

Table $ 2n-1 $ from $ n=2 $ to $ 50 $ except when $ n=3m-1 $ [duplicate]

How to Table $ 2n-1 $ for $ n $ from $ 2 $ to $ 50 $, except when $ n=3m-1 $ for another integer $ m $?
0
votes
0answers
57 views

4D Table, Slider limitation and ploting ListSliceContourPlot3D

This is kinda a follow up to a previous plot where I was trying to visualize a 4D data, T(x,y,z,t) (3D space and time of temperature). SliceContourPlot3D. I wanted to move away from evaluating the ...
2
votes
1answer
378 views

Converting built-in Mathematica symbol to C [closed]

I am trying to convert my Mathematica code to C since it can sometimes takes the Mathematica code quite a while to execute since the arrival times lists are hundreds of thousands of counts long, and ...
1
vote
2answers
100 views
0
votes
2answers
41 views

Create and manipulate list with variable length?

Is there a way to create and manipulate a function of a sum of arbitrary length? Specifically, I'd like to create a function like the following: ...
0
votes
1answer
40 views

Can i plot different parameter differential equation phase plane in a line?

In order to compare with different parameter,can i use StreamPlot plot them in a line, for example: $$\dot{x} = Ax$$ When $A = [-1,0;0,-2]$, i can use code as ...
1
vote
1answer
42 views

Table of function derivative evaluation

I want to create a table with numerical values of a function derivative by using the following code: ...
1
vote
1answer
52 views

How to construct addition and multiplication table for finite field?

For example, choose $p(X) = X^4 + X + 1$, how to construct addition and multiplication tables for $\mathbb{F}_{2}[X] \mod{X^4 + X + 1} $ ?
1
vote
1answer
61 views

Pick the solutions that satisfy certain conditions

I have a large system of ODEs, and I find a large number of steady-state solutions. But many of them do not satisfy the condition that all the variables must have ...
1
vote
2answers
80 views

How to plot table with two variables?

in my script,i have defined function current(cur), which is a function of two variables resistance(res) and time(tim). Now what i need that for my function to pick a resistance value(which is a vector)...
3
votes
0answers
39 views

How can I prevent ParallelTable[] from freezing?

I have spent some time trying to figure this out. I have a function that appears to be the reason my program is freezing. I am using both MemoryConstrained[] and <...
0
votes
0answers
29 views

Using table and piecewise function together

I am trying to define an equation set, in which the function is very similar to a square wave, but instead, it is defined piecewise at each interval. Now I need to evaluate the equation at each ...
2
votes
1answer
49 views

Making a table of results from SystemModelSimulate [closed]

I am trying to simulate a model in SystemModeler from Mathematica 11.3. I wish to simulate this model for various parameter values and make a table of the output data. To attempt this I do the ...
0
votes
0answers
25 views

Generating of table of list of values of function is stucked while the function itself works fine

I have the following strange situation. I generate a table Table1[a_,b_]:=Table[{a, b,0.01*i,function[a,b,0.01*i]},{i,0,20,1}] Here ...
2
votes
1answer
35 views

Exporting a table while preserving its form

I am having some slight issues with exporting and importing tables while preserving their forms: A sample code is here: ...
2
votes
0answers
29 views

How can I deal with a SystemException?

I have a list of functions that are being evaluated, using ParallelTable[], and continue to get the error message: ...
1
vote
1answer
33 views

how to filter a table based on predicates involving column values

I would like to select a small subset of rows of a table based on a predicate involving multiple columns. Here's a small example of what I want using For[]: ...
1
vote
1answer
64 views

Procedural Function not evaluating

I have this function (Nhfunction) defined as procedural: ...
3
votes
3answers
147 views

Generalisation of a generating function

I have asked a question here. I want to reproduce the coefficients of a generating function of the form: $$(1 + x)^2 (1 + x + x^2 + x^3+\cdots+x^n)^{n-1}$$ It is important that $x_0$ and $x_n$ to be ...
1
vote
2answers
82 views

I want to set $x = \{x_1, x_2, \cdots, x_n\}$

I want to get $\{x_1, x_2, \cdots, x_n\}$. I want to use the $x_i$ as a variable. The following code did't work. ...
5
votes
3answers
91 views

Constructing possibilities of a generating function

I want to find all the possible ways that 4 variables can be summed to a given number. Suppose I have the variables $$x=x_0+x_1+x_2+x_3$$ I want to fill $x_0,x_1,x_2$ and $x_3$ such that $x_0$ and $...
1
vote
2answers
52 views

Select rows of data that satisfies both conditions simultaneously

I'm a new user of Mathematica and now I am confused by a problem. Now I have about 2 million rows of data and 3 columns, i.e. a 2million*3 table. What I am trying to do is select rows of data ...
7
votes
1answer
114 views

Combine `Table` with `Riffle`

I have table of function f[x,a]. For the sake of easy reproduction, let's limit it to a few entries - the original is over ...
0
votes
1answer
56 views

Why does Table[] slow down exponentially with increasing length? [closed]

I haven't been able to find anything to specifically answer my question: When using Table[], I find that, for a program I am working on (I would post the code but ...
1
vote
1answer
46 views

How to write conditional loop structure in a function based on input passed through that function

I know the question is rather vague so, here is what I am trying to do: Lets say we have the following function: `color[data_,variableInputs_]. Now what I want this function to do is loop over the ...
3
votes
2answers
34 views

How to use an imported table data in a calculation of f[x,y,z], where each row of the column correspond to x,y,z? [duplicate]

I have a table with desired inputs of a given function efvc[n,m,u]. I want to calculate for different values of n, ...
4
votes
2answers
74 views

f(x) having fixed significant digits in Table

Define function f Clear[f, x]; f[x_] := 2^x; N[ f[arg], #sig. digits] ...
5
votes
4answers
300 views

How to populate a table with results from a while function

Does anybody know how to save the intermediate results inside a while function in a table? Here is my code. I would like to save the x,y,counter values in a table in every step that while takes. Thank ...
13
votes
2answers
358 views

How to build a list of elements satisfying a certain property without building a list of all elements first?

Is there a way to directly build a list of elements that satisfy a certain property? More precisely, I am looking for a function IncludeIf (this is a placeholder ...
7
votes
2answers
240 views

Can Mathematica Take Advantage Of a AMD Ryzen Threadripper 2990wx 32 Core Processor?

I have a student version of Mathematica. I'm currently running it on my 8 Core Desktop. On my current Desktop I use it for Numerically integrating expressions 1000s of times, the ParallelTable ...
0
votes
1answer
36 views

Optimize time process from Table function

I have a process that consists of obtaining a data set by scanning 5 variables L, w, d, <...
2
votes
1answer
50 views

Create a table of solutions at specific parameter values for Nsolve [closed]

I want to create a table or list of solutions for some parameter values to see it rather than manually checking for each value ...
5
votes
2answers
114 views

Cumulative total of columns in a matrix or table

I have the following: matrix1 = {{a, b, c, d}, {e, f, g, h}, {i, j, k, l}, {m, n, o, p}} (Note that it's the data that matters, not the fact it's defined as a ...
0
votes
4answers
112 views

How to use If and Goto in Table loop? [closed]

I have the following code, j=0; Table[{Label[1], j = j + 1, i, If[j == 2, Goto[1], Continue]}, {i, 1,10}] which does not work; I get ...
2
votes
1answer
45 views

ParametricNDSolveValue with coupled DEs and manipulation

How do I separate the solutions to these coupled DEs in the plot? I want to plot the solutions to these equations at time t=7 as a function of parameter ...
3
votes
2answers
72 views

Label or identify points in a plot

I'm currently plotting 3 different tables. E.g.: P1 = ListPlot[{Table1, Table2, Table3}, PlotStyle -> {Brown, Green, Black}}] I need to identify those points ...
2
votes
1answer
44 views

Selecting rows from a table

I have a table given by example1=Table[N[x^(x/r), 5],{r, 1, 11},{x, 1, 10}]; example2=Accumulate[example1]; example2 I would like to use ...
1
vote
1answer
39 views

Summing results of a table

I have a simple table: example1 = Table[N[x^(x/r), 5], {r, 1, 10}, {x, 1, 10}] I want to create a new table ...
5
votes
3answers
155 views

ByteCount on Function

I was comparing RAM and CPU efficiency for List, Rule, Association, Function. The following code ...
0
votes
1answer
36 views

Converting the result of Normal@ to normal table form [closed]

Consider a command which extracts the contour of RegionPlot: ...
1
vote
1answer
46 views

How do I Map Transpose without resorting to Table?

I am trying to replace Table with more efficient wrapping functions like Map, Apply or their derivatives, like MapThread or @@@. The use of Table is a habit inherited from procedural programming, ...
1
vote
1answer
14 views

How to add additional variable columns for negated variables to generated truth table

I am creating truth table for $ p\Rightarrow !q $ with: ...