SciPy.jl logo
SciPy.jl
  • Home
  • Tips
  • Examples
    • cluster
    • constants
    • fft
    • interpolate
    • io
    • linalg
    • ndimage
    • odr
      • polynomial
    • optimize
    • signal
    • sparse
    • spatial
    • special
    • stats
  • API References
Version
  • Examples
  • odr
  • odr
Edit on GitHub

scipy.odr

scipy.odr module

  • Orthogonal distance regression (scipy.odr) Reference Guide

polynomial

  • scipy.odr.polynomial Reference Guide
x = collect(0.0:0.1:5.0)
y = sin.(x)
poly_model = odr.polynomial(3)  # using third order polynomial model
data = odr.Data(x, y)
odr_obj = odr.ODR(data, poly_model)
output = odr_obj.run()  # running ODR fitting
a = output.beta
y_odr = a[4].*x.^3+a[3].*x.^2+a[2].*x.^1 .+ a[1]
plt.plot(x, y, label="input data")
plt.plot(x, y_odr, label="polynomial ODR")#
plt.legend()

« ndimageoptimize »

Powered by Documenter.jl and the Julia Programming Language.

Settings


This document was generated with Documenter.jl version 0.27.23 on Sunday 4 December 2022. Using Julia version 1.8.3.