#### 92.1.13 undefined variable (draw or plot)

A function could not be plotted since it still contained a variable maxima doesn’t know the value of.

In order to find out which variable this could be it is sometimes helpful to temporarily replace the name of the drawing command (`draw2d`, `plot2d` or similar) by a random name (for example `ddraw2d`) that doesn’t coincide with the name of an existing function to make maxima print out what parameters the drawing command sees.

    (%i1) load("draw")$
    (%i2) f(x):=sin(omega*t);
    (%o2) f(x) := sin(omega t)
    (%i3) draw2d(
            explicit(
              f(x),
              x,1,10
            )
          );
    draw2d (explicit): non defined variable
     -- an error. To debug this try: debugmode(true);
    (%i4) ddraw2d(
            explicit(
              f(x),
              x,1,10
            )
          );
    (%o4) ddraw2d(explicit(sin(omega t), x, 1, 10))

·

Categories: Error messages