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.

learn more… | top users | synonyms

0
votes
1answer
40 views

reducing decimal places in a table

How can I reduce the number of decimal places within a table to let's say two digits? The default setting is 6 decimal places. this is the mathematcia code: ...
0
votes
2answers
69 views

Color according to condition. [closed]

So, my problem is the following: I have the following table ...
3
votes
3answers
122 views

How to substitute Table environments by a more sophisticated code

I often use Tables inside of Tables to fill 2 dimensional arrays. Is it possible for the lower example code to substitute the Table environments by a more sophisticated and shorter code? ...
16
votes
16answers
2k views

Generating a list of numbers that are not multiples of 4

I want to write simple code that will list all numbers from $1$ to $n$ that are not multiples of $4$. And in this case I consider that ...
0
votes
1answer
59 views

Combining first 5 columns from CSV file into AbsoluteTime date

Thanks in advance for all your help. I need to import data from a CSV file that looks like : (easier to read in excel) I would like to convert the data into timestamps by creating a Table with 2 ...
1
vote
2answers
69 views

Export NDSolve data

I have calculated a solution of a system of differential equations using NDSolve and generated a plot. How could I extract the data of the solutions? The input is ...
1
vote
1answer
71 views

First come, first save in ParallelTable parallelization

Short version of the question: In C++'s OpenMP, I know how to get what I want, but I'm wondering whether Mathematica has the same option. It's called "dynamic scheduling" when parallelizing. Long ...
3
votes
1answer
70 views

Similar Table commands differ greatly in run time

With version 10.3.1 for Microsoft Windows (64-bit), the similar codes ...
1
vote
0answers
56 views

NIntegration and DSolve with same variable

I need to solve this problem: Then follows the code, with: ...
0
votes
1answer
50 views

Grid with recurrence relation terms

I want to get the recurrence relation for several values of n in a grid form. At the moment I am using ...
1
vote
1answer
37 views

Access variable middle of the run [duplicate]

I execute a Table[] that need large time to be finished. If I abort it I loose what evaluated until now. Does it possible to stop running and save what evaluated ...
2
votes
0answers
52 views

Transposing a table [closed]

I created this table so that it is a collection of 5 different functions that I need. It outputs the values that I want, however, I cannot figure out how to get the orientation right. I would like to ...
3
votes
2answers
83 views

Table of Buttons [duplicate]

What's the correct way to form a table of buttons in which each action depends on the index in the table? E.g., I want to get {Button[1,f[1]],Button[2,f[2]]} ...
0
votes
1answer
129 views

ParametricPlot3D crashes Kernel when called repeatedly in loop

I have a parametric function surf[u,v]. It can be plotted successfully like this: ...
3
votes
2answers
147 views

Deleting vertices from a Graph and preserving structure

My goal is to remove vertices from graphs (and the edges from them) and then take GraphComplement to find out cut sets in graphs with sink and source such as here. ...
-1
votes
1answer
140 views

A pointer to the array in p1=Table in Table =p0 Eror [closed]

There is a circle of 10 points. How to draw another circle around this point from the first array? And so it drags along in the first circle. As in the program, drag the red. The coordinates of the ...
0
votes
1answer
57 views

Strange behavior of ParallelTable

I was trying to carry out the following calculations: ...
4
votes
2answers
108 views

Finding the smallest starting number producing a Collatz sequence of length 125 which ends with a value > 4

I'm supposed to do a Mathematica function that selects the smallest number not less or equal to 4 after 125 iterations. I am not good at coding, so some help/advice would be awesome. My code so far. ...
4
votes
2answers
229 views

Mysterious behaviour of ParallelTable

This question is related to Export bug in combination with ParallelTable?. The following code shows an even stranger bug than in the upper question. The y-axis should always be logarithmic, but in ...
8
votes
1answer
203 views

Export bug in combination with ParallelTable?

I am programming with Mathematica 10.3.1.0 on Windows 10 Professional 64 Bit and have an i7-4940-MX 3,1 GHz processor (4 cores). When I use in the example code below ...
2
votes
2answers
77 views

Multiplying a table with constants

I have a table with coordinates {{x1,y1},{x2,y2}} that I want to multiply with a separate constant for x and one for y so: ...
2
votes
2answers
116 views

How can I increase the precision of my table?

I want to see first 15 digits for the values in the table computed below. ...
2
votes
3answers
55 views

Specify number of elements instead of step in Table [duplicate]

I think I have seen what I was looking for a ong time ago but I can't see nothing such in documentation. Quite often, I would like to create a Table with given ...
6
votes
1answer
128 views

Why does Table behave differently in Mathematica compared to WolframCloud?

In Stephen Wolfram's elementary introduction to the wolfram language it says you can use the table function like this: Table[5, 10], to create a table of the ...
4
votes
1answer
142 views

How to increase the evaluation speed of this somewhat complicated table / matrix operation?

I'd like to calculate the following one-dimensional array: OneDimArray = Table[(Norm[Sum[ MatrixA[[i,j]]VectorB[[j]],{j,N}]])^2,{i,N}] However this takes a very ...
1
vote
1answer
196 views

Extracting data from NDSolve result

