Tagged Questions

The tag has no wiki summary.

learn more… | top users | synonyms

4
votes
2answers
173 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
493 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
140 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
72 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
196 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
61 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
125 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
511 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 ...
0
votes
0answers
74 views

Output solutions from large amount of multiple parameters to external files?

I have some code that solves an ugly PDE by using the results of another, and outputs the value of the solution between a range $mic \leq r \leq r_{o}$. It looks something like this ...
5
votes
2answers
296 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 ...
4
votes
2answers
188 views

Single Legend for a Table of Plots

For this toy problem ...
2
votes
2answers
144 views

Generating an editable table that can be used as input

Say I have a number $n_{max}$. I want a command to generate a table like 1 1 2 2 3 3 4 4 ... nmax nmax where the second column is editable, and this table can be ...
0
votes
2answers
121 views

Define a function on a parameter argument set to zero

Say I have an expression (matrix) that depends on several variables. f= {{a, b+c},{2a-b^2,c^5+a b}} I want to define new matrices with the single parameter ...
3
votes
1answer
39 views

Table doesn't replace inside conditionals (If, Which) [duplicate]

This: Table[If[cond, y], {y, 1, 3}] outputs this: {If[cond, y], If[cond, y], If[cond, y]} The ...
1
vote
3answers
136 views

More elegant/efficient solution to browse through an array

I have an array of lists and want to correlate every list with each other like this: ...
-1
votes
1answer
244 views

Mathematica Semilog (LogLinearPlot) using x,y points from table [duplicate]

I am trying to use the LogLinearPlot in Mathematica 9 to create an x-axis only logarithmic plot that looks like this (Based on N^1.85 graphing paper) http://pingfire.com/ What it does is model a ...
5
votes
5answers
212 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} ...
0
votes
2answers
119 views

Delete False values from a list [closed]

I have table: t = {False, False, False, a <= 456, a <=567, a<= 897} I want to delete all values which are 'False' and make my table to looks like: ...
1
vote
1answer
82 views

Testing a List inside of an Table if it is != 0 [duplicate]

I'm new to mathematica so I hope this is not a too stupid question, but I couldn't find a solution in the mathematica documentation. I've got a normal table, initialized with "0" as entries. In the ...
2
votes
0answers
104 views

Want explanation of when different looping constructs are appropriate [duplicate]

For example when would you use a Do loop over a For loop? For which tasks would you use Map, ...
1
vote
1answer
270 views

How to convert the following list into a LaTeX table?

How to convert the output of the following code In[43]:= Func[x_]:=Select[Range[x],Total[IntegerDigits[#]^3]==#&]; Func[1000] which is Out[44]= ...
1
vote
2answers
155 views

How to sort Table/Matrix including legend(Labellings)

I want to sort table including its legend for graph I have table similar to M1 M2 M3 1 5 2 3 1 4 4 2 -10 5 7 11 6 -2 1 ...
3
votes
4answers
163 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 ...
1
vote
3answers
167 views

Table iteration over two ranges

I am trying to create a Table where the iterator has two ranges with different iteration steps. Let's consider a simple example: I want to find the square of the ...
5
votes
4answers
423 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 ...
0
votes
0answers
43 views

Store results of inequality [duplicate]

I eveluated some values using Reduce commend and I store them in a Table ...
1
vote
3answers
105 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 ...
1
vote
1answer
100 views

Transpose a ragged triangular matrix and display as columns rather than rows

I have a triangular list of lists as follows: ...
0
votes
0answers
73 views

Widget - GUI help

I was wondering if someone could explain me the code written below (example File Dialog from mathematica). Especially the part with returnValueand ...
0
votes
1answer
109 views

How to create 2k sized vector in k sized loop

I want to solve a system of simple differential equations. At some point I need to solve non-linear system of algebraic equations with Newton method. I would like to efficiently create a right hand ...
2
votes
1answer
83 views

Minimize amount of evaluations with fold/table/thread or something else

I can't figure out how to use fold/table/map/distribute or whatever to get this: ...
0
votes
2answers
216 views

Using a table to format a grid

Ok, I can't wrap my head around this because I don't know Mathematica well enough yet, so I'm asking for help, at least a direction to explore in. I have a Grid: ...
1
vote
0answers
89 views

Generating a variable size table one element at a time

I can produce a variable size list of strings like AACBBAABC with this code: ...
2
votes
1answer
195 views

How can I create a colour image using raw black and white data? (FITS data cube)

I have a data cube containing pictures of a galaxy across a thousand wavelengths. I want to take the data for the image slides in the red and blue parts of the spectrum, and have them represented in ...
0
votes
2answers
197 views

Conditional Table

I have following : SeedRandom[2] Table[Table[RandomInteger[100, {100, 10}][[r, s]] == x[r + s], {r, 1, 10}], {s,1,10}] How can I set condition inside Tables?Such ...
5
votes
2answers
197 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 ...
0
votes
2answers
160 views

Combining graphics & lists / tables

I have: created with: ...
1
vote
1answer
235 views

Suppress warnings in ParallelTable

I'm using ParallelTable to evaluate a function that involves NIntegrate. There are a lot of ...
2
votes
2answers
296 views

Table of Variables

I use a list of variables {x1, x2, x3} to Solve a particular set of equations. I am now trying to generalise this depending on ...
-1
votes
1answer
161 views

Efficient Table Generation & NDSolve Error

I'm currently working on solving an SEIR model with data from the CDC. I've created a function to calculate the Square difference for the model and want to create a table of values for the 4 variable ...
-2
votes
1answer
94 views

Suppressing Null output with sparse data? A lot of zeros and little nonzeros

I have sparse situation with a lot of zeros, related chat. I want to see only the nonzero things or nonnull things. Example Input ...
1
vote
4answers
146 views

Why FieldSeparators is printing a lot of quotation marks instead of just spaces?

In the following code "FieldSeparators"->" " prints a lot of quotation marks in the output file, instead of just spaces. What's wrong with it? ...
0
votes
0answers
27 views

Eliminate some value from a matrix [duplicate]

I have a function that return a table consisting of a 2D points. These points are either {x,y} or {0,0} ...
0
votes
1answer
167 views

Getting mesage: Set::setps assignment is not a symbol

Please, tell me what is the issue with the following code? Dimensions[Subscript[R, 2]] {201, 161, 53} ...
1
vote
2answers
726 views

Create simple table with function of column values

I just want to create a simple table: Three input columns, one output column Call the inputs {x,y,z}, each can take values ...
2
votes
2answers
100 views

How do I assign specific data points in an array to a new array?

I am trying to learn how to script/program in mathematica and I am retyping some simple C and FORTRAN programs into Mathematica as a way to learn. I am writing a Monte Carlo code to calculate the ...
0
votes
2answers
125 views

Put results in multiple columns for comparison

One thing I would like to do in many instances is arrange input/output in columns for comparison. I expect that I need to use Grid to do this, but have not been ...
1
vote
1answer
448 views

Can Table be used inside Manipulate?

EDIT: CHanged the code. Please try again t see if it works well on our PCs. I am creating a simple Manipulate[] notebook. However when I place Table[] in the code, like: ...