File:MDKQ 3D.svg
Original file (SVG file, nominally 405 × 374 pixels, file size: 64 KB)
Captions
Summary
[edit]DescriptionMDKQ 3D.svg |
Deutsch: Fit einer 2D-Funktion |
Date | |
Source | Own work |
Author | Christian Schirm |
Quellen InfoField | Skript zur Bildgenerierung Erzeugungsskript, um die Grafik zu erstellen |
Anleitung InfoField | Benötigte Open-Source-Software:
Nach der Installation von Python den Quelltext in eine Datei mdkq.py kopieren und starten durch Doppelklicken oder in der Konsole durch Eingabe von python mdkq.py |
SVG development InfoField | This plot was created with Matplotlib. |
Source code InfoField | Python codefrom mpl_toolkits.mplot3d import axes3d
import matplotlib.pyplot as plt
import numpy
numpy.random.seed(3)
nMess = 18
x0 = numpy.random.rand(nMess)
x0 = x0-min(x0); x0 *= 10 / max(x0)
x1 = numpy.random.rand(nMess)*10
x1 = x1-min(x1); x1 *= 10 / max(x1)
y = numpy.random.randn(nMess)*10
x = numpy.array(list(zip(x0,x1)))
def base(x0, x1, n):
return numpy.array([x0**i0.ravel() * x1**i1.ravel() for i0, i1 in numpy.mgrid[:n,:n].reshape(2,n*n).T]).T
nBasisProAchse = 3
A = base(x0, x1, nBasisProAchse)
c = numpy.linalg.inv(A.T @ A) @ A.T @ y
yModell = A @ c
x0neu, x1neu = numpy.meshgrid(numpy.linspace(0, 10, num=20), numpy.linspace(0, 10, num=20))
yneu = base(x0neu, x1neu, nBasisProAchse) @ c
fig = plt.figure(figsize=(4.5,4.5))
ax = fig.add_subplot(111, projection='3d')
p2 = ax.plot_wireframe(x1neu, x0neu, yneu, color='r', rstride=1, cstride=1, label='Modellfunktion', linewidth=1, zorder=0)
p1 = ax.scatter(x0, x1, y, label='Messpunkte', zorder=2)
for i in range(len(y)):
ax.plot([x0[i]]*2, [x1[i]]*2, [y[i], yModell[i]], color='#60c060', linewidth=1.5, label='Residuum' if i==0 else None, zorder=1)
lx0 = ax.set_xlabel('x1')
lx1 = ax.set_ylabel('x2')
ly = ax.set_zlabel('y')
leg = plt.legend(frameon=True)
plt.tight_layout()
plt.show()
plt.savefig('MDKQ_3D.svg')
|
Licensing
[edit]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.
http://creativecommons.org/publicdomain/zero/1.0/deed.enCC0Creative Commons Zero, Public Domain Dedicationfalsefalse |
File history
Click on a date/time to view the file as it appeared at that time.
Date/Time | Thumbnail | Dimensions | User | Comment | |
---|---|---|---|---|---|
current | 12:22, 23 May 2021 | 405 × 374 (64 KB) | Physikinger (talk | contribs) | Legend order | |
12:05, 23 May 2021 | 405 × 374 (64 KB) | Physikinger (talk | contribs) | New Matplotlib version | ||
21:17, 7 April 2011 | 381 × 353 (183 KB) | PhysikingerC (talk | contribs) | border | ||
21:15, 7 April 2011 | 412 × 381 (183 KB) | PhysikingerC (talk | contribs) | border | ||
21:05, 7 April 2011 | 366 × 337 (182 KB) | PhysikingerC (talk | contribs) | background | ||
21:02, 7 April 2011 | 359 × 336 (182 KB) | PhysikingerC (talk | contribs) | white Background | ||
20:59, 7 April 2011 | 359 × 336 (182 KB) | PhysikingerC (talk | contribs) | == Summary == {{Information |Description ={{de|1=Fit einer 2D-Funktion}} |Source ={{own}} |Author =Chrischi |Date =2011-04-07 |Permission = |other_versions = }} |
You cannot overwrite this file.
File usage on Commons
The following page uses this file:
File usage on other wikis
The following other wikis use this file:
- Usage on de.wikipedia.org
Metadata
This file contains additional information such as Exif metadata which may have been added by the digital camera, scanner, or software program used to create or digitize it. If the file has been modified from its original state, some details such as the timestamp may not fully reflect those of the original file. The timestamp is only as accurate as the clock in the camera, and it may be completely wrong.
Width | 324pt |
---|---|
Height | 298.8pt |