Ask Your Question

chris233's profile - activity

2021-04-03 17:21:25 +0200 marked best answer Using matrix() inside a user function prevents argument evaluation

This function:

f(x) = x*matrix([[5]])

Will produce this result:

In: f(3)
Out: [5*x]

I would expect the result to be the same as this:

In: 3*matrix([[5]])
Out: [15]

What am I missing? How come the argument supplied ('x') isn't being evaluated inside the function?

Thank you

2021-04-03 17:21:25 +0200 received badge  Scholar (source)
2021-04-03 17:16:39 +0200 received badge  Supporter (source)
2021-04-03 00:09:13 +0200 received badge  Student (source)
2021-04-03 00:08:07 +0200 asked a question Using matrix() inside a user function prevents argument evaluation

Using matrix() inside a user function prevents argument evaluation This function: f(x) = x*matrix([[5]]) Will produce