The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
2answers
38 views

Constructing a table from a constraint on another table

I have a 1000X6 table, where in each row the first three columns are dependent on the second three. I then make smaller tables of 1000X2 from these first three columns and basically ...
1
vote
2answers
56 views

how to remove Null's from output? [duplicate]

I'm a math enthusiast and I'm looking for examples of rare divisibilities, let's look at the following one: ...
0
votes
1answer
40 views

How to speed up ReplaceAll in Table?

I am writing a code which solve a list of equations and then create a Table with resulst of equation solving. In applications where I use this code, I create a bunch of equations and my computations ...
0
votes
2answers
58 views

Function that creates a table from two lists

I have two lists shown below: list1 = {(0,0,0,0),(0,0,0,1),(0,0,1,0),...,(1,1,1,1)} list2 = {1,5,5,5,...,5} How can I construct a function that outputs a table similar to this: $$\begin{array}{c|c} ...
0
votes
1answer
24 views

Why Table is not giving me the same sequence for eigenvalues of matrix

Let consider a matrix and evaluate the time dependent eigenvalues M[t_]:={{Sin[t],Cos[t]},{t,t*t}}; e1[t_]:= Eigenvalues[M[t]] Now If I evaluate ...
0
votes
2answers
43 views
1
vote
2answers
60 views
1
vote
2answers
46 views

Arrange Grid of Table elements horizontally [closed]

I have a Table consisting of an independent variable and two functions. I want to output it like this: ...
0
votes
0answers
46 views

Appending elements to a list in parallel table

Is there any way to store values in a list that is being computed in parallel? For example, if ParallelTable is computing some ...
0
votes
1answer
56 views

Plotting results of a NSolve problem

I am calculating, numerically, the zeros of a determinant. a1 and a2 are constants, q is a parameter. I would like to vary q and find the roots w as a function of q and plot roots w vs. q. All ...
2
votes
1answer
39 views

Export as Table with alignment?

I have a table in Mathematica as a list of lists. How to export the table, and force Mathematica to insert as many spaces as needed between columns so that columns are aligned? For example, ...
0
votes
0answers
65 views

Meshing of a cube

I want to mesh a cube and what I use is ToElementMesh[Cuboid[ {-1, -1, -1}, {1, 1, 1}]]. This creates a regular grid of the cube. Is there a way to specify that ...
0
votes
2answers
88 views

How to generate logarithmic/ Trigonometric tables in mathematica

I was looking for ways to create logarithmic / trigonometric tables in Mathematica. And printing them for use . Here the tables should be like standard log tables with mean differences column . I ...
1
vote
0answers
16 views

How to specify alignment of columns when exporting a table using Export, and how to use spaces instead of tabs?

