2

I'd like to know how to plot a wave function u(x,t), which is defined on spatial domain x and temporal domain t by using wxMaxima. Please help me with the code if we set x=[-5:5], t=[0:10] and we would like the function to be plotted and moved temporally in one figure?

For example, let u(x,t)=sin(x+t).

Thank you.

  • 1
    I think maybe it would help others understand what's going on if you say more about what you're trying to accomplish. Do you mean you want a three dimensional plot? i.e. with coordinates (t, x, u(x, t)). Or you want an animated image? Or something else? – Robert Dodier Jun 01 '22 at 23:33
  • An animated image. I'd like to draw a 2-d plot, i.e x vs u(x,t) and it moves over time. – Gusrian Putra Jun 02 '22 at 23:24
  • 2
    I'd like to thank @RobertDodier and everyone who give it a try to answer my question. I just have solved the problem by using this code: with_slider_draw(t,makelist(t,t,0,1,0.1),explicit(sin(x+t),x,0,4)); – Gusrian Putra Jun 02 '22 at 23:52

0 Answers0