Tagged Questions

The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
0answers
36 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
72 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
365 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
134 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
128 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
58 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
98 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
66 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
173 views
2
votes
1answer
125 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
30 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
209 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
126 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
31 views

Adding columns of data to a matrix [duplicate]

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

scatterplot from 3d table

I am using this code: ...
0
votes
1answer
74 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
96 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
362 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
53 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
138 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
48 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 ...
5
votes
2answers
245 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
421 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
78 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
49 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
76 views

Optimizing evaluation time

I have the following code and it takes like foreeeeever to evaulate: ...
0
votes
0answers
58 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
96 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
96 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
76 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 ...
5
votes
3answers
164 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
265 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
117 views

`Slot` (#) interfering with evaluation

In the following I am using one function makeFunc to assemble two functions a[t] and b[t] to ...
2
votes
3answers
167 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 ...
0
votes
0answers
721 views

Fastest way to create a NxNxNxN dimensional matrix

I have a function that outputs a complex number Func[x_,y_]:= blah blah; I have constructed a table of all possible values of this function. ...
0
votes
1answer
60 views

Implementation of a Hanning filter

I'm implementing a package for in-house signal processing. I wrote here a quite trivial function implementing a Hanning windowing of the signal. ...
0
votes
2answers
108 views

Selecting index position of data from a table that is less than a certain value

I have a table of numbers with a few thousand entries, and I'm trying to find the first index that is less than a particular value. An example of the table I'm working on is as follows: ...
5
votes
1answer
101 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
2answers
171 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 ...
2
votes
2answers
426 views

Parametric plot of multiple graphs on the same axes

I'm trying to plot on a single axes system multiple graphs but ran into a problem when tryinf to label my graphs. Here's what I've used so far Mathematica code: ...
0
votes
0answers
134 views

Savitzky-golay filter

How to use Savitzky-golay filter on csv file? I have file.csv in this format: 0.1,1.6,2.8,0 0.2,1.2,2.3,1 0.7,1.5,2.4,2 0.6,1.2,2.7,3 0.4,1.4,2.9,4 0.3,1.3,2.5,5 ...
0
votes
1answer
68 views

Slow evaluation of complicated Table

I have a system of recursive equations x[t+1]:=f[x[t],p[t-1],a[t],a[t-1]]; p[t+1]:=g[p[t],x[t-1],a[t],a[t-1]]; a[t+1]:=h[x[t],p[t],a[t],a[t-1]]; I want to ...
2
votes
2answers
179 views

Converting from TableForm to Grid

I wonder if there is an easy way to convert from TableForm to Grid. I have an existing data format that uses the Table function that I’d like to prettify…. Let’s setup a nested table as follows: ...
0
votes
1answer
60 views

Using Derivative with list in curly brackets

I'd like to make a formula for a sum containing Derivative where the number of arguments in the latter depends on an input parameter n. Also involved is a list ...
1
vote
2answers
58 views

How do I get the heading elements from the TableForm option TableHeadings?

The following, table = TableForm[ConstantArray[0, {3, 3}], TableAlignments -> Right, TableHeadings -> {None, {"One", "Two", "Three"}}] generates ...
1
vote
1answer
124 views

Parallel numerically integrated function can't be plotted [closed]

I've been working on a problem where I need to integrate a function numerically. The function is quite complex and it takes almost an hour for Mathematica to make a plot. To speed the process up I ...
2
votes
2answers
498 views

Fast way to extract data from a list

I used data=Table[{i,f[i]},{i,1,n}] to produce a list, here n is greater than 2^20 = 1048576. The function f(N) runs in time ...