The tag has no wiki summary.

learn more… | top users | synonyms

2
votes
1answer
308 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
2answers
103 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
77 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
1answer
121 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
145 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
29 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 ...
2
votes
0answers
103 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
112 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
92 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
890 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
257 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
277 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
249 views

Plotting many tables in a single plot

I have several lists. ...
1
vote
3answers
119 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
2answers
262 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
90 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
164 views

Help me to find a way to do this repetitive stuff

I'm trying to do this: ...
1
vote
2answers
135 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
46 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
127 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 ...
1
vote
1answer
115 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
1answer
109 views

Suppress warnings in ParallelTable

I'm using ParallelTable to evaluate a function that involves NIntegrate. There are a lot of ...
1
vote
1answer
243 views

How do I make a frequency table from a histogram (data set)?

I have a data set. ...
1
vote
3answers
138 views

How can I create a new tables out of a table and plot it

I have the following problem. I have a table, call it m, which is labelled by 3 indices (say i,j,k), each of them running from 1 up to 100. I would like to be able to construct a new table which would ...
1
vote
3answers
773 views

How to create functions of arbitrary number of variables? [duplicate]

In the following code what would be the simplest way to generalize it to say some $N_f$ number of $z$ instead of just $z_1$ and $z_2$? ...
1
vote
1answer
60 views

Optimizing evaluation time

I have the following code and it takes like foreeeeever to evaulate: ...
1
vote
2answers
86 views

`Slot` (#) interfering with evaluation

In the following I am using one function makeFunc to assemble two functions a[t] and b[t] to ...
1
vote
3answers
116 views

problem with Importing multiple files

I need to import about 100000 "dat" files to my progrom. I want to do this using the last answer to this question: Importing multiple files using a for-loop I know that I should define a list of all ...
1
vote
1answer
68 views

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

I have a triangular list of lists as follows: ...
1
vote
1answer
303 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: ...
1
vote
1answer
191 views

Equating and solving equations that have been generated using table[]

I am in the process of trying to use Mathematica to find the coefficients of transmission and reflection for the wavefunction of a beam of particles tunnelling across any number of identical potential ...
1
vote
1answer
155 views

Confused about Unevaluated

Why does Map[Unevaluated, Table[PauliMatrix[i], {i, 1, 3}] give {Unevaluated[{{0, 1}, {1, 0}}], Unevaluated[{{0, -I}, {I, 0}}], Unevaluated[{{1, 0}, {0, ...
1
vote
1answer
126 views

direct assignment to the element in a Table

I have already asked a related question here why set values in this way doesn't work? But I think I have to write the question which I encountered explicitly? ...
1
vote
1answer
113 views

Table/Tree of values

My question: Is there a way to create a tree of values? Something like the output of the command TreeForm, but with values in the nodes? Why do I want this? I'm trying to do a complete program to ...
1
vote
2answers
101 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 ...
1
vote
4answers
117 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? ...
1
vote
2answers
144 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 ...
1
vote
2answers
120 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 ...
1
vote
1answer
79 views
1
vote
1answer
148 views

plotting output from FindRoot

I am an R user and am totally new to Mathematica. I am trying to find the roots of a system of two equations over a series of paramter values and plot the results. I can do the computation but would ...
1
vote
2answers
854 views

Font size in PlotLegends, using Table to generate the list in the legend

I am currently trying to get to graph with several functions as below. My problem is that I cannot change the font size in the legend (authomatically generated numbers by "Table" function). This code ...
1
vote
3answers
152 views

iterate method to find roots

This code gives the roots (lambda-values) of eq1 by using iteration. ...
1
vote
1answer
137 views

Recursion evaluate Table power exceeded limit

I wrote 2 simple recursive functions for calculating the power of a table. pol3[Tb_List, n_Integer?Positive] := If[n == 1, Tb, Tb.pol3[Tb, n - 1]] and ...
1
vote
1answer
83 views

Get unique values for integration limits

For an multidimensional integration I want to build up the integration limits with the following code. (the length of vars is also variable) ...
1
vote
1answer
93 views

Draw from HistogramDistribution with ParallelTable

I wanted to check something, but ran into troubles using HistogramDistribution in combination with ParallelTable. The code does the following: Compute a HistogramDistribution of some sample and use ...
1
vote
2answers
75 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 ...
1
vote
0answers
66 views

Parallel numerically integrated function can't be plotted

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 ...
1
vote
1answer
47 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 ...
1
vote
0answers
67 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: ...