The tag has no wiki summary.

learn more… | top users | synonyms

31
votes
6answers
2k views

How to visualize/edit a big matrix as a table?

Is it possible to visualize/edit a big matrix as a table ? I often end up exporting/copying big tables to Excel for seeing them, but I would prefer to stay in Mathematica and have a similar view as in ...
17
votes
5answers
715 views

Instruct a Table to only evaluate until a condition is fulfilled

I am looking for the way of building a Table of pairs of numbers in a fast way. My true table evaluates huge functions, and I see no way and reason to show those cumbersome expressions here. Let us ...
14
votes
3answers
1k views

WYSIWYG table creating and editing

In Microsoft Office OneNote 2010, creating and editing tables is easy. There are simple toolbar controls for creating tables: , and editing them once they exist: . My question is, what's an easy ...
11
votes
4answers
463 views

Calling Table with custom iterator

I often find myself in situations where I, for example, need to build a table for some expression, but want to set the number of points rather then the step size, so the code ends up looking like this ...
10
votes
6answers
724 views

Multiplying two dimensional data by a constant

I have a list of lists of the form: {{1, 2}, {2, 4}, {2, 8}} But I want to multiply only the second dimension of that data by a constant. I know I could do this ...
10
votes
5answers
363 views

TableAlignments -> Left not working

Bug present in versions 7 through 10.0.0. For a very simple dataset TableAlignments->Left does not work: ...
10
votes
2answers
2k views

Is there a Mathematica equivalent to MATLAB's logspace? [duplicate]

Possible Duplicate: How can I get exactly 5 logarithmic divisions of an interval? I want to use Table to generate a list of items, but want the indices ...
10
votes
5answers
432 views

Relational joining of tables

A common thing to want to do with data is to combine it (at least I thought this was a common thing). In SQL there is the idea of table joins "select id,v1,v2 from A,B where A.id=B.id" kind of thing. ...
8
votes
1answer
165 views

Why is building a table of function values so much slower than just plotting the function?

Here is a function that take some time to evaluate: n = 1000; coeffs = RandomVariate[NormalDistribution[], n]; f[x_] := Sum[coeffs[[k]] Sin[k x]/k, {k, 1, n}]; ...
8
votes
2answers
254 views

Correct way to generate large data sets (i.e.forward yield curve )

I would like to generate a set of forward yield curve matrix of size 1000 x 100. First I defined my SparseArray of 1000 x100: ...
7
votes
3answers
260 views

How do I avoid scoping collisions of iterator variables?

Yesterday I had an issue that kept for quite a while. My code wasn't producing the right results. Now I know why and I am wondering how to avoid the issue in future. Consider the following code. ...
6
votes
2answers
444 views

Merging two Lists

I have two tables. One is given by T1 = Table[{x, y, 0.}, {x, 0, V},{y, 0, V}] and from a calculation I have the second, a list of points {x, y, z} ...
6
votes
7answers
330 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. ...
6
votes
2answers
299 views

Is there a Break[] equivalent for short-circuiting in Table?

I am running Mathematica 7. The following is admittedly a silly example, but suppose that I have a list list whose entries are either ...
5
votes
5answers
209 views

How to make a table of $\sum_{i=1}^n$?

I want to create a table of $\displaystyle \sum_{i=1}^n i^k$ for $1\le k\le 5$. The output I want to obtain is a TeXForm output as follows. \begin{align} ...
5
votes
4answers
146 views

Getting the number of frequency in a list

I want to know how to make a tally board in a specific data appear in a list. E.G. n ={1,2,1,4,3,1,4,5,3,2,4,5,6,3,4,2,2,5,2} and get ...
5
votes
4answers
420 views

A fast way to compute arrays avoiding If or Which

