1,465 reputation
623
bio website
location
age
visits member for 2 years
seen 14 hours ago

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.
May
3
comment direct assignment to the element in a Table
@belisarius thank you belisarius. But I don't get it. What do you mean?
May
3
asked direct assignment to the element in a Table
May
3
comment why set values in this way doesn't work?
Thank you andre! So there is no way to set values to Table directly? I really need to do it this way, because I have defined a function which is a table, with different argument, the table will be different. And I want to set values to the table list in the program.