1,211 reputation
319
bio website
location
age
visits member for 1 year, 8 months
seen 2 days ago

Jul
18
comment Mathematica 10 doesn't support path containing Chinese characters
@TetsuoIchii So this is a bug?
Jul
7
comment Defining a function that differentiates another function with rule replacement
I found this works: hh[i_][x_, y_] := {{tt, x + Sin[x]}, {y, 1}} /. rulelist[[i]]; hhpar[x_, y_, i_] := Derivative[1, 0, 0][hh[i][#1, #2] &][x, y]; While this not works: hh[x_, y_, i_] := {{tt, x + Sin[x]}, {y, 1}} /. rulelist[[i]]; hhpar[x_, y_, i_] := Derivative[1, 0, 0][hh[#1, #2, i] &][x, y];
Jul
7
comment Defining a function that differentiates another function with rule replacement
Thank you very much!
Jul
7
comment Defining a function that differentiates another function with rule replacement
And I forgot what this kind of function definition hhpar[j_, k_][x_, y_, i_] is called? Could you show me a link which has a discussion on this kind of function definition?
Jul
7
comment Defining a function that differentiates another function with rule replacement
Thank you, m_goldberg. Your definition really works, but I don't understand why my definition gives wrong answer. Could you explain a little? I think I miss a lesson on function definition.
Jul
6
comment Defining a function that differentiates another function with rule replacement
@eldo Thank you, eldo! But it doesn't work.
Jul
6
comment How can I avoid a scoping problem when differentiating?
@Szabolcs Wow! So quick! Thank you very much! This works, and I thought I known the reason, but it terms out that I actually didn't know the true reason is x at that time.
Jun
26
comment How to get correct numerical integration which should be zero?
Thank you very much! AccuracyGoal works perfectly
Jun
26
comment Strange numerical integration result
Thank you very much! Trace is so useful!
Jun
26
comment Strange numerical integration result
What is more, the integration of berrycur is rather slow, it tooks me 40 seconds to give result 12.5664. Do you know how to speed it up?
Jun
26
comment Strange numerical integration result
Hi, MikeLimaOscar! Great explanation! How did you come up with the idea to test Integrate[berrycur[x, y][[1]], x, y]? This explains the unreasonable result. But I still want to know why Integrate gives (x^2 y)/2??? It seems that (x^2 y)/2 is the integration of x y in terms of x.
Dec
18
comment How to constrain memory usage on HPC?
Sorry for late response. I tried Evaluation -> Parallel Kernel Configuration, uncheck the "try to relaunch failure kernels". But it didn't work.
Dec
14
comment How to constrain memory usage on HPC?
I currently use Linux and Mathematica 8. I don't know how to use lowlevel link-communication to do this. But I found that even if you don't evaluate ParallelTable expression. Just a normal non-parallel expression like RandomInteger[100, {500, 500, 500}] for second time, the memory will still not get controlled.
Dec
14
comment How to constrain memory usage on HPC?
Thank you halirutan! I tried your code. But it seems that it doesn't work. Try ParallelTable[tt[i] = RandomInteger[100, {500, 500, 500}], {i, 1, 2}], you will see that the kernels are closed at first, then relaunched automatically and evaluate well give the result regardless of the memory
Dec
12
comment how to deal with so many digits in plot ticks
this is a possible way, thank you for your suggestion
Dec
12
comment how to deal with so many digits in plot ticks
@Kuba @SjoerdC.deVries Thank you for your information! I learned to style ticks. A custom tickformat is useful.
Dec
11
comment Interactively extract points from a plot (ListPlot or SmoothDensityHistogram)
Hi, Heike, Could you please tell me how to change Locator size in manipulate?
Dec
11
comment how to interactively select points inside certain region in a plot
@xslittlegrass WoW, I like your method to choose region using drawing tool, it's much more flexible to use linesegment or freehandline than polygon. And so smart to extract lines and pts from the plot. Why didn't you post an answer to that question?
Dec
11
comment Interactively extract points from a plot (ListPlot or SmoothDensityHistogram)
@SparsePine and an "undo" button is also useful, Button["undo", poly = Drop[poly, -1]]
Dec
10
comment efficient way to give nearest neighbour and next nearest neighbour of every point in a point set
Sorry, I found bugs. See this ps list here pastebin.com/GXtnVxYi This ps list contains Sqrt, and if you try ps=N@ps and add small offset to d respectively, you will find their result is different. And I can confirm, add offset gives right result, because the right result will compatible with my other code. But merely add small offset without ps=N@ps will effect the performance much. So I conclude that ps=N@ps and a small offset, None is dispensable for correct and efficient code. I hope you could check this to see if my statement is right. Thank you