Question: About evalhf and matrices

I use Maple 12.02 on Windows XP

I try to use evalhf function to improve performance.

I want perform numerical calculation for matrices.

My example is:

M1 := (x) -> <<x^2|x>,<1|x>>;

M1(x);
M1(0.1);

| x^2 x |
| 1   x |
| 0.01 0.1 |
| 1    0.1 |


evalf(M1(0.1));

| 0.01 0.1 |
| 1    0.1 |


evalhf(M1(0.1));

Error, unable to evaluate built-in function `member` in evalhf


I have error :(

I try to use other matrix constuct method.

M2 := (x) -> Matrix([[x^2, x], [1, x]]);

M2(x);
M2(0.1);

| x^2 x |
| 1   x |
| 0.01 0.1 |
| 1    0.1 |

evalf(M2(0.1));

| 0.01 0.1 |
| 1    0.1 |

evalhf(M2(0.1));

Error, unable to evaluate expression to hardware floats: [[0.1000000000e-1, .100000000000000004], [1, .100000000000000004]]

but get another error.

How can I use evalhf with matrices correctly?
What the difference between first and second matrix constuct method?

Please Wait...