Reputation
9,595
Next privilege 10,000 Rep.
Access moderator tools
Badges
2 21 86
Newest
 Necromancer
Impact
~108k people reached

Nov
28
comment Partial differential equation, Finite difference Method
I managed to solve the equation, as soon as this question is reopened, I'll post an answer. But with my arbitrarily chosen u0 and v0, the image I obtained is quite different from yours.
Nov
28
comment Partial differential equation, Finite difference Method
You should include all this in your question.
Nov
28
comment Solving nonlinear 3rd order ODE over range from zero to infinity
I have a feeling this kind of equation has been asked several times in this site. Can you add some background information of the equation so we might be able to solve the problem better?
Nov
28
comment Concise alternative to First@First@Position[…, 1,Heads->False]
@tba Actually there's a related post: mathematica.stackexchange.com/a/2822/1871, find isn't yet included in the package though, maybe you can suggest Szabolcs to add this function.
Nov
28
comment Concise alternative to First@First@Position[…, 1,Heads->False]
@tba If there's still only one matched element then Ordering[Abs[lst - 7], 1]
Nov
28
comment Partial differential equation, Finite difference Method
1. What's the value of u0 and v0? 2. What's the range of u, v, r? 3. Is finite difference method necessary? Can NDSolve be used?
Nov
28
comment How to increase speed of iterations with nonlinear functions
Are you in v10? in v9 and v8 Table[v, mi] breaks the code.
Nov
28
comment Nesting BaseForm several functions deep causes dependent functions to not fully evaluate. Solutions?
Oh… so there doesn't exist something like a = Add[2, 2, 3](* line break *) a + a in your notebook?
Nov
27
comment Nonrectangular tensor encountered
Using variables starting with a lowercase letter is a good habit of course. But personally I think uppercase name isn't a scourge, they can be used at least in toy codes. You just need to keep the color issue in mind. (BTW, the color of all the built-in function is black. )
Nov
27
comment Nonrectangular tensor encountered
Probably because you've done this unconsciously. A easy way to keep yourself away from this kind of mistake is to always keep an eye on the color of the variable. Usually a variable without any value stored in is blue, otherwise it's black. (There're exceptions of course, for example the K you used in your code, and that's one of the reasons they're not recommended to be used as user-defined variables.)
Nov
27
comment Nonrectangular tensor encountered
I guess you forgot to Clear@P
Nov
27
comment Nesting BaseForm several functions deep causes dependent functions to not fully evaluate. Solutions?
@DustinDarcy Maybe I haven't understand the situation correctly, but are you awaring that $PrePrint doesn't need to be unset before being set to a new function? : i.stack.imgur.com/5YaFr.png
Nov
27
comment Nesting BaseForm several functions deep causes dependent functions to not fully evaluate. Solutions?
@DustinDarcy Have a look at my update 2, this solution should be quite robust. The only trouble is that $PrePrint won't be automatically cleared but it's not a big deal. When you don't want to see the BaseForm of the output anymore, just $PrePrint=.
Nov
27
comment Nesting BaseForm several functions deep causes dependent functions to not fully evaluate. Solutions?
@DustinDarcy Thanks for accepting. As to the new sample, it seems that baseForm failed to escape from Sum. This may be because Sum has used some unusual rule for summation. (Here is an evidence for the unusualness of Sum.) A quick fix I can think out is to define a customized Sum: sum[f_, {x_, a_, b_}] := Sum[f, {x, #, #2}] &[a, b]. This is probably not the only edge case though 囧.
Nov
26
comment Sum selected rows/columns and replace them with the sum
Yeah, it doesn't meet your requirement, I just mean I personally think forming such a mixed list isn't a very good idea.
Nov
26
comment Nesting BaseForm several functions deep causes dependent functions to not fully evaluate. Solutions?
@DustinDarcy See my edit.
Nov
26
comment Manipulation linear systems of equations
@ShutaoTANG Also in v9, it's just because for one of the possible solutions vx/ix is 0/0.
Nov
26
comment Sum selected rows/columns and replace them with the sum
Well, personally I feel the position of totRow quite strange. Why placing it in the last line? Something like tbl[[pos]] = Total /@ tbl[[pos]]; tbl is more intuitive in my opinion.
Nov
26
comment Get around and solve stiff systems using NDSolve, particularly addressing “step size is effectively zero; singularity or stiff system suspected”
Can you add some background information of the equation? For now I can't help suspecting that the stiffness is the nature of the problem or there exists low level mistakes. Also, you'd better simplify your code sample as much as possible so it may attract more attention, currently it's really frustrating.
Nov
21
comment List of compilable functions
@luyuwuli That's all because of All, the FullForm of ;; is Span[1, All] actually.