I have a table in list representation. How can I export it, specifying that some columns must be right-aligned and others left-aligned? Morevoer, columns should be space-separated (with an appropriate ...
0
votes
1answer
57 views

How to sample only odd numbers in the domain of a table for list plot [closed]

The following code samples $k$ points around a circle at integer values starting from $0$: ListPlot[Table[{2 Sin[(2*y/x)*π*n] , 2 Cos[(2*y/x)*π*n}], {n, 0, k}] I ...
1
vote
0answers
51 views

Problem with ParallelTable?

I am trying to numerically solve Bloch equations using Euler's method. My code is the following ...
0
votes
1answer
54 views

Why does `Table` returns values but `Plot` doesn't plot them?

The Table function works fine and return a nice list of values ...
1
vote
1answer
147 views

Define a Recurrence Table involving other tables

I'm relatively new to using Mathematica. Previously I used Matlab, but lately I noticed that the numbers i got in both of them do not match (mostly it seems that Matlab lacks precision...). The ...
2
votes
3answers
94 views

How to automatically make the maximum of each row in a table(grid) bold?

TableForm[Table[i/j + 4*Boole[j > i] // N, {i, 3}, {j, 4}], TableHeadings -> {{"Row1", "Row2", "Row3"}, {"Col1", "Col2", "Col3", "Col4"}}] Produces the ...
2
votes
2answers
136 views

How to produce a table with column and row headers included?

I have searched and have not found a solution. n = Table[i^2 + j*3, {i, 3}, {j, 7}] // TableForm Export["stuck.xls", n] ...
1
vote
1answer
63 views

How to convert cumulative to incremental for plot

Trying to show a plot of a power function $Y = a X^b$, where $Y$ is cumulative cost and $X$ is cumulative shipments where we'd like to see the incremental cost. For $X_1$ the cost is $Y_1$, for $X2$ ...
1
vote
1answer
111 views

Table shifting bug?

I use Mathematica for calculation of coordinates in format {x[t], y[t]}. For this purpose, I wrote Module T...
1
vote
0answers
39 views

How to substitute inside Hold? How to create table of summation (with Sigma symbol) expressions? [duplicate]

I would like to create table of summation expressions, which are not evaluated, but summation limits are substituted. I can't accomplish this so far. If I write I get summation expanded. If I ...
18
votes
2answers
283 views
23
votes
3answers
2k views

Generating 250 random points crashes the kernel, but not 249

Consider the following function, which generates uniformly random points on the surface of the 2-sphere: ...
0
votes
1answer
68 views

Plot a table of functions with different color [duplicate]

I have a function with two independent variables: SNR[t_, f_] := 20 Log10[1/(2 Pi f t)] And I have a list for "t" ...
11
votes
5answers
401 views

TableAlignments -> Left not working

Bug introduced in 7.0 or earlier and persisting through 10.0.2 or later For a very simple dataset TableAlignments->Left does not work: ...
3
votes
1answer
91 views

Print array with indices

Is there a single function that prints an array together with the indices? I know how to achieve this with Grid[{Range[n],array},Frame->All], but I vaguely ...
0
votes
0answers
29 views

List of symbol names using `SymbolName` [duplicate]

With a list of variables, I want to create a table with variable names as TableHeadings. I am trying to get the list of variable names using the following code: ...
1
vote
2answers
122 views

GPA calculation from a set of randomly generated marks obtained

So, this is a homework question posed by my teacher: "A student has 10 courses. Find the ceiling value of the obtained marks and corresponding grade according to the following data Print the result ...
0
votes
0answers
35 views

How to avoid losing the done part of `Table` when stopping it? [duplicate]

Often, when I use Table, it takes too long to compute all the elements of the would-be table. I then stop it with Alt+. and ...
1
vote
0answers
46 views

Problem with ParallelTable in using externaly defined iterator [closed]

In order to reduce my computation time, I'm making some tests with parallel computation, especially with ParallelTable. Here is a simple code : ...
1
vote
1answer
97 views

Constructing new lists using Table

I tried to modify an old notebook to show a spreadsheet style output in a table. I am not getting any errors when it runs, so I think the data I am gathering and the new variables I added, ...
1
vote
1answer
80 views

Noninteger indices for tables

Is it bad programming practice to use non-integer values to label data tables? For example, ...
0
votes
1answer
99 views

Block matrix and calculate it's inverse

How to define the following block matrix $$ A=\begin{bmatrix} H-G_1 & -G_1 & \ldots & -G_1 \\ -G_2 & H-G_2 & \ldots & -G_2 \\ \vdots & \ldots & \vdots & \vdots ...
-2
votes
1answer
57 views

Create a matrix by crossing a list

I've a list L of elements. I want to create a matrix by laying each elements of L in both rows and columns where each ...
1
vote
2answers
53 views

How to Hold/Defer only one (only given) level?

Is it possible to Hold/Defer some of outer expressions, having evaluates inner ones? For example, I want to prepare a table of expression values, like this ...
1
vote
0answers
54 views

Is the “Table” function limited in number of elements it can compute? [closed]

i tried using "Table" to compute a list of 400,000 strings but the output takes forever to get. I have tried with smaller size of about 100 and i get results as fast as possible. But when the number ...
4
votes
2answers
115 views

Use the value of a cell in a table as the argument to a function

I just got Mathematica from my school and I'm trying to learn the basics. How could I use the value of a cell in a table (as in Insert->Table) and pass it as an argument to a function whose value is ...
1
vote
3answers
109 views

Applying Reduce[] to a table [duplicate]

I have a table for example: t = Table[k,{k,5}] which returns {1,2,3,4,5} and for every element in this table I want to check when it is $\leq 1 + a$. I ...
2
votes
1answer
49 views

Plot several columns of table with variable number of columns and display the legend accordingly

I use this command to plot all values from the 1st column of Table "results" against all values from the 2nd column: ListLinePlot[{results[[All, {1, 2}]]} Now, ...
0
votes
1answer
49 views

If works wrongly under Table or Sum [closed]

Table[If[i != j, 1/(j - i), 0], {i, 1, 5}] This line returns in Mathematica 9 the table with equations where i is still symbolic! Thanks for help! Sergey
3
votes
2answers
166 views

How do I display the plane of best fit in 3D?

I'm trying to display the plane of best fit in the same 3D-box. Currently, I have the following code which spits out a plot of the points in 3D. I want to have a plane of best fit, can Mathematica do ...
2
votes
4answers
227 views

How do I find the position of the maximum value in each column of a table?

Given a table of values, I know how to find find maximum values, but how do I find the position of the maximum value in each column. For example, given ...
6
votes
5answers
568 views

What is the best way to draw a shaded table?

I'm trying to format a raster-style table with row and column headings and in which each cell is shaded according to the value in the cell, and the value of the cell is displayed in as text in a ...
0
votes
0answers
42 views

Combination of interpolations doesn't work?

I have a table valued functions f[i_] and g[i_] and I need to plot various combinations of the function and its derivatives (for example: f''f, f'/f). I tried interpolating f[i_] to ->f[x] and ...
2
votes
3answers
68 views

How to manipulate one column of a table using the value in another column

Let's imagine I have the following table structure data = {{a, b}, {c, d}, {e, f}}; and I want to transform it into the following table ...
1
vote
2answers
72 views

replace two elements in a list with the sum of those two elements?

I have a list: G[3] = {2, 4, 2, 4, 2, 4, 2, 4, 2, 4} (there's a 3 in there for the 3rd Prime) Recursively defined by: ...