4,904 reputation
2954
bio website
location China
age
visits member for 2 years, 4 months
seen 17 hours ago

Feel free to correct the grammar mistakes in my posts.


Oct
8
comment Has this implementation of FDM touched the speed limit of Mathematica?
@DanielLichtblau Sadly the magic of C is ineffective here, at least with TDM-GCC 4.8.1 and Vista 32bit.
Sep
30
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
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
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 Compile nested Sums
Then a quick analysis shows that your nested Sum can be written as sumsum = Compile[{{data, _Real, 1}, {n, _Integer}}, Module[{t = Total@data[[;; n]]}, Total[(1/(n data[[;; n]] + t))]]]
Sep
20
comment How to solve time dependent Optical Bloch Equations for a three level system?
Well, the ODEs are generated by some kind of matrix calculations, right? I'd rather you showed us the original one. Also, solving DEs in Mathematica is not simply a programming issue, a good understanding for the original problem is often necessary IMO. I think you'd better include some background information about your DEs.
Sep
20
comment Improve the performance of solutions to Project Euler (#14)
What's the usage of s ?
Sep
20
comment Problems with “Test Connectivity” and the Pacletserver
What's a "underlying user name"? Is there any evidence for its existence? I suspect the issue is not a user name with non-ASCII character, but some kind of unknown residuals. I faced very similar issue (even worse actually, I couldn't even call WolframAlpha or search words that are not function names) recently when updating v8 to v9, and I never used a non-ASCII user name. [Clean start](support.wolfram.com/kb/3274 ) doesn't work, but when I re-install my v9 in a new account, the problem resolved!
Sep
20
comment Understanding differences between Maple and Mathematica in examples picked by Maplesoft
@DanielLichtblau Er… Sorry for my poor English, but what's "epsilon credit"?
Sep
20
comment Export[] performance
On my Vista 32bit, with v9.0.1, the timings are: {2.566000, "test.h5"} vs {3.374000, Null}
Sep
19
comment Ted's explanation for the 3rd argument of ListCorrelate doesn't apply to the {1, -1} case?
@Tangshutao You're welcome, without answering your question, I won't have noticed the consistency today. 教学相长 :D