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

3
votes
3answers
174 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
76 views

Parallelize in Mathematica [duplicate]

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

How to make a table with from two lists?

I have two lists. ...
2
votes
5answers
72 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 ...
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
34 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
55 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
51 views

FindRoot for vectors

My problem is the following: quad = 26; R is a quad x 3 matrix, lpand ...
0
votes
2answers
84 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
109 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
47 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
54 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
130 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
162 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
64 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
94 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
78 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 ...
1
vote
2answers
94 views

3d Table to 2d table

I have generated a Table in 3 dimensions, for two variables x, y. ...
2
votes
2answers
151 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
52 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
134 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
59 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
60 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
145 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
123 views
0
votes
1answer
34 views

How can I plot a function of imported data that ends up nested in lists four deep? [closed]

I imported a file of data from a model that I am running for my research. It produces the following output in Mathematica: ...
-5
votes
2answers
149 views

How to create and format a table via menu [closed]

I created a 3x3 table via menu Insert > Table/Matrix > New..., but afterwards I cannot add a new line or column. The tool doesn't add a row of 3 columns, but a row of one column at the end; when ...
5
votes
3answers
249 views

How to imitate list comprehensions for constant arrays?

In Python, ['a'] * 10 generates ['a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a'] and ...
1
vote
2answers
58 views

Error Resulting from Placing a Dynamic Variable inside of Table

I want to create a list of values, True or False, and to update those values with a ...
0
votes
1answer
68 views

Count participation of variable list

I have the directed edges of a graph given by a list of variable (vertex) pairs. ...
0
votes
3answers
67 views

Generating a large table of values and selecting some of them following some condition

I am working on a problem where I have to generate a table of components while each component of the table has 18 entries. Six of the indices among 18 run from 0 to 1 while the other 12 can take ...
0
votes
2answers
61 views

Defining an array of functions with multiple indices and one variable [closed]

I have a function f of one variable x and a 4 x 3 array ...
1
vote
3answers
192 views

How to parallelize a Do loop containing URLFetchAsynchronous?

I'm have a simple piece of code: results={}; Do[If[!FailedQ[g = grab[i]], AppendTo[results, g]], {i, 2000000, 3000000}] I had thought that the simplest way to ...
1
vote
1answer
46 views

How align Table column on decimal point yet use text styling?

Form a table such as: data = Transpose[{Range[0, 5], RandomReal[{-5, 5}, 6]}]; Display it by wrapping with TableForm. Is ...
0
votes
1answer
124 views

Is there a nice way to display big nested tables?

I have a really big nested table. I can copy my code here if you wish, that is not a problem, but it will be a lot of it and I am not sure if it makes sense. the end expression is this ...
1
vote
2answers
87 views
0
votes
0answers
40 views

Dot production associated with comparison process of different matrices eigenvectors

With thanks to Guess who in the link module using.. We created functional 5*5 matrices: ...
0
votes
1answer
67 views

Module using for creating a table [closed]

I want to have a 4 tables with using of module. Unfortunately I don't know why doesn't it work ...
1
vote
1answer
74 views

Change data form Table to Array

Ok, I am trying to figure out how exactly to change the data from Table such as ...
1
vote
1answer
47 views

Find element in the table

I have a table ...
1
vote
0answers
66 views

creation a table from a default module [closed]

I have used of bisection method for finding the root of a function: ...
0
votes
0answers
28 views

Exporting data in an output file from a Do-loop evaluation [duplicate]

I want to transfer the output of the following evaluation into a two-columned data file where the first column will be values for a and the second column will be ...
3
votes
2answers
82 views

Faster use of Condition for a large array (see the example)

Here is the example/problem. I have a array of $n$ random number. n = 2000; p = RandomReal[{0, 9}, n]; I have to create a $n\times n$ sparse matrix with ...
1
vote
2answers
85 views

Formatting a table of values

How do I display a list of values $\{a_1,a_2,\ldots,a_n\}$ in a two column format? --------- 1 | a_1 2 | a_2 3 | a_3 ...... n | a_n I tried ...
1
vote
3answers
64 views

Controlling the evaluation of other arguments in pure functions [duplicate]

I have a piece of code where I would like to do the something like the following: ...
0
votes
0answers
74 views

Equation Autogeneration

The following is resubmitted as edit here to reflect suggested formatting corrections so indentations separate the lines neatly. I also fixed the unknown D variable which I actually meant to state as ...