Question: Functions involving Vector and Matrix entries

Hello,

Here is my problem:

> vec1:=Vector(2): plot(vec1[floor(x)], x = 1 .. 2);
Error, bad index into Vector

The above should give the zero plot, but it gives the error message.

Of course, vec1[floor(x)] gives the correct answer for any specific x. (i.e. vec1[floor(1.5324)] gives 0, which is correct).

I get the same problem when plotting or integrating functions that simliarly depend on Matrices. What's going on?

Sincerely,
Adeel
Please Wait...