Plotting a function which handles lists



Hi,

I am trying to plot functions, where lists are handled by indices, but
it fails.

Following is a reduced example:

        f(t):=[1,2,3,4,5,6,7,8,9][floor(t)+1];
        plot2d([f(x)], [x,1,5], [y,0,9],[nticks,200]);

gives:

        Subscript must be an integer:floor(x)+1#0: f(t=x) -- an error.
        To debug this try debugmode(true);

The problem seems to be that indexing a list requires an integer, and
Maxima does not recognize floor(t) to be an integer. Perhaps it is right
in general sense as t can be any type other than real-valued scalar.

Any ideas how to get this kind of lookup working?

* My maxima version is "Maxima 5.13.0".

- Topi