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

5h
comment Can't clear variables with subscripts
Related: mathematica.stackexchange.com/a/46239/1871
17h
comment Table with List iterator return unpacked list
Interesting, another possible evidence: With[{xx = Range[1., 10., 0.01]}, Table[w + ky, {w, Range[1., 10., 0.01]}, {ky, xx}]] // Developer`PackedArrayQ
18h
comment Table with List iterator return unpacked list
Mathematica never promised to give you a packed array :D, anyway, it's a interesting observation.
1d
comment How to define a complicated function inside the body of Compile?
@MichaelE2 Yeah, actually the memory cost is the only thing in my mind, because I think that's what OP is concerned. However, after checking FullForm@f, I noticed my answer is incorrect, it also inserts 3 copies of the (compiled) function into the body! So far I can't think out a way to define a sub routine as OP desires…
Feb
7
comment How to define a complicated function inside the body of Compile?
@MichaelE2 I guess it… depends on how the big nasty function is defined :D
Feb
7
comment Weird behaviour for a vector InterpolatingFunction inside an NDSolve
@march is right, {0} + g[x] will evaluate to {g[x]} before NDSolve execute. I think you'll find this post interesting: mathematica.stackexchange.com/a/97006/1871
Feb
7
answered How to define a complicated function inside the body of Compile?
Feb
7
comment How to define a complicated function inside the body of Compile?
I think this has little difference with define bigNastyFunction outside and use option "InlineExternalDefinitions" -> True, because then three copies of that function will be inserted into the body of the compiled function verbatim"
Feb
2
revised Partial Differential Equation in Parallel
edited tags
Feb
2
revised Problems when solving a nonlinear PDE system with NDSolve
deleted 1 character in body
Feb
1
revised Problems when solving a nonlinear PDE system with NDSolve
added 262 characters in body
Feb
1
comment Problems when solving a nonlinear PDE system with NDSolve
"Is there any offline version of such conversion tools", check this post:mathematica.stackexchange.com/q/1137/1871 . As to your new update, since I'm now at home and have no access to the new mentioned article, I'd like to stop verifying the model, I write this comment mainly to mention, the NDSolve::bcart: can be suppressed by using T[x, 0] == (Tw - Tgin) (Exp[1000 (x - xr)]) + Tgin instead of the corresponding boundary, NDSolve::pdord can be suppressed by using neweq5 = D[sys[[5]], t] /. Solve[D[sys[[4]], t], Derivative[0, 2][Tg][x, t]][[1]]; instead of eq5.
Jan
30
comment Problems when solving a nonlinear PDE system with NDSolve
BTW, I usually use steampiano.net/msc to convert the special characters. halirutan's extension is quite unstable at least in my Chrome.
Jan
30
comment Problems when solving a nonlinear PDE system with NDSolve
Then, you seemed to have eliminated eq7 in some way, and I think you haven't done it correctly, eq6 and eq7 should be something like eq6 = D[ρg*ϕb*yo2b[x, t], t] + D[ρg*yo2b[x, t]*ub*ϕb, x] + D[ρg*ϕb*yo2b[x, t]*Vo2b, x] == (-hm)*A3*(yo2b[x, t] - yo2s[x, t]); eq7 = D[ρgs*ϕs*yo2s[x, t], t] + D[ρgs*ϕs*yo2s[x, t]*Vo2s, x] == (-ωo)*no1 - ωa*no3*hm*A3*(yo2b[x, t] - yo2s[x, t]); . As to the article, to be honest I can't understand it very well, so long I can't tell how $c_p,c_{\text{pg}},d,D,u_b,V_{O_{2_b}},V_{O_{2_s}},\alpha ,\phi _b,\phi _s$ is calculated.
Jan
30
comment Problems when solving a nonlinear PDE system with NDSolve
And there're still mistakes, here are those I can identify: 1. ho = ho/1000; hp = hp/1000; ha = ha/1000; is redundant; 2. Ao = 569 10^6; Ap = 2 10^14; Aa = 5 10^5; 3. 10*D[yc[x, t], t] and 10*D[ya[x, t], t] should be D[ρ*yc[x, t], t] and D[ρ*ya[x, t], t] where ρ = (yc[x, t] + ya[x, t]) ρc + ρf (1 - yc[x, t] - ya[x, t]);; 4. The unknown functions should be {T, yc, ya, yo2s, yo2b, Tg}, according to the article. (u should probably be eliminated, there're 7 equations anyway. )
Jan
28
comment Constructing a particular Toeplitz matrix with a certain rule
@Student See my edit
Jan
28
revised Constructing a particular Toeplitz matrix with a certain rule
added 302 characters in body
Jan
28
comment Constructing a particular Toeplitz matrix with a certain rule
@Student You forgot to Clear[x]
Jan
28
answered Constructing a particular Toeplitz matrix with a certain rule
Jan
28
revised Implementation of a matrix formula
added 759 characters in body