Original file(SVG file, nominally 378 × 288 pixels, file size: 34 KB)

Captions

Captions

Add a one-line explanation of what this file represents

Summary

edit
Description
Deutsch: Fit einer linearen Funktion
Date
Source Own work, Neufassung von File:Streudiagramm_Kriegsschiffe.png vom Benutzer Philipendula
Author PhysikingerC
SVG development
InfoField
 
The SVG code is valid.
 
This plot was created with Matplotlib.
Source code
InfoField

Python code

# This source code is public domain

import numpy, pylab
import matplotlib.pyplot as plt

x = [208, 152, 113, 227, 137, 238, 178, 104, 191, 130]
y = [21.6, 15.5, 10.4, 31.0, 13.0, 32.4, 19.0, 10.4, 19.0, 11.8]
N = 2
A = numpy.zeros((N,N))
for i in range(N):
    for j in range(N):
        A[i,j]=sum(xi**(i+j) for xi in x)
b = numpy.zeros((N))
for i in range(N):
    b[i]=sum(xi**(i)*yi for xi,yi in zip(x,y))
c = numpy.linalg.solve(A, b)
#print numpy.std(numpy.asarray(y)-numpy.sum([c[i]*numpy.asarray(x)**i for i in range(len(c))],axis=0))
xneu = numpy.linspace(100, 250, num=2)
yneu = numpy.sum([c[i]*xneu**i for i in range(len(c))],axis=0)

fig = plt.figure(figsize=(4.2, 3.2))
y1 = plt.plot(x,y,'o')
y2 = plt.plot(xneu,yneu,'r-')
plt.xlabel(u'x (L\u00e4nge in m)')
plt.ylabel(u'y (Breite in m)')
leg = plt.legend(('Messpunkte','Modellfunktion'),frameon=True,loc='lower right')
plt.grid(True, alpha=0.7)
plt.tight_layout()
#plt.savefig('MDKQ2.svg')

Licensing

edit
I, the copyright holder of this work, hereby publish it under the following license:
Creative Commons CC-Zero This file is made available under the Creative Commons CC0 1.0 Universal Public Domain Dedication.
The person who associated a work with this deed has dedicated the work to the public domain by waiving all of their rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law. You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current12:07, 23 May 2021Thumbnail for version as of 12:07, 23 May 2021378 × 288 (34 KB)Physikinger (talk | contribs)New Matplotlib version
22:03, 2 February 2011Thumbnail for version as of 22:03, 2 February 2011405 × 315 (47 KB)PhysikingerC (talk | contribs)Unicode ä
22:01, 2 February 2011Thumbnail for version as of 22:01, 2 February 2011405 × 315 (47 KB)PhysikingerC (talk | contribs)Beschriftung vertauscht
18:57, 2 February 2011Thumbnail for version as of 18:57, 2 February 2011405 × 315 (47 KB)PhysikingerC (talk | contribs)Falsche Datei
18:56, 2 February 2011Thumbnail for version as of 18:56, 2 February 2011405 × 315 (50 KB)PhysikingerC (talk | contribs)Falsche Datei
18:54, 2 February 2011Thumbnail for version as of 18:54, 2 February 2011405 × 315 (50 KB)PhysikingerC (talk | contribs)War abgeschnitten
18:49, 2 February 2011Thumbnail for version as of 18:49, 2 February 2011405 × 315 (47 KB)PhysikingerC (talk | contribs)Wieder Text als Kurven
18:43, 2 February 2011Thumbnail for version as of 18:43, 2 February 2011405 × 315 (44 KB)PhysikingerC (talk | contribs)Text als Text, nicht als Kurven
18:39, 2 February 2011Thumbnail for version as of 18:39, 2 February 2011405 × 315 (45 KB)PhysikingerC (talk | contribs)Text als Text, nicht als Kurven
22:29, 1 February 2011Thumbnail for version as of 22:29, 1 February 2011366 × 264 (46 KB)PhysikingerC (talk | contribs){{Information |Description ={{de|1=Fit einer linearen Funktion}} |Source ={{own}} |Author =Chrischi |Date =2011-02-01 |Permission = |other_versions = }}

There are no pages that use this file.

File usage on other wikis

The following other wikis use this file:

Metadata