Normally I wouldn't ask such question before even read the material from the Wolfram Documentation about what I'm trying to do but this time I have a pretty tigh dead end. I apologize for that. So, ...
4
votes
1answer
89 views

How to combine two large tables and export them to .txt file?

I have two large tables. I shall post only 2 rows out of 100+. I shall name the first table blabla and the elements are: ...
1
vote
0answers
46 views

NIntegrate and Part issues [closed]

I'm trying to numerically evaluate an integral. To try and speed up the process, I decided to calculate some values that will be needed in advance using Parallel Tables. This is what I have: ...
3
votes
1answer
63 views

How to fill a tensor with matrices one by one?

I have this tensor: nn = 4; tableToFill = Table[x, {p, 1, nn}, {q, 1, nn}, {i, 1, nn}, {j, 1, nn}]; that I want to fill with a matrix one by one with a matrix ...
3
votes
3answers
177 views

Optimizing a series of basic matrix operations—scaling doesn't seem right with matrix size

I have a simple operation that I'd like to apply to an n×n matrix. My problem (well, one of them...) is that it runs in, say, 4 seconds for a 100×100 matrix, but it took five and a half minutes to run ...
-1
votes
1answer
82 views

Parallelize in Mathematica [duplicate]

Here is two test to understand the parallelize in Mathematica: ...
3
votes
1answer
113 views

Generate a 3D grid data table

I would like to generate a 3D Grid, not for displaying, but to do computations on it, so no draw functions I guess. I have a simple version of what I am thinking, however, it is terribly slow: ...
1
vote
1answer
41 views

How to make a repetive procedure with LinearModelFit [closed]

I start with a list of lists: ...
3
votes
3answers
124 views

How to make a table from two lists?

I have two lists. ...
2
votes
5answers
79 views

tabulating summation series with restrictions

Trying to solve this question for a good 5 hours but remained stuck. My intuition tells me I am missing something trivial that I've overlooked or forgotten. I am restricted only to the function 'table'...
0
votes
0answers
49 views

Time needed to solve NIntegrate is much longer than what I was expecting

I'm trying to do the following list: tablevdip = ParallelTable[{x, y, Vdip[x, y, 6]}, {x, -1, 1, .5}, {y, -1, 1, .5}];] with ...
1
vote
0answers
35 views

Defining an object which is function in some variables and tensor in some other indices

I am trying to define an object which function in some variable and tensor in other indices. My attempt at it was: ...
2
votes
1answer
70 views

Operations on dynamic arrays [duplicate]

When I do a simple operation like this fib = Table[Fibonacci[i], {i, 15}] and then look to find the position of a certain value, everything works fine: ...
0
votes
0answers
59 views

FindRoot for vectors

My problem is the following: quad = 26; R is a quad x 3 matrix, lpand ...
0
votes
2answers
118 views

How to evaluate function in the grid?

I have a function f[a_, b_]: = b^a + a b. a takes values {1,2,3,4}, and ...
1
vote
2answers
112 views

depicting specific element of a table (knowing its position) in different color

there is some 20 Time 20 tables, in each step we choose one element randomly. how can show this random selected element with different color?
2
votes
1answer
50 views

Add text label in the top-left of a TableForm

I have a function that should give a multiplication table for an integer input: TableForm[Outer[Times, Range[#], Range[#]], TableHeadings -> Automatic]& ...
1
vote
1answer
56 views

Problem averaging multiple series of data [duplicate]

Recently I'm having trouble figuring out a certain problem in Mathematica. I have a table of data in the following arrangement: {series no., x, y} Now, each series of data has exactly the same x ...
0
votes
1answer
133 views

Follow up: how to evaluate this double sum quickly

This question is a follow-up to my previous question. The code I use at the moment is the following: ...
6
votes
2answers
164 views

Grouping the list of numbers that have common.

I am working on some simple problem. It is like puzzle.. Let's say I have some list input={{1,1},{1,2},{1,3},{2,3},{3,3},{4,4}} Which means 1 can go and back to ...
2
votes
3answers
66 views

Having a function check a column and perform a task every time an entry satisfies a condition

So I have a matrix (technically a table) points = Table[{x, f[x]}, {x, Range[0, 2, .1]}]; Which gives something like this in matrixform \begin{array}{cc} ...
0
votes
1answer
58 views

Indexing a value within a table function

Is what I'm looking to do possible? I know that I can get it to work with a for loop, but a table would make things much neater. What I need to do while calculation the table below is to reset the ...
2
votes
1answer
100 views

How to download tables from a url?

I'm trying to import all the tables on a website, this one in particular: https://aws.amazon.com/ec2/pricing/ For local files that are already tabular, ...
1
vote
1answer
82 views

Defining function from table [closed]

I have a table of values of the form Table[{i1,j1}, {i2,j2}...] and I want to define a function like f[i] to take the values ...
2
votes
2answers
73 views

How to use the variables from Table in calculation

New to the site and Mathematica. I'm trying to use the finite element method to get a temperature profile. So if $q_0=f(T_0,T_1)$, $q_n=f(T_{n-1},T_n)$ and we also know that $T_1-T_0=T_2-T_1=T_3-T_2=\...