2
votes
2answers
194 views

Stochastic problem

I have to organize a small sports league and I am puzzled on how to create the game plan. We are 8 persons playing table soccer with 2 vs. 2 matches. The idea is that each person plays once with ...
1
vote
1answer
362 views

Combining Histogram and SmoothHistogram

How can we draw Histogram and SmoothHistogram together for two data sets?. I'd like to show the first data set using ...
1
vote
1answer
169 views

Corrected: Solve[] cannot solve simple hyperbola equations?

Is Solve[] very inefficient in solving equations involving square roots? The input below attempts to find out the explicit expression of either x or y in terms of other variables {x|y, a, c}, and c ...
1
vote
1answer
100 views

Expand list of {{t1,x1},…} with new set of t's

I have a list of the form data={{t1,x1}, {t2,x2},...} and a list newt = {nt1,nt2,...} and I want to expand ...
2
votes
0answers
208 views
2
votes
1answer
165 views

wordpress wolframCDF plugin 2.0 stopped working

setup and tried a simple CDF document and it worked like a charm. That was a couple of months ago - now the post does not show evidence that the shortcode is working at all - the shortcode is in the ...
1
vote
2answers
117 views

Select elements in a list when the firsts two items are the same (no matter order) and its third element is lower

I'm trying to solve a heuristic search in Mathematica 9. I get a list of succesor nodes called open with two nodes and a heuristic value, e.g., ...
0
votes
1answer
276 views

ListVectorPlot3D

I try to plot a 3D Vector plot. All Vectors start at (0,0,0) and point in directions given in spherical coordinates: ...
2
votes
0answers
48 views

Verifying integration by parts of an arbitrary function [duplicate]

Suppose that I have an arbitrary differentiable function $G$ which depends on $s$: $G(s)$. Now suppose that I want to do the following integral: $$\int ds \;\; s \frac{\partial G(s)}{\partial s}.$$ ...
0
votes
2answers
224 views

Most efficient way to sum over matrix products?

I have two lists. The first, coefficientlist, is dense and has dimension {176,176} elements. The second, ...
0
votes
1answer
178 views

Problem with importing format of data from Excel?

I am trying to import data from Excel. It is located in a single column of the Excel file but each cell contains a comma separated pair of two values as a,b. When I am importing them I have this ...
4
votes
2answers
181 views

LevinRule and SphericalBessels

I'm currently looking at a simplified problem that approximates another problem I'm looking into. In this simplified problem I at least have an analytic integrand and can easily provide all info on ...
0
votes
2answers
3k views

KeyPress function in Java's Robot class, how to state parameter?

I am trying to use Java's Robot class to type. This is what I have done so far. Needs["JLink`"]; InstallJava[]; robot = JavaNew["java.awt.Robot"] The mouseMove ...
6
votes
1answer
242 views

Match sequence of zero or more characters except a given character

This looks like it should be simple: I want to match an "i" followed by an "o" with an arbitrary (possibly zero-length) sequence of characters in between, unless that sequence also contains an "i". ...
1
vote
1answer
103 views

How do I change the Head of Graph into List?

I am trying to change the Head of b (a NeighborhoodGraph) from Graph into List but Apply seems to fail. I start with a list of connected vertices: ...
2
votes
1answer
447 views

How to get (fg)' = f'g + g'f?

I am new to Mathematica so the my questions might be pretty much at the pupil's level. If I want to use differentiation to derive: (fg)' = f'g + g'f How can ...
6
votes
2answers
149 views

Large Number times Tiny Number

A (maybe noob) question: Let a = 1234567891234567889998.5 b = 1234567891234567889999.5 Mathematica (v8) yields for ...
18
votes
1answer
566 views

3D bubble textures in Bread (and other solids)

Bread has a bubbly texture that I would like to be able to recreate using Mathematica. Here are some examples of bubble textures: Bread Swiss cheese Foam Note that most of the ...
1
vote
1answer
163 views

Searching a string that may contain Null

I have an array of triplets that can be approximated by the following code: ...
2
votes
1answer
238 views

Exporting HTML code to file.html

I've got a problem with re-saving html code. Lets create html file: ...
21
votes
6answers
13k views

How to add a vertical line to a plot

In the plot below I would like to add two vertical lines at $x = \frac{\pi}{15} \pm \frac{1}{20}$. How can I do that? ...
1
vote
1answer
112 views

Cannot Plot Output of Solve

I'm trying to plot the output of the following function t2[x_] in ...
4
votes
1answer
925 views

Quality control when exporting graphics into JPG

If I export a graphics from Mathematica to JPG format the image quality in JPG is visibly lower than that in Mathematica. Is it possible to control and eventually increase the quality of the exported ...
7
votes
2answers
355 views

Using Map with If

I have an If statement I need to carry out where the result should be a single number for each time the if is executed. What I have at the moment returns a list for each time the If is executed. I ...
0
votes
1answer
87 views

