Plots data points and the fitting polynomial using Python,plotspolynomial,''' plotPoly
文章由Byrx.net分享于2019-03-23 07:03:44
Plots data points and the fitting polynomial using Python,plotspolynomial,''' plotPoly
''' plotPoly(xData,yData,coeff) Plots data points and the fitting polynomial defined by its coefficient array {coeff} = {a0, a1. ...}''' from numpy import zeros,arangefrom xyPlot import *def plotPoly(xData,yData,coeff): m = len(coeff) x1 = min(xData) x2 = max(xData) dx = (x2 - x1)/20.0 x = arange(x1,x2 + dx/10.0,dx) y = zeros((len(x)))*1.0 for i in range(m): y = y + coeff[i]*x**i xyPlot(xData,yData,'no',x,y,'ln')
相关内容
- 使用Python读取和写入mp3文件的id3v1信息,pythonid3v1,#enc
- python解《十滴水》游戏算法,python《十滴水》,# -*- co
- 根据指定规则检查日志,指定规则检查日志,#! /usr/loc
- python程序发送email的代码,python发送email,#account set
- python使用utf-8编码编写代码,pythonutf-8,# -*- coding
- lambda函数不命名实现匿名递归,lambda函数匿名递归,(l
- Python LU 分解,pythonlu分解,''' a = LUde
- 从烈火网下载ip代理,烈火ip代理,该代码可运行在wind
- python urllib从远程服务器下载文件到本地,,#!/usr/bin/e
- python快速入门教程,python入门教程,假设我们有这么一项
评论关闭