我想用MATLAB写一个脚本,计算函数x^2在x=2和h处的导数(f(x+h)-f(x))/h的商,从1开始,递减10倍,书中说,当h变小(小于10^-12)时,舍入误差的影响变得明显。
然后我写了以下代码:
for i=0:-2:-16
h=10^i;
((2+h)^2-(2)^2)./h
end
那么我的问题是,我如何改进我的代码?因为它确实给了我一个错误,说导数的最后一个近似值是零。
在此之前,非常感谢:)
Unable to instantiate appComponentFactory
java.lang.ClassNotFoundException: Didn't find class "android.support.v4.app.CoreComponentFactory" on path: DexPathList[[zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file "/data/app/com.mozi.robot-A4pYuce1Ys4CT
当我运行python -m build时,创建的tar和whl文件在文件名中使用了错误的包版本。
这是我的setup.cfg
[metadata]
# This is required for any package to install with a name
name = stockpyl
# Since we are using a "src" layout, we need the following:
[options]
package_dir=
=src
packages=find:
[options.packages.find]
where=src
[