Questions tagged [table]

Questions on the use of the Table[] command and other functionality related to lists. Use the [matrix] tag for matrix algebra and related methods, and the [list-manipulation] tag for questions about transforming or operating on existing lists.

Filter by
Sorted by
Tagged with
2 votes
2 answers
73 views

Select rows with a specific element from a given table

Lets say I have 4 rows in alist = {{1, 1, 3, 3, 1, 6}, {1, 1, 3, 4, 1, 1, x}, {1, 2, 3, 3, 1, 6}, {1, 2, 3, 4, 1, 1, x}}; If I want to select and print out ...
user avatar
  • 95
2 votes
1 answer
52 views

Wierd problem with Table and Evaluate

I have a very unpleasent problem with Mathematica, precisely with Table and/or Evaluate. After solving a parametric system with ParametricNDSolve, I'd like to collect the values of the solutions $f_3(...
user avatar
1 vote
1 answer
53 views

Append data in for loop in table shape

I'm trying to append for every element of my for loop a complete table to my file myfile.dat, but everytime I run the loop I get it overwritten by the last cycle. ...
user avatar
0 votes
1 answer
60 views

Create a Table with 3 different variables from 2 Lists and 1 Table

I am new to Mathematica. I learned how to join 2 lists to make (x,y) type of representation using Transpose@{X,Y}. Now my problem is that I have to make a table of 3 variables. I have one set of data ...
user avatar
0 votes
1 answer
36 views

Mathematic doesn't compute absolute value of difference of solution of ODE from two different numerical methods

While trying to compare the solution to an ODE by 2 different numerical methods Mathematica gives a wrong result. More specifically I have te code. ...
user avatar
  • 115
0 votes
1 answer
42 views

How to compose output of NDSolve with another function? [duplicate]

If I want to solve some ODE by NDSolve but want to make a table of the solution $u(x)$ NDSolve gave me evaluated at another function, say $x(i)$, how would I do that, here's an example ...
user avatar
  • 115
0 votes
1 answer
71 views

How to find multiple zeroes of a single function

This is the problem I am solving. I have defined my wanted equation as it is shown on the picture. Finding the first 0 (root) is not difficult with using FindRoot function. The problem that i am ...
user avatar
1 vote
2 answers
94 views

Conditional mathematical expression [closed]

I want to produce A, B, C, D and E values between 0 and 2*pi with two conditions: `A!=B!=C!=D!=E` And (C,D,E)!=n*pi/2 n is an ...
user avatar
  • 319
1 vote
2 answers
60 views

Make a tabbed Workbook of Spreadsheets with TabView (and TableView) [closed]

I'd like to display a 3D table as a tabbed group of 2D tables. As a bonus incorporate TableView to enable editing. Here is my attempt:
user avatar
  • 1,288
3 votes
2 answers
103 views

Solve a differential eq with a boundray condtion and plot it

I just wanted to know how to plot this for different value of a,b and f (Table[])? ...
user avatar
5 votes
1 answer
133 views

A Naive Prime Test Implementation - Problem with Table

I tried to write a simple function which implements a naive primality test. ...
user avatar
  • 153
2 votes
3 answers
150 views

How to include index for the coefficients in series or sequence

I am trying to use the "Summation" command for the exponent and for the corresponding subscript of the coefficient, but it fails. See the example below: ...
user avatar
0 votes
1 answer
38 views

Creating table of 2 different variable and exporting them to single excel file

I want to put the results in a table for X and Rn.they are 2 different variables which don't depend on each other and plot them with X on x axis and Rn on y axis or export both of them in a single ...
user avatar
  • 37
1 vote
1 answer
57 views

How can I get a table, logarithmic in x but line in y?

The code is like: f[x_,y_]:=x^2+y^2; Table[f[x,y],{x,{10^Range[-3,2]}},{y,0,1,1}]; The table is not working now. It shows: ...
user avatar
3 votes
2 answers
188 views

Building a table

I am having trouble building a table that looks similar to this: With the values of A = 1, δ = 0.05, α = 0.33, K0 = 1, and St is a random number between 0,1. T-1 means the previous period. I have ...
user avatar
1 vote
1 answer
65 views

Monitoring Table or Do with Print

Imagine I want to track the progress of constructing a complex Table or Do object by temporarily printing the iteration number. ...
user avatar
  • 4,138
