3,983 reputation
1841
bio website
location China
age
visits member for 2 years, 2 months
seen 2 days ago

Feel free to correct the grammar mistakes in my posts.


1d
awarded  Explainer
2d
comment Transfer graphics from Mathematica to Word without loss of quality
I think you lost a link :)
Sep
27
comment How to do replacements in Compile'd code?
Also, it's hard to tell what you're trying to do with your first piece of code: some of the definitions of the functions and variables are absent, what' more, as you said, it's polluted. You'd better clarify your intention more a bit.
Sep
27
comment How to do replacements in Compile'd code?
Well, why you want to make the replacement HoldPattern[e_ /. r_] :> Block[{}, (Hold[e] /. r) /; True]? Just a example? You're exploring how to write the code programmatically?
Sep
27
comment How to do replacements in Compile'd code?
Sorry for my poor English, I thought "do something in the spirit of this code" was suggesting that you're writing your code based on an idea showed in "this code" pasted in a link or something. Then what're you trying to achieve?
Sep
27
comment Increasing MaxPoints in NDSolve results in memory issue
"FiniteElement" in v10 might help. (Not tested, the wolfram cloud is currently down. ) See for example this, this and this post.
Sep
27
comment Discrepancy between Mathematica and Fortran expressions — Fortran gives wrong output (C,C++ programmer trying to use Fortran)
I suggest you give a minimal working example. (I know little fortran, but I think in fortran your code should be contained in a function or a subroutine or at least a loop, and some code for plotting is also necessary, right?) And the button for the uploading of image is here.
Sep
27
comment How to do replacements in Compile'd code?
I guess you lost a link?
Sep
27
comment Join lists with nested list
This answer has the same spirit as belisarius's, so does the output: it outputs {a, d, g, {b, e, h, c, f, i}} rather than {a, d, g, {b, c, e, f, h, i}}.
Sep
27
comment Join lists with nested list
I think the output OP asking for is {a,d,g,{b,c,e,f,h,i}} (Why he accepted this 囧 ?)
Sep
26
comment Solving Laplace's equation in rectangle domain by separation of variables
@SjoerdC.deVries Ah, yes 囧
Sep
26
comment Solving Laplace's equation in rectangle domain by separation of variables
Seems to be a collection of simple mistake. NIntegrate should be NIntegrate (Notice the difference of color), koefC[k_, t] should be koefC[k_, t_], ψr[x, y] should be ψr[x, y, t], definition of ψr[x, y, t] will lead to a endless recursion, there may be more. Also, I think using LaTeX for greek letters and subscripts isn't a good idea (although it surprisingly almost doesn't influence code copying in this case), your post looks really frustrating at first glance.
Sep
25
comment How can I load << MathWorld`Curves`?
This was once asked but didn't get an answer…: mathematica.stackexchange.com/q/43620/1871
Sep
25
revised Compile nested Sums
add some explanation
Sep
24
revised Compile nested Sums
edited body
Sep
24
answered Compile nested Sums
Sep
24
comment Compile nested Sums
Well, I believe the nested Sum can be generally avoided. BTW, according to my quick test, Plus@@Table is faster than Sum, and Total@Table will be even faster.
Sep
24
comment Plotting recursive from a for loop
Related: mathematica.stackexchange.com/q/33396/1871 mathematica.stackexchange.com/q/56198/1871
Sep
24
comment Optimising a simple computation with vectors
Well, if the expression is not that complicated or evaluated for enough times, I won't be surprised there's no significant difference. And since you don't give a minimal working example, it's hard to tell if there exist other issues.
Sep
24
reviewed Approve suggested edit on Plotting recursive from a for loop