3,020 reputation
1629
bio website
location China
age
visits member for 1 year, 8 months
seen 1 hour ago

Feel free to correct the grammar mistakes in my posts.


Oct
26
comment Can I generate a “piecewise” list from a list in a fast and elegant way?
About 3 times faster than my c11 now :).
Oct
26
revised Can I generate a “piecewise” list from a list in a fast and elegant way?
added 426 characters in body; added 7 characters in body
Oct
26
comment Can I generate a “piecewise” list from a list in a fast and elegant way?
I'm sorry but this approach is even slower than my c1 and no simpler than it.
Oct
26
comment Can I generate a “piecewise” list from a list in a fast and elegant way?
@Kuba Well, I should say it's more general… maybe the new list is generated by $f(a)$ and $g(a)$, or even $f(a1, a2)$ and $g(a1, a2)$…
Oct
26
revised Can I generate a “piecewise” list from a list in a fast and elegant way?
deleted 6 characters in body
Oct
26
asked Can I generate a “piecewise” list from a list in a fast and elegant way?
Oct
26
comment How to collect result continuously (interruptible calculation) when running parallel calculations?
Oh, I overlooked the existence of CheckAbort… thanks for your explanation!
Oct
25
comment NIntegrate receiving a function with NumericQ which returns a list
I can't think out a work-around with the existence of _?NumericQ, but what do you really want? Just a explanation for the failure? A numerical integration without symbolic processing for a list of expressions? Or something else?
Oct
25
comment How to collect result continuously (interruptible calculation) when running parallel calculations?
Well… isn't the Reap and ParallelSow redundant in the last sample? I think Catch has only caught the output of ParallelTable here.
Oct
24
comment Insert $+$, $-$, $\times$, $/$, $($, $)$ into $123456789$ to make it equal to $100$
I guess I've found the reason why ParallelMap fails: have you distribute definitions for a parallel computation with DistributeDefinitions first? If not, see this page in the document.
Oct
22
comment Elementwise, compilable min function
The UnitStep approach is quite fast! But it only works for 2 lists, can it be extended to any number of lists?
Oct
22
revised Singularity / stiffness / precision errors with NDSolve
edited body
Oct
22
answered Singularity / stiffness / precision errors with NDSolve
Oct
22
comment How can I deal with a non-numerical value for a derivative at $t = 0$ when using NDSolve?
@3c. I'm sorry that I can't think out a efficient algorithm which can start from any i so far… But also notice that the rough range for the current algorithm can be quite extensive. (What I used is $[-10, 10]$ at beginning.)
Oct
21
comment How can I deal with a non-numerical value for a derivative at $t = 0$ when using NDSolve?
@3c. you seem to misunderstand the syntax of NestWhile, for the first round of iteration, # in the first argument means the second argument of NestWhile i.e. #[[1]] represents {f[0], 1/100}[[1]], #[[2]] represents {f[0], 1/100}[[2]] so the calculated expression is {First@SortBy[f@h[First@f[0], 1/100], g], 1/100/10}.
Oct
19
revised How can I deal with a non-numerical value for a derivative at $t = 0$ when using NDSolve?
added 47 characters in body
Oct
19
comment How can I deal with a non-numerical value for a derivative at $t = 0$ when using NDSolve?
@3c. I've changed the last part of the code, I think it's easier to understand now. Feel free to ask if you still feel it obscure.
Oct
19
revised How can I deal with a non-numerical value for a derivative at $t = 0$ when using NDSolve?
change the code into a simpler one.
Oct
18
revised NestWhile application
added 110 characters in body
Oct
18
answered NestWhile application