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

2
votes
0answers
42 views

Transposing a table [on hold]

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
66 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
56 views

ParametricPlot3D crashes Kernel when called repeatedly in loop

I have a parametric function surf[u,v]. It can be plotted successfully like this: ...
0
votes
1answer
24 views

Deleting vertices from 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. So How can I delete vertices from a ...
-1
votes
1answer
133 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
45 views

Strange behavior of ParallelTable

I was trying to carry out the following calculations: ...
4
votes
2answers
73 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. ...
1
vote
2answers
283 views

How to optimize this code?

I am implementing a code that works correctly but it takes too much time. I did not see how to optimize it to be run quickly. Here is my code: ...
1
vote
1answer
79 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 ...
3
votes
0answers
72 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
73 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
100 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
44 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 ...
4
votes
1answer
79 views

Why does table behave differntly 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 element 5 repeated 10 times. This works in ...
4
votes
1answer
90 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 ...
3
votes
1answer
164 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
78 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
34 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
48 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
165 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
67 views

Parallelize in Mathematica [duplicate]

Here is two test to understand the parallelize in Mathematica: ...
3
votes
1answer
104 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
37 views

How to make a repetive procedure with LinearModelFit [closed]

I start with a list of lists: ...
3
votes
1answer
59 views

How to make a table with from two lists?

I have two lists. ...
2
votes
5answers
65 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 ...
1
vote
1answer
73 views

Plotting data from a Table in Mathematica

I have been able to solve some differential equations using Tables. The code works fine without errors. However, I am unable to plot the results. Any help would be appreciated. ...
0
votes
0answers
48 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
32 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: ...
1
vote
1answer
51 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
48 views

FindRoot for vectors

My problem is the following: quad = 26; R is a quad x 3 matrix, lpand ...
0
votes
2answers
62 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
97 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
39 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
52 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
123 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
154 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
61 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
56 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
81 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
66 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 ...
0
votes
0answers
51 views

Plotting a parameterized vector in the x-y plane

I am trying to plot the trajectory of a parachutist descending at a constant vertical rate of 8 m/s while a south wind also blows at a rate of 8 m/s. He initially jumps from a height of 300 m. I am ...
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 ...
1
vote
2answers
80 views

3d Table to 2d table

I have generated a Table in 3 dimensions, for two variables x, y. ...
2
votes
2answers
135 views

How do you program a large table and search the minimum in each column? [closed]

How does one program a table (2d list) with a huge amount of data which can be done manually. For example: the rows go from -1 to 1 by step 0.0005 and the columns go from -3 to 3 by step 1. ...
1
vote
1answer
48 views

Triangular inequality condition

I have to calculate the following table Table[ ThreeJSymbol[{j1, 0}, {j2, 0}, {j3, 0}], {j1, 1, j1max}, {j2, 1, j2max}, {j3, 1, j3max} ]; in such a way that ...
0
votes
4answers
126 views

How can I write the natural numbers less than $n$ that are coprime to $n$? [duplicate]

How can I write the natural numbers less than $n$ that are coprime to $n$?
2
votes
1answer
56 views

Import tabular text data

I have a text file created with a bash script I wanted to read the data avoiding the first line. I have written few dirty codes, but I wondered if anybody can do it in fewest possible nice one ...
1
vote
2answers
53 views

Creating a Table with a list of If statements given in a certain order

I am trying to create a conditional Table with If statements, where I move to the next condition only if the first one is satisfied, otherwise I "Break[]" and move to the next element of the table. ...
2
votes
1answer
129 views

Format tabular data with a certain row highlighted

I have tried a method to highlight certain rows in various tableform. An example: ...
1
vote
1answer
120 views