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

Feel free to correct the grammar mistakes in my posts.


May
19
answered Loop in solving multiple matrix calculation
May
19
comment Loop in solving multiple matrix calculation
Module[{i = 1}, Do[Print[aa[i] == (b /. Solve[matrix.b == 0, b] // Transpose // Quiet // MatrixForm)]; i++, {ω, eigenval}]]
May
19
comment Loop in solving multiple matrix calculation
BTW, besides the last line, I believe the entire code can be written in a better way. Maybe you can add some background information for the original problem.
May
19
comment Loop in solving multiple matrix calculation
Yeah, I'll use Table, because its output, which is a list of Rule, is easy to be used in further calculations together with ReplaceAll etc. while there's no way to call those given by Print inside Do.
May
19
comment Loop in solving multiple matrix calculation
I'm not sure what you mean: Do[Solve[matrix.b == 0, b] /. Rule -> Equal // Transpose // MatrixForm // Print // Quiet, {ω, eigenval}]; Do[b /. Solve[matrix.b == 0, b] // Transpose // Quiet // MatrixForm // Print, {ω, eigenval}]
May
19
comment Loop in solving multiple matrix calculation
Why "loop"? I think the output is not "ugly" anymore, and Table is essentially a loop, too. Or you prefer this format?: b /. Table[Solve[matrix.b == 0, b], {ω, eigenval}] // MatrixForm
May
19
comment Loop in solving multiple matrix calculation
You mean something like Table[Solve[matrix.b == 0, b], {ω, eigenval}] /. Rule -> Equal // MatrixForm ?
May
14
awarded  Nice Question
May
13
comment Do not understand expression returned by FullSimplify
@Kuba I guess OP is suspecting that Simplify has internally Integrateed the expression and then differentiated it.
May
9
comment Parallel computation of NDSolve and a problem
@yashar It's because ParallelTable has the attribute HoldAll, so those Subscripts are passed into it before changing into numeric values. When you use RHS2 to store RHS, evaluation happens, and Subscripts are removed, it's equivalent to use Evaluate@RHS inside ParallelTable.
May
9
revised Parallel computation of NDSolve and a problem
deleted 1 character in body
May
9
accepted How to make the code inside Compile conciser without hurting performance?
May
9
answered Parallel computation of NDSolve and a problem
May
8
comment How to make the code inside Compile conciser without hurting performance?
@OleksandrR. You mean what Leonid Shifrin has done below? :)
May
8
asked How to make the code inside Compile conciser without hurting performance?
May
7
comment Parallel computation of NDSolve and a problem
Possible duplicate of mathematica.stackexchange.com/q/14723/1871
May
7
comment Parallel computation of NDSolve and a problem
Where did you put your RHS2=RHS? just behind the definition of RHS or, just in front of the AbsoluteTiming[……]?
May
5
awarded  Announcer
May
5
comment Behavior of 1.2 ∈ Rationals changes in v9?
@Szabolcs OK……what about posting this as an answer so I can accept it?
May
5
comment Behavior of 1.2 ∈ Rationals changes in v9?
Hmm……I'm afraid that the second example isn't proper. Consider Element[IntegerPart[Sqrt[2]], Rationals].