4 votes
2 answers
532 views

Tabulating and visualizing the expression 0.905*(0.1^n)/n!

I need help tabulating and visualizing the expression, 0.905*0.1^n)/n!, where n goes from 0 to 100. I want to store all the values, and use those values to plot a ...
user avatar
4 votes
1 answer
87 views

Efficient iteration of matrix multiplication into a table

Suppose I have a list of matrices $(A,B,C)$ and a vector $v$. I want to construct a table whose elements are sequential applications of these matrices to $v$, i.e., the first entry will be $Cv$, the ...
user avatar
  • 595
0 votes
1 answer
100 views

Table heading function thought Manipulate output

...
user avatar
  • 129
5 votes
1 answer
125 views

Creating a list of conditions

I am trying to create a list of conditions using Table[] in the following way: ...
user avatar
  • 1,043
2 votes
1 answer
105 views

How do I locate non-numbers

If I have a list containing both numbers and non-numbers, such as {1,2,3,4,5,6p6,7p7,8,9} how do I locate the positions in the list which do not contain numbers. ...
user avatar
  • 755
1 vote
1 answer
84 views

Set of three self-consistent coupled 'gap' equations

For a function of the kind of 5 variables, where this function must satisfy the following self-consistent coupled 'gap' equations. I want to reproduce the graphics in the paper "Phases of QCD: ...
user avatar
2 votes
2 answers
44 views

In a for loop, how do I assign a table of values to a new variable for every iteration?

I am trying to create a divided differences table for a set of data of depth n, specified by the user. I am not sure how to create and assign a new variable name for each iteration of the for loop. ...
user avatar
0 votes
1 answer
61 views

Adding every entry of two tables

I have to randomly create a polymer (random angle between parts), change a random angle by a bit (delta), and determine the energy difference. RandomAngle contains all the angles and DeltaTable ...
user avatar
0 votes
1 answer
63 views

How to use map and slot effectively?

I want to change my code from : f[n_, x_] := n Sin[x ] Table[{x, f[0, x], f[1, x], f[2, x], f[3, x]}, {x, -\[Pi], \[Pi],1.0}] // Chop with OUTPUT : ...
user avatar
  • 319
0 votes
1 answer
81 views

How can I use the Table and Append commands to make Dimen

I have two sets of data with different dimensions. I would like to use the Table function to create data to fill the dimensions and append it to the set, so both sets have the same dimensions. I would ...
user avatar
2 votes
1 answer
43 views

Looping with "Table" abreast over more than two variables

...
user avatar
  • 111
0 votes
1 answer
88 views

Compute the sum of digits of very large integers via table and filtering

I am trying to find the smallest multiple of 2022 whose digits add up to 2022. So I built a table of such numbers, then trying to see which cases pass. This number will obviously have at the very ...
user avatar
  • 389
0 votes
1 answer
55 views

How do I use Functions inside a Matrix/Table? [closed]

How do I plug in numerical values to functions that are inside tables and matrices? I've tried making a function that contains a matrix of functions. ...
user avatar
1 vote
0 answers
65 views

Stuck for 3 days on Wolframs Intro - Help! [closed]

I've been going through Wolfram's elementary introduction and solved every problem but have been stuck on this one for 3 days. I must be thinking wrong. I'd appreciate a hint. Use Part to make a list ...
user avatar
0 votes
2 answers
71 views

Why are my specified ranges being ignored while using Table?

I am trying to plot a complex function with ListPointPlot3D, which requires the use of a table. My code is as follows: SampleLevel = 0.1; ...
user avatar
3 votes
2 answers
160 views

Construct table from list of strings

I have data in this form: ...
user avatar
  • 327
1 vote
3 answers
91 views

Converting Binary Values to Points [closed]

I searched a lot for this question but couldn't find a similar question. How can I convert my binary values to points. The output of the code I wrote is below, I wrote my expectation also below. ...
user avatar
  • 113
3 votes
1 answer
51 views

Plotting DiscretePlot3D with Negative Exponents

