如何创建带有最大值的滑块的图? [英] How to create a plot with sliders in maxima?

查看:16
本文介绍了如何创建带有最大值的滑块的图?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为了说明具有无限系列解的一阶 ode 的柯西问题,我将绘制参数化解并通过滑块控制参数值的可能性.

In order to illustrate a Cauchy problem for first order ode with infinite family of solutions, I would plot the parametrized solution and having the possility of control the value the parameter through a slider.

完整的柯西问题是y'=sqrt(|y|), y(0)=0, 参数解是y_c(x):={0, if c=>x;(x-c)^2/4,如果 x=>c}.
所以我会用一个滑块来绘制 y=y_c(x) 来控制 c 的值.

To be complete the Cauchy problem is y'=sqrt(|y|), y(0)=0, and the parametric solution is y_c(x):={0, if c=>x; (x-c)^2/4, if x=>c}.
So I would get a plotting of y=y_c(x) with a slider to control the value of c.

谢谢.

推荐答案

你可以使用 wxMaxima 中的 with_slider_draw 来做到这一点.

You can use with_slider_draw in wxMaxima to do this.

   Y(c,x) := if c>x then 0 else (x-c)^2/4;
   with_slider_draw(
       c, /* the name of the variable to attach to the slider */
       makelist(i,i,0,1,0.1), /* a list of values that the variable can have */
       explicit(Y(c,x), x, 0, 2) /* plot the function */
   )$

在wxMaxima中,点击图形,然后点击工具栏上的Play按钮来播放动画,或者使用工具栏上的滑块来改变c的值.

In wxMaxima, click on the graph and then click on the Play button on the toolbar to play the animation, or use the slider on the tool bar to change the value of c.

这篇关于如何创建带有最大值的滑块的图?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