3,756 reputation
1838
bio website
location China
age
visits member for 2 years, 1 month
seen 5 hours ago

Feel free to correct the grammar mistakes in my posts.


Jul
25
comment About Compile Function
Considering the code you showed in your previous question, I want to remind you that Compile isn't a panacea for speed, it'll lead to more limitation in programming and may bring you endless grief indeed. Have you already read this and this post?
Jul
22
comment Get the last line from each of a large number of files, transform them, and write all results to a single new file
You may also refer to this.
Jul
22
comment DSolve breaks when the ordering of independent variables aren't proper?
@chris Yeah, v9.0.1 and Wolfram Programming Cloud returned unevaluated after the warning, too.
Jul
22
comment Use NDSolve to solve a PDE
@wdg It's bc, I forgot I changed the name, edited, thx for pointing out :)
Jul
21
comment How to define two polyhedron intersect or not?
Well, if you want to call someone who isn't the original poster that appearing in the comment, you need to add @someone in your comment, or others won't see the reminder. RegionIntersection can be used for 3D object, for example d1 = {{0, 0, 0}, {1, 0, 0}, {0, 1, 0}, {0, 0, 1}}; d2={{0,0,0},{1/2,1/2,1/2},{1,0,0},{1,1,0}};r=RegionIntersection@@(Tetrahedron/@{‌​d1,d2});RegionMember[r,{x,y,z}]//Reduce
Jul
19
comment How to define two polyhedron intersect or not?
Well, as @Nasser mentioned above, it's not so proper to ask question 2 here. (It's a little too board. ) As to the 1st question, have you looked into Simplex, RegionIntersection, RegionMember in v10?
Jul
19
comment How to define two polyhedron intersect or not?
OK, then what's the meaning of "When the concrete aggregate become more and more in a cubic region, it is very difficult to add new aggregate in the region, How can deal with this problem"?
Jul
19
comment How to define two polyhedron intersect or not?
It'll be good if you can check your code before pasting it here, now, where's the definition of IntersectofTwoTriangles? Still, you didn't explain the meaning of your question 2.
Jul
19
comment How to define two polyhedron intersect or not?
Your code is incomplete, where's the definition of PointInandOnorOut3DTriangle? Also, I think IntersectofLineTriangle isn't a function that "decide if 2 polyhedrons are intersecting".
Jul
19
comment How to define two polyhedron intersect or not?
Please have a look at this and format your code just as @jtbandes did for you.
Jul
19
comment How to define two polyhedron intersect or not?
For the first question, do you mean "how to decide if 2 polyhedrons are intersecting"? Then, I can't understand your second question very well.
Jul
18
comment Factoring a differential equation into an operator product
If you just want to get $r_1, r_2,\cdots,r_n$ you can simply Solve $ a_n x^n + a_{n-1} x^{n-1} +\cdots+a_1 x+a_0 = 0 $.
Jul
15
comment How can I speed up this code?
@user14634 This is exactly what Simon proves in the last 4 steps of his explanation. By the way, the justification can be even easier with tensor notation.
Jul
4
comment How can I solve my system of differential equations?
@raj As I mentioned in the comment above, the best choice here is to use ParametricNDSolveValue in v9, NDSolve approach should also be available, but I can't figure out where the shoe pinched without your specific code.
Jul
3
comment CompilationTarget->“C” crashes the kernel
Same problem with TDM-GCC-4.8.1, Mathematica 8.0.4, Vista 32bit. Well, in fact it's not the first time I found CompilationTarget -> "C" made trouble, but I haven't yet managed to reproduce this kind of problem with a simple enough example for so long.
Jun
25
comment how to solve second order nonlinear coupled differential equations using NDSolve with hyperbolic function
@ameera "StartingInitialConditions" is just a guess, here I just choose it casually. For your equations there're many available "StartingInitialConditions", for example {x[0] == -1, x'[0] == -1, y[0] == 0, y'[0] == 0}, but it's also worth to mention that it can be really hard to choose proper initial conditions for some equations, for example this one.
Jun
18
comment Smooth Peter de Jong attractor
I think it'll be better if you add the compiled code since the existed piece of code can't be compiled directly. Compile isn't easy for everyone :)
Jun
14
comment Can a Symbol own OwnValues that don't evaluate when it's the head of an expression?
Sorry to my late reply. I did intend to wait for an hour after posting this question but was beaten by sandman within 10 minutes 囧. @Rojo Yeah, you're right, thanks for editing the title, also, thanks for m_goldberg's polishing :D
May
26
comment Visualizing vectors
You need to put all your Arrows in one pair of braces i.e. something like Graphics3D[{Orange, {Arrow[{{0, 0, 0}, {1, 1, 1}}]}, Red, Arrow[{{0, 0, 0}, {1, -1, -2}}], Green, Arrow[{{0, 0, 0}, {-1, 1, -1}}], Blue, Arrow[{{0, 0, 0}, {1, -1, -1}}]}, Axes -> True, Boxed -> True, PlotRange -> All].
May
21
comment Complex integrals and residues
Nothing is wrong with the syntax, I think it's because this integration doesn't have a analytic solution (at least Mathematica doesn't know it), consider NIntegrate if a numeric solution is enough for you.