Hot answers tagged

8

The main difference can been seen when dealing with list of lists. Consider the following list: lis = {{1, 2, 3}, {3, 4, 5}, {5, 6, 7}}; Lets create a Listable function g SetAttributes[g, Listable] Now we Map a non-listable function f and apply the listable function g Map[f, lis] (* {f[{1, 2, 3}], f[{3, 4, 5}], f[{5, 6, 7}]} *) g[lis] (* {{g[1], ...


4

Try this: MapThread[Equal, {initialXArr, xarr}] (* {Subscript[x, 0][0] == 15, Subscript[x, 1][0] == 16, Subscript[x, 2][0] == 17, Subscript[x, 3][0] == 18, Subscript[x, 4][0] == 19} *) Have fun!



Only top voted, non community-wiki answers of a minimum length are eligible