The tag has no wiki summary.

learn more… | top users | synonyms

2
votes
1answer
33 views

Can I use what “headerlines” removes from a CSV as TableHeadings for the table I create from that File?

I am reading in some data from a CSV file that has a line which gives titles to each "column". Here is an example: ...
3
votes
2answers
116 views

Table with multiple iterators running parallel

I want to use Table to generate a list, but it only allows one iterator to increment at a time. So in ...
0
votes
0answers
29 views

Generating a Table with a certian Density [duplicate]

How do I create a random table of 0's and 1's with a certain density instead of a probability? For Example: Manipulate[ Table[RandomChoice[{1 - density, density} -> {0, 1}, {10}]], ...
1
vote
3answers
67 views

Reduction of repetitive calculations in Table

If I generate two tables inside a function which are function[n_, x_, y_]:=( table1 = Table[i* x/n^x, {i,1,n}]; table2 = Table[i* y/n^y, {i,1,n}]; ) where ...
0
votes
0answers
80 views

How to be faster at making a frequency list of increasing steps

I want to find propabilities of having a sequence in a list, by using frequencies. The case is that you will bet on an increase when the last event had an increased and bet on derease when the last ...
1
vote
0answers
51 views

Moving two Spheres in the Opposite Direction [closed]

We know that we can achieve to a box contained two spheres by the code: Graphics3D[Table[Sphere[{i, Mod[i^2, 10], Mod[i^3, 12]}], {i, 2}]] How can the left ...
1
vote
2answers
63 views

Problem with exporting lists to Excel

When I use the form Export["file", list, "Table"] to export a list to Excel, I get columns of lists. I want my Excel sheet to have each list element in a separate ...
6
votes
7answers
297 views

A problem involving classification of data

Toady, I encountered a problem while trying to classify certain data. I have the coordinates of six points. ...
2
votes
2answers
84 views

Specify column width while exporting

I am trying to export a set of data into a file but I can not force mathematica to keep a certain width for each column. For example, when I export a table: ...
0
votes
0answers
51 views

Maximum and mean of a multi-variate function over a restricted lattice

I have a function Q, and I want to find the maximum value, the corresponding arguments for the maximum value, and the mean over a certain range of arguments. I ...
0
votes
1answer
44 views

Why does one Monitor expression work while another fails?

I have a (somewhat involved) function f[x?NumericQ, y?NumericQ] and for some reason it behaves differently when given a Table ...
0
votes
1answer
52 views

Extract a smaller matrix from a bigger one [closed]

May be duplicate, but, how it is possible to make a matrix or table of smaller dimensions, from a matrix with bigger dimensions. I mean, one may want to extract a 25*25 table from a 25*50 matrix. I ...
0
votes
2answers
57 views

Import array indices from Excel

In an Excel file, I have some numbers which I will use as the indices of arrays. I want to read those numbers and assign them as the array indices in Mathematica. For instance, in Excel I have and ...
0
votes
1answer
41 views

Import a data stored in EXCEL and change it to a Table [closed]

I have an EXCEL file in which large amount of numbers is stored in a column in the first sheet, like data in the column A of the sheet1 of excel file. When I apply the Import function; the data is ...
0
votes
0answers
33 views

noninteger indices for tables

Is it bad programming practice to use non-integer values to label data tables? For example, Do[data[dBx, Bz] = Table[{x,f[dBx,Bz]}, {dBx, .1, .5, .05}, {Bz, .4, 1.5, .1}] instead of introducing ...
2
votes
1answer
56 views

Table with some editable cells

I have a table: I want it to be editable only where the zeros appear. I read this post Generating an editable table that can be used as input because it's almost exactly what I want, but I couln't ...
3
votes
8answers
337 views

How to add a column to a table that counts the number of times the lines appear?

I am at a complete loss at this. I have a table with 2 columns and n lines. Some of the lines are repeated. What I want to do is add a new column that counts the number of repetitions of each line. ...
2
votes
2answers
94 views

Create a matrix of matrices using Band and ArrayFlatten [duplicate]

I can easily write a simple Band matrix using: SparseArray[{Band[{2, 1}] -> a}, {Dim, Dim}] where a is a number. Now, I ...
1
vote
2answers
112 views

dropping a row with at least one value larger than a particular value

So for instance I have M X N table. I want to drop any row which has an element larger than, say, one in the second or the third column. I guess I have to do some sort of pattern matching. But not ...
1
vote
1answer
54 views

Removing outermost braces

I want to calculate the Kronecker product of several matrices in different orders. the number of these matrices must be changeable. ...
2
votes
3answers
90 views

One-column table not properly displayed by TableForm

I want a table with a single column of data, and with headings along both the rows and the column. One might expect it to work like this: ...
0
votes
1answer
61 views

How do I save the values in a table? [closed]

I have written the following sequence. I would like to save the resulting values in a table such that I have a list of all the values at the end the For loop. How do I proceed? My goal is to sum up ...
2
votes
1answer
154 views
2
votes
1answer
92 views

Loop in solving multiple matrix calculation

I am wondering is there a way to use loop, like Do, For, to rewrite the last line in the code. I tried to use ...
0
votes
0answers
28 views

Table of values for functions with random variables [duplicate]

I'm trying to get a table of values for functions with random variables. First of all, i have a function like that: ...
1
vote
2answers
200 views

A fast way to compare interval

I have a list of intervall. Some of these intervals are disjoint, some are overlapped and some are included in others. To leave no ambiguity about my explanation, you can see the following examples: ...
0
votes
1answer
87 views

Factor vector out of a matrix

I am wondering how to factor a[1],a[2],...,a[4] out of sim so that I can write sim as the ...
0
votes
0answers
30 views

Adding columns of data to a matrix [duplicate]

I create a matrix of values using Table. Here's my code: ...
0
votes
0answers
62 views

scatterplot from 3d table

I am using this code: ...
0
votes
1answer
68 views

Strange behaviour of “Make Table” with exponential function

I am trying to create a simple interpolation of 1-Exp[-x^2] function, over the logarithmic grid, but I am stuck due to some unexpected behaviour: ...
0
votes
1answer
85 views

Dealing with nested lists

This question is strongly related to: Map and Apply a function on a nested list I am in a bit of a rut in terms of my MMA skills and looking to improve my coding. I've realized that rather than ...
4
votes
2answers
249 views

What is the Mathematica way of joining two tables?

Is there a special Mathematica way of joining tables of data together, so that I would get similar functionality as if I was running a database with sql? For example, I have one particular table ...
0
votes
1answer
44 views

Drop last element of parts of a list [duplicate]

just a simple question for now I guess: I have a list: list={{1, 2, 1}, {1, 10, 1}} I simply want to Drop the last element of the two entries of the list, that ...
1
vote
3answers
108 views

How to print horizontal lists in TableForm?

How to print the table with the first column as $\{1,2,3\}$ instead of $\begin{array}{c} 1 \\ 2 \\ 3 \\\end{array}$? ...
0
votes
1answer
43 views

Export data as XLS file

data = WeatherData["WMO44207", "Temperature", {{1950}, {2013}}] This list contains 11400 records ... date,temperature value .... I want to export all records as ...
4
votes
2answers
201 views

Labeling a grid

I have m = {{0, -1, -2, -3, -4}, {1, 0, -1, -2, -3}, {2, 1, 0, -1, -2}, {3, 2, 1, 0, -1}, {4, 3, 2, 1, 0}}; And a grid ...
0
votes
0answers
23 views

How to put the values/points in a loop into a plot? [duplicate]

I've already make the do loop..it has 200 points..how am i going to put those points into a plot?do i need to make a list@table before doing the plot?here's my loop example, ...
0
votes
0answers
31 views

Import .dat table but losing decimals [duplicate]

Data, tab-delimited: 230534.552 0.002804 230534.674 -0.016347 230534.796 -0.016737 230534.918 0.013062 230535.041 -0.0033244 230535.163 0.023205 I run arr = ...
0
votes
1answer
30 views

How to use more/less black textcolor in function of the value of numbers in a table?

A few weeks ago, I viewed in the Mathematica Documentation any page withmultiple examples using diferent styles dpending on the value of the number in position (i,j), but I canĀ“t remember... and I ...
2
votes
2answers
259 views

Get positions of all non zero matrix elements

I want to find all non zero elements of a table and I want to create a list that contains the name of the table the element was removed from, the position of the element, and the value of the element. ...
1
vote
1answer
55 views

How to create list of delayed rules? [duplicate]

I am trying to make a ButtonBar that prints the name of the card in question. What I have so far is as follows: ...
1
vote
1answer
43 views

Creating text using Table [closed]

I have a really trivial question. I want to create a table containing the text "this number = k" where k is the value of the iterator in the Table function. I tried ...
1
vote
1answer
70 views

Optimizing evaluation time

I have the following code and it takes like foreeeeever to evaulate: ...
0
votes
0answers
57 views

How to compute variances from a matrix/table

I have created a matrix/table with an imported dataset. I want to know what the variance is for 3 values at a time but across 68 columns. I would like to do this in an automated way rather than 1 set ...
2
votes
2answers
89 views

Automatically highlight certain cells

I am looking for a method to highlight certain cells in a table/Grid based on meeting some user defined conditions. As an example: ...
2
votes
1answer
69 views

Export CSV from tables

I am reading my csv which looks like: float,float,float,integer,boolean I read it with: ...
0
votes
1answer
71 views

Creating If statements programmatically [duplicate]

I want to write an algorithm that returns a sequence of numbers, starting from a specified point but stopping once a criterion has been reached. For example ...
3
votes
2answers
96 views

TableForm with a title

My question is rather simple. I want to put a title into a table. For example, consider a list with depth two and a title ...
4
votes
3answers
146 views

Using If statements internal to Table [duplicate]

Is there a way to use If statements with Table? To give a kind of ridiculous example that captures to spirit of what I'm trying ...
1
vote
2answers
107 views

`Slot` (#) interfering with evaluation

In the following I am using one function makeFunc to assemble two functions a[t] and b[t] to ...