20,293 reputation
12769
bio website
location
age
visits member for 2 years, 7 months
seen 6 hours ago

Jul
10
comment Combining Plot and ListPlot in a manipulation
try f[x_, a_, b_, c_] := x^2 + a + b + c; Manipulate[ Show[Plot[f[x, a, b, c], {x, 0, 1}], ListPlot[{{0, 0}, {1, 1}, {2, 2}}], PlotRange -> All], {a, -1, 1}, {b, -1, 1}, {c, -1, 1}] It is better to put all functions inside Initialization though, like this Manipulate[ Show[Plot[f[x, a, b, c], {x, 0, 1}], ListPlot[{{0, 0}, {1, 1}, {2, 2}}], PlotRange -> All], {a, -1, 1}, {b, -1, 1}, {c, -1, 1}, Initialization :> ( f[x_, a_, b_, c_] := x^2 + a + b + c ) ]
Jul
10
comment Will Version 9 functions all work in Version 10?
It seems the added Quantity to the result. So now one needs to do DateDifference[{2014, 1, 1}, {2014, 1, 2}] == Quantity[1, "Day"] which returns True
Jul
10
comment Will Version 9 functions all work in Version 10?
can you please post small example?
Jul
10
comment Why is Return not forcing an exit from my function?
Do Return[100, Module] Not just Return[100] see mathematica.stackexchange.com/questions/44585/… for more information
Jul
10
comment Settings to disable global scope
If you use LocalizeVariables -> False, then variables associated with the controls will have global scope. x = 10; {Manipulate[x, {x, 0, 40}, LocalizeVariables -> False], Dynamic[x]} By default Manipulate uses LocalizeVariables -> True Is this what you needed?
Jul
10
comment Replace interior of matrix with zeros
@Kuba good point, easy to fix, will do in sec
Jul
10
comment Plot integration curve of a system of ODEs
Please do not include the In[] and Out[] in the code, as it makes it hard to copy/paste as is.
Jul
10
comment Transparency rendering problems in Mathematica 10 (Mac)
it sounds like it I assume as I do not see the result you show on my windows 7 system.
Jul
10
comment Transparency rendering problems in Mathematica 10 (Mac)
I do not get any spots, using V10, windows 7 !Mathematica graphics
Jul
10
comment How to get the new font in Mathematica 10?
fyi, I personally do not like the default style sheet used in V10 and also in V9. I do not like the fonts used in these at all. First thing I do, is switch Default.nb to use Default_8.0.nb instead. I find The old fonts used in Mathematica much better for reading.
Jul
10
comment How to get the new font in Mathematica 10?
WHat does your DefaultStyleDefinitions say in advanced preferences? (ps. I am not sure I understand what you mean by I also deleted my entire Library/Mathematica The default style sheet should use Default.nb
Jul
9
comment How to add texture to solid Graphics3D object such as cylinder?
@Kuba I actually thought about this, but the top/bottom faces will be different, and more important, I am not sure it is efficient, since I am rendering a 3D object (cylinder) in addition to the texture itself. I am trying to see if I can make a circle with same texture and add these to the ParametricPlot3D to build the cylinder manually. If all else fails, will use what you suggested.
Jul
9
comment How to find all data points within closed curve
for getting the points out of the plot, I think Leonid method might be more portable than depending on [[1,1,3,2,1]] indexing as this might change in future versions. As in points = Reap[ParametricPlot[{Sin[u], Sin[2 u]}, {u, 0, 2 Pi}, EvaluationMonitor :> Sow[{Sin[u], Sin[2 u]}]]][[2, 1]]; stackoverflow.com/questions/5364088/…
Jul
8
comment Implicitly differentiate an equation, then solve the resulting equation
what is z? constant? function of x?
Jul
7
comment Im trying to model balls in a box with NDsolve, but the balls keep escaping the box
What I would do is integrating for a small time step, then do the detection of collision outside NDsolve not inside using events, then call NDSolve again for a small time step, and so on. see this demo demonstrations.wolfram.com/…
Jul
7
comment how to make contents of package visible to the autocomplete system?
It should work on OSX then, please report to wolfram@support.com (assuming you restarted everything clean, and rest everything etc.. and it still does not work)
Jul
7
comment how to make contents of package visible to the autocomplete system?
it also works on windows 7, V 9.01 screen shot !Mathematica graphics
Jul
7
comment Switch inside Manipulate controls statement
@m_goldberg But I qualified it by saying "at least I never seen it before." :) I was lazy to actually try it. But I learned something new today about Manipulate.
Jul
7
comment Switch inside Manipulate controls statement
You can't do this. You can't put controls inside Switch, at least I never seen it before. But if you post full code, it will help try it out than spend time to try to recreate it.
Jul
6
comment How to use multiple pure functions correctly?
Just to reinforce the point in the answer below. This shows the two # do not clash when using Function as in data = {1, 2, 3, 4, 5}; intervals = {{0, 1}, {1, 4}, {3, 4}}; Map[Select[data, #] &, (Function[i, IntervalMemberQ[Interval[#], i]] & /@ intervals)] The second # is bounded to the Function and the outer # does not see it.