I have a task Z that can only be completed once either task X or
task Y is completed. Also:
% The length of task Z depends on which of X or Y is completed:
% If task X is completed, task Z takes 4 hours
% If task Y is completed, task Z takes 7 hours
% Task X takes 5 hours to complete
% Task Y takes 3 hours to complete
% Task...
Hello all,
I want to get some suggestions for my "find similar people" algorithm :). I have one database where I store the following entities: Person, article, keywords. So for each person I have a collection of keywords (with the number of mentions by the person) that have been compiled from person's articles keywords. So I need to get...
Dear all:
I want to visualize a function of the form x^n such that n=1,2,...,10.
I want these values of n to be generated by a loop and then plot the function as
Plot[{x^n},{x,0,100}] and store the plot in an array. Then I want all of these arrays to be displayed into single plot. I tried to do this using Show function but with not much...
http://i51.tinypic.com/15wcw2d.jpg
This is an animation I made using Mathematica. As can be seen by highlighting the image, the margins at both the left and right sides are too wide. I don't want to have to submit the image to another program just for the cropping, so what do I do to eliminate the whitespace?
Looking at the documentati...
I am writing OCaml code. In part of it, I want to examine whether two arithmetic expression are equal (like x+2+y == x+2*y-y+2). Implemeting this in mathematica is straightforward, so all I want some help on executing Mathematica and get the result back in OCaml. My OS platform is Linux.
Cheers,
Z.
...
Hello guys,
I was wondering how I could obtain the first element of a (already ordered) list that is greater than a given threshold.
I don't know really well the list manipulation function in Mathematica, maybe someone can give me a trick to do that efficiently.
Thanks !
...
I am a bit at a loss how to do the following efficiently in Mathematica:
a = { 1, 2, 3, 4, 5 }; (* list of integers *)
b = { 2, 4, 6, 8 }; (* another list of integers *)
filter = Table[MemberQ[b, element], {element,a}]
Expected output is:
{False, True, False, True, False}
My lists a and b are big, so Mathematica is doing a kaz...
Why does the Roots function exist when you can do the same thing with Solve?
...
Hey, I have this little equation that I am trying to solve on Mathematica, but for some reason I cannot get it to work. Any help would be appreciated. Thanks
f[x_, t_] = x^2 - x^3;
eso = x[t] /. DSolve[{[t] == f[x_, t_], x[0] == 0.2}, x, t]
I tried this next, but I keep getting an error
f[x_, t_] = x[t]^2 - x[t]^3;
eso = x[t] /. DS...
How would a function FunctionQ look like, maybe in a way I can even specify the number of arguments allowed?
...
An interesting 2d section is plane that goes through the center of a regular 3d simplex and 2 other points each of which is a centroid of some non-empty subset of vertices. It is defined by two subsets of vertices. For instance {{1},{1,2}} gives a plane defined by 3 points -- center of the tetrahedron, first vertex, and average of first ...
Hello
The output to my mathematica cell is just a long algebraic equation produced from Solve[%, Subscript[u, i, j + 1]].
{{Subscript[u, i, 1 + j] -> (1/(
2 h^2))(-2 h^2 k Subscript[f, i, j] + 2 h^2 Subscript[u, i, j] +
2 b h^2 k Subscript[u, i, j] -
h k Subscript[u, -1 + i, j] Subscript[\[Mu], i, j] +
h k Subscrip...
I want to write formulas in Mathematica format in my blog, inside tag's formula. What js should I use (and what libary), to replace those tag's, with http://www.wolframalpha.com/ search result image, when Dom gets loaded?
For example:
<formula>Limit[((3 + h)^(-1) + -1/3)/h, h -> 0]</formula>
gets replaced with:
If it's to complex o...
I have yet to find a city or location or date, that gives me an answer other than Missing[NotApplicable] to the following query.
WeatherData["Chicago", "Conditions", {2010, 8}]
That syntax works for "Temperature" and "Pressure" and "WindDirection" But not "Conditions". In particular, if you want data returned for "Conditions" you nee...
I'm using Mathematica 7.
I have an interpolated function, here's an example:
pressures =
WeatherData["Chicago", "Pressure", {2010, 8}] //
DeleteCases[#, {_, _Missing}] & //
Map[{AbsoluteTime[#[[1]]], #[[2]]} &, #] & // Interpolation;
I'd like to compute it's derivative, which is straight forward:
dpressures = D[pressur...
I'm trying to figure out how to use Mathematica from C via Mathlink.
If I just want to compute the value of a built-in function, I can do
MLPutFunction( lp, "RiemannSiegelZ", 1L);
MLPutDouble(lp, val);
and all is fine.
Now, if I want the value of the derivative, things get worse:
MLPutFunction( lp, "RiemannSiegelZ'"...
While I'm waiting for the sorting to finish, I would like to adjust a part of Mathematica graph I'm working on. The problem is that nodes are on top of edges, I wonder if there is a way to reverse that. In the image you can see that arrows are not showing proper...
I'm doing a GraphPlot[] with custom VertexRenderingFunction and EdgeRend...
What's the inverse of f[x_]:=Flatten[x] where x is Array with dimensions dims?
...
Update: Incorporating suggestions below, here's the version I ended up using to plot feasible region of a system of linear inequalities
(* Plots feasible region of a linear program in 3 variables, \
specified as cons[[1]]>=0,cons[[2]]>=0,...
Each element of cons must \
be an expression of variables x,y,z only *)
plotFeasible3D[cons_] ...
I have the following inequalities on 21 variables:
http://pastebin.com/raw.php?i=FTU970Em
When I run "Reduce[ineq,Integers]" on this, Mathematica hangs for a
long time.
That makes sense: there are MANY sets of values for x[1]..x[21] that
satisfy the inequalities.
All I really want is bounds for each variable (eg, "2 <= x[i] <= ...