I want to use DiscretePlot3D on a Table of values that have Negative Exponents. However, its results ends up giving a taller plot to the values with lower values (i.e. 10^-21 has a taller plot than 10^...
user avatar
0 votes
1 answer
34 views

How to export integration values to a data file? [closed]

I'm calculating quantum mechanical expectation value for a very high order truncation value. But due to low ram, it gets hung each time. So I am trying to write those data to a .dat file into the HDD ...
user avatar
  • 319
0 votes
2 answers
69 views

How to export 2730 Table with different name?

I have 2370 table which I need to export in cvs format with different name and I don't want to do it manually. Let say I have this 3 tables: ...
user avatar
  • 383
1 vote
0 answers
79 views

How to fix Mathematica crashing in the following case?

I have a problem with Mathematica when trying to glue two tables together. The tables have the form ...
user avatar
  • 3,544
3 votes
3 answers
139 views

How to shuffle just one column of table/list?

I have a list in form {{X1,Y1,type},....{Xn,Yn,type}}. X and Y are coordinates and type is a number between 1 to 15, the length of the list is 12000, so I can not upload the data here. I need to keep (...
user avatar
  • 383
3 votes
2 answers
228 views

Solving arbitrary long list of equations

Say I have equation for integer n = 1, 2, 3, ... N eq[n_] := x[n] + n*x[n + 1] == 0 And say I wanna solve for N = 2 (so I have unknowns x[1], x[2], x[3] which set ...
user avatar
  • 701
3 votes
1 answer
57 views

How to perform delta and sum functions in KroneckerProduct in Mathemtica?

I am trying to simulate a tensors which includes sum and kroneckerdelta functions, Sum[KroneckerDelta[b, d] gamma1[a, j] gamma2[j, c], {j, 1, n}]. So I have used <...
user avatar
  • 139
5 votes
1 answer
131 views

How to speed up this code with DensityPlot and Table?

I need to obtain a matrix and DensityPlot it, then perform a SingularValueList on a 200*200 matrix. But my code is slow, more than 50 seconds. I need the running time to be less than 10 seconds, ...
user avatar
  • 699
2 votes
0 answers
23 views

Constructing Table iterators programmatically: how to avoid the non-list iterator error? [duplicate]

The following simple code of course works: Table[n^2, {n, 3, 15, 2}] (* Out: {9, 25, 49, 81, 121, 169, 225} *) I would then like to construct the iterator ...
user avatar
0 votes
0 answers
17 views

How do I use 2 tables of nt X np dimensions as x and y coordinates to do a video animation?

Basically I want to do a video animation using 1 of these tables as x corrdinate (xpa) and another as y coordinate (vpa). xpa = Table[0, {ti, nsteps}, {i, nparticles}]; vpa = Table[0, {ti, nsteps}, {i,...
user avatar
  • 21
0 votes
0 answers
43 views

How to add many indexed arrays together under each other?

I have some indexed arrays like this f[1] = ConstantArray[a, {2, 3}] f[2] = ConstantArray[b, {2, 3}] f[3] = ConstantArray[c, {2, 3}] I wanna add them together ...
user avatar
  • 701
0 votes
3 answers
52 views

Generating 3D tables which are plottable

I construct a 3D table of datapoints {x,y,z=f(x,y)} in the most natural way I can think of, ...
user avatar
0 votes
1 answer
45 views

Labelling Individual Functions in a Table of Plots

How do I label individual functions in a plot that contains 25 functions in a list? Where do I put the range for the iteration variable "i" in the String Form of the Callout of the ...
user avatar
1 vote
0 answers
56 views

Find invariant tensors under two matrix

I have two $9\times 9$ matrices $g_1, g_2$ where ...
user avatar
  • 51
1 vote
2 answers
77 views

Changing list to tuple

I have the following function: range[n_] := Flatten[Table[{Subscript[v, i], -Infinity, Infinity}, {i, 1, n}, {v, {x, y}}], 1] For example, ...
user avatar
1 vote
2 answers
79 views

Parallelize elements of a vector or array

Suppose I want to calculate a vector or an array (say, for simplicity a 4-by-1 vector), but each element contains independent numerically evaluated functions $f_1,f_2,f_3,f_4$ and each takes long time....
user avatar
  • 240
1 vote
2 answers
68 views

Replacing nonzero elements of a matrix with corresponding elements of another matrix

Given an n-by-n matrix A with elements equal to either 0 or 1, I want to replace only nonzero elements (A_ij)'s by (b_ij) and leave 0's intact where (b_ij)'s are themselves elements of another n-by-n ...
user avatar

1
2 3 4 5
22