9527
Reputation
Top tag
Next privilege 250 Rep.
 Sep 24 awarded Autobiographer Jul 2 awarded Curious Nov 21 comment Reduce a huge low-rank matrix This method is faster than DeleteCases method, and is as fast as halirutan's solution. Nov 21 accepted Reduce a huge low-rank matrix Nov 21 comment Reduce a huge low-rank matrix This answers my question. Originally I also expected other solutions like: is there any command to reduce/decompose a $10 \times 10$ square matrix with matrix rank equal to 3, to a $3\times 3$ matrix, such that the nonzero eigenvalues are not changed during the reduction/decomposition? Nov 21 comment Reduce a huge low-rank matrix I am using a $1024\times 1024$ real matrix as a SparseArray, with 999 zero columns/rows. With the reduced matrix, the Eigenvalues[] computes faster by 3 to 4 times. Nov 21 asked Reduce a huge low-rank matrix Nov 4 awarded Nice Question Nov 4 comment Boundary effect of Graphics3D object Tube[] Thanks, this is what I want. However, I have a new question based on your answer. If I replace the tube t1 by an arrowed tube , then the Faceform does not apply to the arrowheads. For example, t1 = {Arrowheads[{0.1}], Arrow[Tube[{{-0.2, -1, 0}, {-0.2, 1, 0}}, 0.05]]}; Graphics3D[{FaceForm[None, Glow[White]], t1}, Boxed -> False] will leave the arrowhead visible. Why it does not apply to arrowhead? Nov 4 accepted Boundary effect of Graphics3D object Tube[] Nov 3 asked Boundary effect of Graphics3D object Tube[] Oct 10 comment Declare local variable when defining a function to mimic Table[] Thanks. It works. That is the "local variable" I want. And the syntax highlighting works for me. Oct 10 accepted Declare local variable when defining a function to mimic Table[] Oct 9 revised Declare local variable when defining a function to mimic Table[] added 524 characters in body; added 16 characters in body; added 9 characters in body Oct 9 comment Declare local variable when defining a function to mimic Table[] yes, you are right. For $C^{ijk}_{p}=\sum_{lmn}A^{ijk}_{lmn}B^{lmn}_{p}$, I can use tensorC=TensorContract[tensorA,TensorB,{{4,1},{5,2},{6,3}}], which is efficient and compact. But we need to figure out the pairs {{4,1},{5,2},{6,3}} correctly first. It would be still good to keep tracking the indices by writing them down explicitly in many cases though. Oct 9 awarded Commentator Oct 9 comment Declare local variable when defining a function to mimic Table[] Thanks. This is what I want. I still wonder if we can make i and j in tab[f[i,j],i,j] local variables? Just like in Table[f[i,j],{i,3},{j,3}] the variables i and j are made special as local variables, and these variables appear in blue color (in ver9.0.4). Oct 9 comment Declare local variable when defining a function to mimic Table[] Array is good to get a tensor in a compact way. But it is not good to keep tracking the indices of tensors in computation. For example, if I want to compute $C^{ijk}_{p}=\sum_{lmn}A^{ijk}_{lmn}B^{lmn}_{p}$, with all indices running over the same range, then mySum[A[i,j,k][l,m,n]B[l,m,n][p],l,m,n] would be more convenient then Array. Oct 9 asked Declare local variable when defining a function to mimic Table[] Oct 9 revised Use Pattern with Vectors in Assumptions updated: explaining the desired goal.