I found out that if I have to calculate huge arrays with most of the elements being zero( let's say each row has 10000 elements and only 8 are non zero) and the non zero elements' positions being ...
5
votes
4answers
182 views

Creating simple table

How do I create a table like this? I find it very hard to create the zero-row and zero-column. Edit: I am looking for a solution where a formula eg. Table or something else is being used. I can ...
5
votes
2answers
219 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 ...
5
votes
2answers
1k views

How to export results of an analysis in table format into MS word file

I'm working on a simulation study using Mathematica 8. At the end of the analysis I'll have a matrix of data containing my results (assume for three variables like x,y & z). I used these codes for ...
5
votes
2answers
295 views

How to create this list more elegantly

There is list containing some $(i,j)$ values of indices. Now i want to create a matrix of dimension n $\times$ m whose entries are 1 for the indices corresponding to the given list otherwise its ...
5
votes
2answers
187 views

Interactive grid

I would like to create an interactive grid, whereby one number from a grid is selected by the cursor ("3" in the example below), and all other numbers in the grid are highlighted that are related to ...
5
votes
1answer
248 views

Making the TableForm output into two columns

I have a program that calculates Christoffel symbols for a given metric, and the output I'm getting now is such that I have every calculated symbol in one column like this: I'd like that I could ...
5
votes
1answer
98 views

Finding minimum fly-by radius between Mars and spacecraft from interpolating function

I've written an interplanetary trajectory solver/plotter that plots the path taken by a spacecraft on an Earth-Mars mission, but have run into a little trouble when the spacecraft actually reaches ...
4
votes
4answers
828 views

How can I format a table to look nice?

I have this code, but i would like to see the results well formated, How can I obtain a well formatted data with aligment?, similar to this one insted what i obatin, you can see here Here is ...
4
votes
3answers
270 views

How to create a table?

I have looked here at the forum and on the mathematica documentation center though still couldn't get it to work. I have two lists ...
4
votes
2answers
208 views

Extracting data from a table under conditions

I have a very large table with two columns. Let's say the name of first column is E and the name of the second is P. How can I get the E values when P = 0.
4
votes
3answers
199 views

Skipping over iterator values in a Table

I have been using the built-in function Table for some computations. (The following is not an actual representation of the equations I am using). ...
4
votes
3answers
197 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 ...
4
votes
4answers
96 views

Syntax for Table with a pure function

I have: g = #1^2 + a #2^3 / #1 & Now I wish to make a Table evaluating this from 1 ...
4
votes
2answers
176 views

Single Legend for a Table of Plots

For this toy problem ...
4
votes
3answers
130 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
2answers
151 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 ...
4
votes
2answers
947 views

How to create a Table of Tables with indexed variables

I want to use concise code to generate a table of values that list the addition of a set of vectors. What I am looking for is essentially a Table of Tables. I will show here the kind of lists I want, ...
4
votes
2answers
306 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 ...
3
votes
8answers
351 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. ...
3
votes
5answers
156 views

Creating a conditional table

I'm trying to create a conditional table. Let's say I want to have such result: {1,2,3,4,5,0,0,0,0,0}. The idea is to create a table of n elements (10 in a given example), but when one element takes ...
3
votes
4answers
152 views

AccountingForm w/o significant figures

Basically I want to build a chart like something I would do in Excel. It should look like this: Here is the formula I'm using and what I've done so far ...
3
votes
2answers
230 views

How to create a 'shortest-path link matrix'?

I am currently struggling with a problem in Mathematica. I have a randomly generated weighted Barabasi-Albert graph and a corresponding demand matrix of the same size. I'm generating the graph with ...
3
votes
1answer
341 views

Why am I getting so many error messages from my pendulum simulation?

I'm doing my end of semester project for a physics class. We were supposed to graphically model a physical occurrence; I chose doing a Pendulum Wave. I have my code written, however Mathematica keeps ...
3
votes
1answer
259 views

Why can't Mathematica parallelize this?

The following code makes mathematica print "ParallelTable::nopar1: [...] cannot be parallelized; proceeding with sequential evaluation." ...
3
votes
1answer
252 views

Cartesian product of sets

I have two types of sets, one of them is a list of points of the form $\{t_{k}\}$ and the other one is an interval of the form $[a,b]$. And my custom set consists of these type of sets and I need to ...
3
votes
2answers
166 views

How to make sure Table or Do only runs through specific values?

I often need to generate or run through very large numbers of integers (we're talking {i, 1, 10^9} and higher) and want to add certain integers to a list, say ...
3
votes
1answer
254 views

Create a table with inline conditions

I am trying to create a table with conditionals inline. For example, I'd like to create a 2 dimensional table like this: ...
3
votes
1answer
382 views

Exporting/Importing a Table of complex numbers

I'm generating a long table of list of the form: PN={{1,2,1+i},{3.5,2.6,2}...},{...},... Using: Export["PN.dat", PN, "Table"] ...
2
votes
3answers
200 views

how can I generate a sequence of assignments?

I want to make a sequence like follows r[1]= r[2]= r[3]= r[4]= .... r[n]= The above r[i] represents coordinates which I have ...
2
votes
3answers
165 views

Extracing information from a table

I am new to Mathematica. I have created a table of real numbers. I want to create a new table that contains the set of values of $i$ such that, in my original table, the $i$th entry is greater than ...
2
votes
2answers
346 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. ...
2
votes
2answers
286 views

How to populate a table using a rule replacement

I am trying to populate the rows and columns of a table by using a rule replacment. To generate a table that looks like this For example Sc would be row 1, column 1. An example of a record looks ...
2
votes
2answers
109 views

How to initialize several elements per iteration with Table?

I would like to initialize this kind of vector : {0,0,1,1,0,1,0,1,1,1,1,1} with Table. I tried ...