The tag has no wiki summary.

learn more… | top users | synonyms

2
votes
2answers
114 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 ...
2
votes
2answers
123 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 ...
2
votes
3answers
281 views

Plotting many tables in a single plot

I have several lists. ...
2
votes
2answers
476 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 ...
2
votes
2answers
230 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 ...
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 ...
2
votes
1answer
161 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 ...
2
votes
2answers
171 views

Replacing all values in a table > $T$ [duplicate]

I want to generate a table of Euclidean distances from the points in a list to a given point, e.g.: ...
2
votes
1answer
193 views

Find points on the surface of a Graphics3D object

If I have a Graphics3D object that was generated from manipulations to PolyhedronData rather than via an explicit equation, for example the Spikey (for which the entire code can be found here The ...
2
votes
2answers
154 views

How can I create a table of sliders?

I'm trying to do the following: I have a table: w = Table[ToExpression[ToString[h] <> ToString[i]], {i, 1, Length[c]}] This table is suposed to generate ...
2
votes
3answers
97 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: ...
2
votes
1answer
169 views
2
votes
2answers
361 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: ...
2
votes
1answer
183 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 ...
2
votes
3answers
178 views

How to make a defined symbol stay in symbol form?

How to make a defined symbol stay in symbol form? w = 3; g = 4; {w, g}[[2]] 3 I want the output to be ...
2
votes
1answer
346 views

How to convert an output to a graphic that can be selected like a plot?

EDIT: István Zachar informed me of the Rasterize[] command, which does exactly what I need. Danke! I have a self-built function that uses Grid[] to create a table that is more presentation-friendly ...
2
votes
2answers
64 views

Problem with NumberForm when exporting

I have a two-part question regarding NumberForm First question In my attempt at answering this i stumbled upon a strange behavior by NumberForm when the final result is exported. Lets say I ...
2
votes
3answers
74 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 ...
2
votes
2answers
93 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: ...
2
votes
2answers
312 views

How to export a table of complex numbers?

I'm having problems exporting a table of complex numbers. I have: ...
2
votes
1answer
202 views

Mathematica 7: Problems when evaluating Fourier inside a ParallelTable

after I got such a great response for my first question on this site, I'm very encouraged to asked my second one! So here it is, very generally: To speed up a "row-wise" (i.e. 1D) operation on a ...
2
votes
1answer
65 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 ...
2
votes
1answer
90 views

Export CSV from tables

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

Multiple plots using dynamics

I am studying Dynamic and DynamicModule, and I have tried to make a simple plot of a family of real functions. The number of functions should be a dynamic variable controlled by a slider. So I have ...
2
votes
1answer
37 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: ...
2
votes
2answers
92 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
2answers
166 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: ...
2
votes
1answer
493 views

How to export/import function values [duplicate]

I have a function with two variables: f[x_,y_]:=f[x,y] = ... I calculated some values (they are fractions like 435345345/3424242424) and would like to store the ...
2
votes
1answer
117 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 ...
2
votes
2answers
134 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 ...
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: ...
2
votes
2answers
97 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 ...
2
votes
1answer
163 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
150 views

writing a function using multiple variables

I am fairly new to Mathematica and am trying to write a function for the equation: xx = [x/(Sqrt[h^2 + d^2 + y^2]))*(Sqrt[h^2 + (d + yy)^2]) where h, d are known ...
2
votes
1answer
39 views

Listplot x axis - Using tranpose of two tables?

I'm trying to augment the x axis of a listplot to fit the number of steps. Secondly, since there are a large number of steps (50), there will be 50 ticks which will make the graph messy. How do I get ...
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, ...
2
votes
0answers
124 views

correct usage of ParallelTable

I am trying to parallelize my script. Here is a MWE of how I have done it: ...
2
votes
1answer
118 views

how to set initial conditions when solving recursive equation with tables

I am solving a recursive expression with ParallelTable. Here is a MWE showing how I do it, and how I set the initial condition: ...
1
vote
3answers
1k views

Importing multiple files using a for-loop

once again I am stuck solving a seemingly easy problem :( I would like to make a List of tables by importing data from several txt-Files. Importing the data into a table works so far and I am able to ...
1
vote
3answers
316 views

Summation over 3 lists

I have three lists. As an example, a = {10, 5, 6, 8, 7}; b = {4, 8, 9, 7, 9}; c = {7, 5, 12, 4, 1}; I want to get $$x(i)=\sum ...
1
vote
4answers
352 views

Recurrence relation in a table

I am trying to generate a list of x-values for a function using a module, where my x-value must increase by 'a' if the term ...
1
vote
3answers
134 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
vote
3answers
129 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}$? ...
1
vote
2answers
584 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 ...
1
vote
2answers
106 views

Evaluation of elements in a list and then sorting them

This is probably a simple problem, but I'm having a lot of issues with it because I'm unfamiliar with Mathematica syntax. I have a list ...
1
vote
3answers
174 views

Help me to find a way to do this repetitive stuff

I'm trying to do this: ...
1
vote
2answers
162 views

How to incorporate functions within Do Loops

I'm attempting to repeatedly perform a simple algorithm with incremental changes of a parameter. I can easily express my changing parameter: ...
1
vote
2answers
57 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
3answers
153 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 ...