Tagged Questions

The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
0answers
72 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
181 views

Single Legend for a Table of Plots

For this toy problem ...
2
votes
2answers
138 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
116 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
38 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
135 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
223 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
210 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
111 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
73 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
248 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
145 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
162 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
161 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
422 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 ...
0
votes
3answers
97 views

Reduce of 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 ...
1
vote
1answer
97 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
72 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
210 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
83 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
193 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
184 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
190 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
155 views

Combining graphics & lists / tables

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

Suppress warnings in ParallelTable

I'm using ParallelTable to evaluate a function that involves NIntegrate. There are a lot of ...
2
votes
2answers
264 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
148 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
92 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
144 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
157 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
669 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
122 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
444 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: ...
3
votes
1answer
311 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 ...
1
vote
2answers
165 views

Taking a percentage of data from a list or a table

I have a list of data and for the calculation I only need the a of portion of the data. I know that Take[data, {1,100}], for example, is taking line 1 to 100 of the ...
10
votes
5answers
481 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. ...
2
votes
2answers
205 views

Deleting parts of groups that do not have equal dates

Find the intersection of dates within the pair and remove the other dates & corresponding prices. Also keep the list in same format as it currently is in. Let me explain: Each stock has closing ...
8
votes
1answer
171 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}]; ...
2
votes
1answer
167 views

How to parallel this nested table efficiently?

I have an 8 core CPU and want to parallel evaluate the following nested Table Table[Table[expr[i,j], {i,1,10}], {j,1,4}] But ...
2
votes
1answer
168 views

Errors when using ParallelTable inside a package

I'm developing a package that contains a function that requires evaluation of an expensive Table, so I use ParallelTable ...
1
vote
2answers
134 views

Creating a Table of Items for GIF creation

I want to create a table as shown below so that the steps from the first item to the second item, and the second item to the third item, etc. can be animated. I am not at liberty to post tested ...
5
votes
4answers
184 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 ...