Reputation
1,525
Top tag
Next privilege 2,000 Rep.
Edit questions and answers
Badges
6 26
Impact
~33k people reached

  • 0 posts edited
  • 0 helpful flags
  • 102 votes cast
May
5
revised A matrix-vector cross product
added 274 characters in body
May
5
comment A matrix-vector cross product
Ok, rule replacement works. But I still don't know where does it gone wrong? I looked into the Trace result, but it is unexpectedly long! I can't figure out why.
May
5
comment Confused about Unevaluated
I think I understand. Clear explanation, Thank you very much!
May
5
comment A matrix-vector cross product
OhOh, Sorry J.M. I found peculier things. Your solution is flawed. Try Cross[Unevaluated/@PauliMatrix[Range[3]],{0,1,0}]
May
5
comment Confused about Unevaluated
What does inert mean? Are there any other head that are inert too?
May
5
comment Confused about Unevaluated
Well, you mean the result of evaluating the head Unevaluated is just strip it, right?
May
5
comment A matrix-vector cross product
I finally choose your answer. easier and won't have to worry about the order and negtive sign when using LeviCivitaTensor
May
5
comment Confused about Unevaluated
yeah! I notice it from Trace. Mathematica just simply strip Unevaluated away in the Table in the first step. But why?
May
5
comment Confused about Unevaluated
@m_goldberg thank you for recommending the very good book.
May
5
comment Confused about Unevaluated
@MarkMcClure thank you very much
May
5
comment Confused about Unevaluated
@MarkMcClure You're telling me that the step "then evaluate it" in Map and the step 'substitutes values ....explicitly evaluates the first argument at those values' in Table is two kind of evaluate?!! I still don't understand, Now that Table has the attributes HoldAll, it should hold the Unevaluated. It seems that "expr, shift+Enter" and "Evaluate[expr]" is different ? And Map use the first one Table use the second?
May
5
comment Confused about Unevaluated
@MarkMcClure But according to the docs of Map. Map always effectively constructs a complete new expression and then evaluates it. And use Trace, I found in the last three steps, mathematica actually remove the Unevaluated, and finally bring back the Unevaluated head, why?
May
5
comment direct assignment to the element in a Table
Sorry for bothering you again, Mr.Wizard. I have some more questions. First, I found that in the definition of function boost2. the sym in the Block will be red. It seems that Mathematica think it is not right to write in this way. But why there is no any error message when using boost2. Second, I tried to define a seperate function that severs holding a table expression. I call it holdtable. holdtable[tableexpr_, tobeheld__] := Block[{tobeheld, Part}, Hold @@ {tableexpr}]But when I use holdtable like holdtable[test[1],tmp], the result is not right. tmp is not blocked.
May
5
asked Confused about Unevaluated
May
4
asked A matrix-vector cross product
May
4
accepted direct assignment to the element in a Table
May
4
comment direct assignment to the element in a Table
Thank you very much! I had been trying to think of other ways to do this, but all failed. And I have fully understood your thoughts of dealing this problem. Block together with Hold and then apply ruledelayed to achive the assignment, this approach is powerful and general!! You're awesome!!
May
3
comment direct assignment to the element in a Table
And I really don't understand func_[boost2[expr_, sym__], arg___] ^:= . Why there is a Blank after func? what does it mean?
May
3
comment direct assignment to the element in a Table
Thank you Mr.Wizard. Sorry for the late comment. I spent 10 hours reading mathematica docs and doing experiment on mathematica.In the end, I still can't make all that clear. I am really frustrated with my IQ. So here is the question, I think I don't have a good understanding ofBlock. For example, Why x=7;Block[{x},Print[x]] gives x not 7?? why Block[{tmp},Hold@@{tmp[[1]]}]gives Hold[tmp[[1]]], while Hold@@[tmp[[1]]] gives 1 ?? And why your code include Part in the Block list. I tried remove the Part, though it will give error message, but the tmpreally changes.
May
3
comment direct assignment to the element in a Table
@belisarius thank you. So can you offer me a better way to achive my purpose? Or you said it's possible. I want to know how it is possible.