- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我想通过在mathematica 中绘制出一些“奇怪”的函数来研究它们。一个例子如下:
mod2[x_] := Which[Mod[x, 2] >= 1, -2 + Mod[x, 2], True, Mod[x, 2]];
f[x_] := Which[-1 <= x <= 1, Abs[x], True, Abs[mod2[x]]];
fn[x_, n_] := Sum[(3/4)^i*f[4^n*x], {i, 0, n}]
Plot[{fn[x, 0], fn[x, 1], fn[x, 2], fn[x, 5]}, {x, -2, 2}]
但是,我从 mma 得到的图具有误导性,因为 fn[x, 5]
的最大值和最小值应该在相同的两个级别上。但是由于函数的高振荡,以及显然 mma 只需要有限数量的点来绘制函数的事实,您会看到该图表现出奇怪的行为。有没有什么方案可以解决这个问题?
非常感谢。
最佳答案
您需要稍微增加 PlotPoints 的设置才能获得“好”的结果。
Plot[Evaluate[
Reverse[{fn[x, 0], fn[x, 1], fn[x, 2], fn[x, 5]}]], {x, -2, 2},
PlotPoints -> 4000]
(我也颠倒了函数的顺序,以便能够看到所有的曲线。)
关于wolfram-mathematica - 数学中的误导性情节问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5200249/
我必须通过向 td 添加一个名为 active 的类来突出显示多个单元格。此类将更改边框颜色以突出显示单元格。 这里的问题是,如果选择了特定单元格的顶部、右侧、底部和左侧单元格,那么中心单元格将看起来
我已经按照以下步骤完成: https://www.youtube.com/watch?v=88dmtleVywk&list=PLlrATfBNZ98dC-V-N3m0Go4deliWHPFwT&ind
我有三个文章标签,每个标签都有 1 个部分,我需要对其进行动画显示,即从 0px 到任何 px 的高度。每篇文章都有一个 ID 什么是最有效的方法来为每篇文章设置点击事件,而无需为每个单独的 ID 编
我试图理解以下程序的奇怪行为。很明显,在全局变量“bug”的定义过程中发生了溢出,但是程序在无辜计算1.0+2.0的过程中抛出了浮点异常。 #include #include #include
当我尝试以下错误代码时: not_float = [1, 2, 3] "{:.6f}".format(not_float) 我收到以下误导性 ValueError: ValueError: Unkno
我是一名优秀的程序员,十分优秀!