在Mathematica中绘制最佳曲线
Plotting best curved line in Mathematica
请您提供帮助。我目前正在尝试为我生成的一组点绘制最佳曲线(可能是指数曲线、对数曲线、双曲线曲线等)。到目前为止,我一直在使用这种类型的代码:
Show[ListPlot[
L, {PlotRange -> {{0, 3}, {0, 50}}, PlotStyle -> {PointSize[Tiny]},
Frame -> True,
FrameStyle -> Directive[Thickness -> Tiny, FontSize -> 12],
AspectRatio -> 0.8, GridLines -> Automatic, Joined -> {False},
TicksStyle -> Directive[1]}]]
我知道如果我将连接 -> 更改为 "True" 我会得到一条连接点的线,但是我希望最好的曲线不是连接点的线。
谢谢!
在 Mathematica 中有多种方法可以做到这一点。例如,您可以使用 Interpolation
function or ListInterpolation
. Also as mentioned, you can use model fitting functions such as LinearModelFit
, GeneralizedLinearModelFit
or NonlinearModelFit
.
有关详细信息,请参阅链接文档。
请您提供帮助。我目前正在尝试为我生成的一组点绘制最佳曲线(可能是指数曲线、对数曲线、双曲线曲线等)。到目前为止,我一直在使用这种类型的代码:
Show[ListPlot[
L, {PlotRange -> {{0, 3}, {0, 50}}, PlotStyle -> {PointSize[Tiny]},
Frame -> True,
FrameStyle -> Directive[Thickness -> Tiny, FontSize -> 12],
AspectRatio -> 0.8, GridLines -> Automatic, Joined -> {False},
TicksStyle -> Directive[1]}]]
我知道如果我将连接 -> 更改为 "True" 我会得到一条连接点的线,但是我希望最好的曲线不是连接点的线。
谢谢!
在 Mathematica 中有多种方法可以做到这一点。例如,您可以使用 Interpolation
function or ListInterpolation
. Also as LinearModelFit
, GeneralizedLinearModelFit
or NonlinearModelFit
.
有关详细信息,请参阅链接文档。