The table tag has no wiki summary.
0
votes
1answer
48 views
Table of Polynomials [closed]
I made a function
makePolynomial
that creates a random Polynomial of a certain degree, e.g.
2+T+3T^2+8T^3-5T^4...
now I ...
2
votes
1answer
94 views
Create a table with inline conditions
I am trying to create a table with conditionals inline. For example, I'd like to create a 2 dimensional table like this:
...
7
votes
5answers
202 views
Multiplying two dimensional data by a constant
I have a list of lists of the form:
{{1, 2}, {2, 4}, {2, 8}}
But I want to multiply only the second dimension of that data by a constant. I know I could do this ...
1
vote
2answers
59 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 ...
13
votes
5answers
252 views
Instruct a Table to only evaluate until a condition is fulfilled
I am looking for the way of building a Table of pairs of numbers in a fast way. My true table evaluates huge functions, and I see no way and reason to show those cumbersome expressions here. Let us ...
2
votes
2answers
119 views
How to populate a table using a rule replacement
I am trying to populate the rows and columns of a table by using a rule replacment.
To generate a table that looks like this
For example Sc would be row 1, column 1.
An example of a record looks ...
1
vote
1answer
110 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
98 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?
...
2
votes
1answer
60 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 ...
1
vote
3answers
80 views
iterate method to find roots
This code gives the roots (lambda-values) of eq1 by using iteration.
...
0
votes
0answers
64 views
How can I get tabular output for the results of my simulation? [closed]
I have code that simulates a simple Markov Chain and looks like this:
...
1
vote
3answers
92 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
1answer
66 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 ...
2
votes
4answers
243 views
How can I format a table to look nice?
I have this code, but i would like to see the results well formated,
How can I obtain a well formatted data with aligment?, similar to this one
insted what i obatin, you can see here
Here is ...
1
vote
0answers
50 views
Using NIntegrate inside Table [closed]
I have defined the function(GMTD2) below which when called displays the corresponding contour plot.
The List k1 is generated by the Table environment whose third part is that long function which is ...
6
votes
2answers
93 views
How do I avoid scoping collisions of iterator variables?
Yesterday I had an issue that kept for quite a while. My code wasn't producing the right results. Now I know why and I am wondering how to avoid the issue in future. Consider the following code.
...
1
vote
3answers
149 views
1
vote
3answers
134 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 ...
0
votes
0answers
25 views
Error in extracting a column [duplicate]
I imported excel data to Mathematica using this command.
kuruzD = Import[
"C:\\Users\\TMH\\Documents\\Problem Set 4\\kuruzData.xlsx"][[1]] //TableForm
I want to ...
1
vote
1answer
69 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
...
2
votes
3answers
140 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 ...
1
vote
3answers
69 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
3answers
121 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 ...
0
votes
1answer
72 views
Riffle not acting as expected [closed]
I have defined two tables:
R = Table[Subscript[\[ScriptCapitalR], -i], {i, -12, -1}]
T = Table[Subscript[\[ScriptCapitalT], -i, -i - 1], {i, -12, -1}]
I want to ...
2
votes
1answer
94 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 ...
-1
votes
1answer
55 views
FindFit and Integration errors
First off, appologies for what may sound like a newbie question, as I am very new to using Mathematica.
I am trying to find a way to get Mathematica to give me an expression that would describe the ...
2
votes
2answers
112 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
2answers
149 views
How can I make the Cartesian product of a list with itself?
I'm trying to build the table
{{1, 1}, {1, 2}, {2, 1}, {2, 2}}
given the list
{1, 2}
I can do it like this
...
4
votes
2answers
122 views
Extracting data from a table under conditions
I have a very large table with two columns. Let's say the name of first column is E and the name of the second is P. How can I get the E values when P = 0.
6
votes
2answers
163 views
Merging two Lists
I have two tables. One is given by
T1 = Table[{x, y, 0.}, {x, 0, V},{y, 0, V}]
and from a calculation I have the second, a list of points {x, y, z}
...
1
vote
3answers
152 views
2
votes
1answer
105 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 ...
-1
votes
1answer
97 views
Improving ContourPlot and Table output
I am trying to examine the results of and NDSolve solution for a BVP, and the output is not at all "pretty". Here's the code:
...
1
vote
1answer
71 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
2answers
72 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:
...
0
votes
0answers
83 views
How can I sort the elements in a 3-dimensional table? [closed]
I'm doing a calculation where I need to sort the elements in a 3-dimensional table (because I have 3 running indexes), but I'd like to treat all of it as a 1-dimensional object and sort them by ...
2
votes
1answer
97 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 ...
5
votes
2answers
144 views
Is there a Break[] equivalent for short-circuiting in Table?
I am running Mathematica 7. The following is admittedly a silly example, but suppose that I have a list list whose entries are either ...
8
votes
2answers
191 views
Correct way to generate large data sets (i.e.forward yield curve )
I would like to generate a set of forward yield curve matrix of size 1000 x 100. First I defined my SparseArray of 1000 x100:
...
0
votes
2answers
137 views
What is the best way to export a table of numerics with legends ready for Word?
I want to put my table output into an MS Word document without having to edit it in word after, so I want to export it ready for Word in final version with complete legends and title. Is it possible ...
-3
votes
2answers
110 views
How to make plots scaling consistent when running a series of simulations?
In my function it returns a plot of my data, say example, using ListLinePlot, and this is the size I obtain:
but when running a series of simulations inside a Table:
...
2
votes
3answers
144 views
how can I generate a sequence of assignments?
I want to make a sequence like follows
r[1]=
r[2]=
r[3]=
r[4]=
....
r[n]=
The above r[i] represents coordinates which I have ...
4
votes
2answers
260 views
How to create a Table of Tables with indexed variables
I want to use concise code to generate a table of values that list the addition of a set of vectors. What I am looking for is essentially a Table of Tables.
I will show here the kind of lists I want, ...
5
votes
1answer
121 views
Making the TableForm output into two columns
I have a program that calculates Christoffel symbols for a given metric, and the output I'm getting now is such that I have every calculated symbol in one column like this:
I'd like that I could ...
0
votes
1answer
70 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 ...
7
votes
3answers
578 views
Is there a Mathematica equivalent to MATLAB's logspace? [duplicate]
Possible Duplicate:
How can I get exactly 5 logarithmic divisions of an interval?
I want to use Table to generate a list of items, but want the indices ...
1
vote
3answers
214 views
How to create functions of arbitrary number of variables?
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$?
...
3
votes
1answer
183 views
Why am I getting so many error messages from my pendulum simulation?
I'm doing my end of semester project for a physics class. We were supposed to graphically model a physical occurrence; I chose doing a Pendulum Wave.
I have my code written, however Mathematica keeps ...
3
votes
1answer
104 views
Exporting/Importing a Table of complex numbers
I'm generating a long table of list of the form:
PN={{1,2,1+i},{3.5,2.6,2}...},{...},...
Using:
Export["PN.dat", PN, "Table"]
...
0
votes
0answers
145 views
Why does Do or Table really slow down this code?
I have some function that usually executes pretty quickly:
logf[x_, y_] := N[f[x, y], 40] /. v_ :> (PutAppend[Unevaluated[f[x, y] = v;], "myfile.txt"];);
...



