↧
Answer by Nasser for Behaviour of `ToExpression` inside a function definition
It is because "arr" inside string do not bind to the input argument. You have to do it separatly.a = {{1, 2}, {3, 4}};f[arr_] := ToExpression[ToString[arr] <> "[[1,1]]"]And now it worksBut this...
View ArticleBehaviour of `ToExpression` inside a function definition
I want to create a function that takes in an array of unknown size and do some index operations on it. I am using strings to construct the expression and then trying to use ToExpression for evaluating...
View Article
More Pages to Explore .....