4,212 reputation
2947
bio website
location China
age
visits member for 2 years, 2 months
seen 12 hours ago

Feel free to correct the grammar mistakes in my posts.


Aug
6
comment the winding number for the circle map (Arnold tongue)
And wraping m with Round as @george2079 suggested is also a valid approach.
Aug
6
comment the winding number for the circle map (Arnold tongue)
@heropup Oh, seems that it's necessary to declare the type of m in this case (I added those declarations habitually in my code so didn't notice this) : f = Compile[{n, {m, _Integer}, a, k}, Mean[Nest[# + a - k Sin[2 Pi #] &, RandomReal[1, m], n]]/n];
Aug
5
comment the winding number for the circle map (Arnold tongue)
If you use RandomReal[1, m] instead of the Table[……], the code'll be about one time faster :)
Aug
4
comment V10's Operator Forms - what are they good for?
Er… is the /* in the last example irreplaceable? // seems to have the same effect.
Jul
31
comment How to get solution from DSolve
@AlexeiBoulbitch Because I'm not sure if this is what OP wants , % is surely not a function :)
Jul
31
comment How to get solution from DSolve
Well, then have you considered DSolveValue[……] (* start a new line *) Manipulate[Plot[%, {x, 0, 5}], {a, -5, 5}, {c, -5, 5}]?
Jul
31
comment How to get solution from DSolve
You mean DSolveValue?
Jul
28
comment How can I solve my system of differential equations?
@raj See my edit.
Jul
26
comment NDSolve PDE, not enough boundary condition?
Maybe adding some background of the PDE will attract more attention?
Jul
25
comment About Compile Function
BTW, If you feel satisfied with an answer, you can accept it by clicking the tick at the left-top corner of it.
Jul
25
comment About Compile Function
Well, you should not place a space between "@" and my name, or I won't get the reminder.
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".