Sublist inside simple list

I have a doubt to confirm. Let there is a list f = {{l}, {c}, {d}, {e}, {1, 2, 3}, {3, 4, 5}} And I expect it to be traversed as a normal list which I can do ...
20
votes
2answers
1k views

Weather Maps with Mathematica

I've been trying to set up a weather map with Mathematica similar to what NOAA publishes in their website. So far I've been successful to bring the data over and extend it across the whole picture ...
10
votes
2answers
970 views

Adding custom GridLines to the “automatic” ones

I need to add custom (vertical) grid lines to a plot (to a DateListPlot, to be precise). I know there is the option of ...
2
votes
1answer
87 views

How to specify optional arguments that take functional values

I am trying to make a function with an optional argument that may change but mathematica caches the value when the function is defined. Here is an example where the optional time variable is set when ...
2
votes
2answers
224 views
3
votes
2answers
142 views

how to convert string output into executable commands

temp = (layer = #; layerS = ToString[#]; StringForm["Import[\"drainCdg_gdat0``\",\"Table\"]", layerS]) & /@ {1, 2, 3} how to get the output of ...
0
votes
1answer
928 views

Plot and Histogram together in Mathematica 7

I want to draw a histogram and some line plots together. I have one observed variable and several predicted ones. Observed data should be shown as a histogram and the predicted variables should be ...
0
votes
1answer
92 views

Making a list from equations

I want to make a list (efficiently) which is the set of lattice solutions of the following equations (depends on $k$): $x_0\geq 0$ and $x_i\in [0,4k]$ for $i=1,\ldots,4$ satisfies $x_0+x_3\leq k+3$, ...
3
votes
2answers
366 views

Why does the first derivative of a piecewise continuous function have discontinuities?

I have this piecewise continuous function which is also continuously differentiable over time : ...
7
votes
1answer
578 views

Writing an expression as sum of squares of expressions

Suppose we have a symmetric homogeneous polynomial expression $P$ in $X=(x_1,\cdots, x_n)$. I want to check whether there are functions $g(X)$ so that $P$ is of the form $\sum _{1\le i<j\le n} ...
7
votes
2answers
825 views

Projection of ContourPlot3D

Suppose I have the following ContourPlot3D: ...
2
votes
0answers
133 views

correct usage of ParallelTable

I am trying to parallelize my script. Here is a MWE of how I have done it: ...
0
votes
2answers
398 views

Importing base-64 encoded Canvas element into Mathematica

The aim of this code is to transfer a web image into webMathematica for image manipulation. Since the question here failed to resolve direct URL loading, I tried a different method of extraction ...
8
votes
1answer
296 views

How can I sequentially apply different graph embeddings?

Imagine I have some graph G, and I perform a graph embedding using a command like: ...
0
votes
1answer
171 views

Using Sort vs SortBy

So I have two lists, A and B. I put them into lists = {A,B}I want to sort A such that Im[#1]<Im[#2]& which I can do fine ...
5
votes
1answer
558 views

Plot two functions within manipulate

I just want to plot all stochastic processes and their average process. The original code without the average is: ...
4
votes
2answers
106 views

Specific rearrangement of elements in list

I have an $n\times n$ matrix G with elements g[i,j] that I construct with ...
19
votes
5answers
1k views

How to pass a symbol name to a function with any of the Hold attributes?

Given a function with the attribute HoldFirst, HoldAll or similar, and a variable, list, how ...
13
votes
1answer
246 views

Baffling increase in runtime

Background of my question I discovered Project Euler today, and decided I would work through the problems in Mathematica. I became obsessed with the first problem, which is essentially "sum all the ...
5
votes
1answer
158 views

Is it possible to export equations from Mathematica to Corel with full Latex quality

I am wondering is there any possible solution to export equations from mathematica to corel x5. I was trying first to export a equations as pdf from mathematica and then to import .pdf to corel, but ...
5
votes
1answer
240 views

How to center the labels on a bar chart so they are directly under their respective bar? [duplicate]

I am using v8 and have the following code: BarChart[#, ChartStyle -> "Pastel", ChartLabels -> (Rotate[#, Pi/3] & /@ #2)] & @@ Transpose[totals4] ...
1
vote
2answers
202 views

Apply confusion in Do loop

I am trying to apply InversePermutation on a list of sublists of selected permutation elements. First I am trying to see if I am able to reach every element, ...
5
votes
1answer
424 views

What is the proper way to extract XMLElement values?

I have seen and tried many different versions of XML data parsing here on this forum, and even some in the documentation. Is there a tried and true "Best Practice" way to extract all the XMLElement ...
8
votes
1answer
288 views

Mathematica8 can compile this function but Mathematica 9 can't if I set CompilationTarget -> “C”

Following code worked on Mathematica 8, but in Mathematica 9 it can't be compiled, it return this message CompiledFunction::cflist: Nontensor object generated; proceeding with uncompiled ...

15 30 50 per page