summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--.gitignore1
-rw-r--r--fiz/vaje/10/.gitignore1
-rw-r--r--fiz/vaje/10/dokument.lyx443
-rwxr-xr-xfiz/vaje/10/tab.py16
4 files changed, 351 insertions, 110 deletions
diff --git a/.gitignore b/.gitignore
index 8f583da..3ac3d4a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -8,3 +8,4 @@ core
.Rhistory
*.out
.gdb_history
+__pycache__/
diff --git a/fiz/vaje/10/.gitignore b/fiz/vaje/10/.gitignore
index 3d28b33..8c9c1c2 100644
--- a/fiz/vaje/10/.gitignore
+++ b/fiz/vaje/10/.gitignore
@@ -1,2 +1,3 @@
*.csv
+p.tsv
podatki.lyx
diff --git a/fiz/vaje/10/dokument.lyx b/fiz/vaje/10/dokument.lyx
index b0485c1..3209653 100644
--- a/fiz/vaje/10/dokument.lyx
+++ b/fiz/vaje/10/dokument.lyx
@@ -102,12 +102,12 @@ Anton Luka Šijanec
\end_layout
\begin_layout Date
-20.
+29.
marec 2023
\end_layout
\begin_layout Abstract
-Grafi in rezultati desete vaje pri predmetu
+Grafi in rezultati desete in zadnje vaje pri predmetu
\noun on
F41
\noun default
@@ -120,14 +120,14 @@ Podatki in grafi
\end_layout
\begin_layout Standard
-Izmerjena goriščna razdalja leče v prvi nalogi je
-\begin_inset Formula $\SI{0,053}{\meter}$
+Teoretični model
+\begin_inset Formula $s_{0}\left(\nu\right)$
\end_inset
-, v drugi nalogi pa
+ je
\begin_inset Formula
\[
-f=\SI{0,0511438}{\meter}\pm\SI{0,001356}{\meter}=\SI{0,0511438}{\meter}(1\pm0,026513477684489615)\text{{.}}
+s_{0}=A\frac{\omega}{\sqrt{\left(\omega^{2}+\omega_{0}^{2}\right)^{2}+4\beta^{2}\omega^{2}}}\text{{,}}
\]
\end_inset
@@ -136,6 +136,27 @@ f=\SI{0,0511438}{\meter}\pm\SI{0,001356}{\meter}=\SI{0,0511438}{\meter}(1\pm0,02
\end_layout
\begin_layout Standard
+kjer je
+\begin_inset Formula $\omega=2\pi v$
+\end_inset
+
+ oziroma, če jo izračunamo iz podatkov matematičnega nihala,
+\begin_inset Formula $\omega=\sqrt{\frac{g}{l}}$
+\end_inset
+
+.
+ Resonančna frekvenca, razbrana iz grafa — vrh, je
+\begin_inset Formula $6,5$
+\end_inset
+
+ radianov na sekundo, kar je
+\begin_inset Formula $6,5\pi2$
+\end_inset
+
+ nihajev na sekundo.
+\end_layout
+
+\begin_layout Standard
\begin_inset Float table
placement H
wide false
@@ -143,27 +164,38 @@ sideways false
status open
\begin_layout Plain Layout
-\align center
\lang english
\begin_inset Tabular
-<lyxtabular version="3" rows="6" columns="8">
+<lyxtabular version="3" rows="17" columns="4">
<features tabularvalignment="middle">
<column alignment="left" valignment="top" width="0pt">
<column alignment="left" valignment="top" width="0pt">
<column alignment="left" valignment="top" width="0pt">
<column alignment="left" valignment="top" width="0pt">
-<column alignment="left" valignment="top" width="0pt">
-<column alignment="left" valignment="top" width="0pt">
-<column alignment="left" valignment="top" width="0pt">
-<column alignment="left" valignment="top" width="0pt">
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
-Št.
- meritve
+
+\lang english
+\begin_inset Formula $l\left[\si{\meter}\right]$
+\end_inset
+
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+\begin_inset Formula $x_{0}\left[\si{\meter}\right]$
+\end_inset
+
+
\end_layout
\end_inset
@@ -174,7 +206,7 @@ status open
\begin_layout Plain Layout
\lang english
-\begin_inset Formula $a+b\left[\si{\meter}\right]$
+\begin_inset Formula $\omega$
\end_inset
@@ -182,16 +214,38 @@ status open
\end_inset
</cell>
+<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+\begin_inset Formula $\nu$
+\end_inset
+
+
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
\lang english
-\begin_inset Formula $b\left[\si{\meter}\right]$
+0,4
+\end_layout
+
\end_inset
+</cell>
+<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+\begin_layout Plain Layout
+\lang english
+0,012654
\end_layout
\end_inset
@@ -202,24 +256,42 @@ status open
\begin_layout Plain Layout
\lang english
-\begin_inset Formula $a\left[\si{\meter}\right]$
+4,952272
+\end_layout
+
\end_inset
+</cell>
+<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+\begin_layout Plain Layout
+\lang english
+0,788179
\end_layout
\end_inset
</cell>
+</row>
+<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
\lang english
-\begin_inset Formula $a^{-1}\left[\si{\per\meter}\right]$
+0,5
+\end_layout
+
\end_inset
+</cell>
+<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+\begin_layout Plain Layout
+\lang english
+0,009038
\end_layout
\end_inset
@@ -230,38 +302,64 @@ status open
\begin_layout Plain Layout
\lang english
-\begin_inset Formula $b^{-1}\left[\si{\per\meter}\right]$
+4,429447
+\end_layout
+
\end_inset
+</cell>
+<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+\begin_layout Plain Layout
+\lang english
+0,704968
\end_layout
\end_inset
</cell>
+</row>
+<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
\lang english
-\begin_inset Formula $f\left[\si{\meter}\right]$
+0,45
+\end_layout
+
\end_inset
+</cell>
+<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+\begin_layout Plain Layout
+\lang english
+0,009038
\end_layout
\end_inset
</cell>
-<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
\lang english
-\begin_inset Formula $\Delta f\left[\si{\meter}\right]$
+4,669047
+\end_layout
+
\end_inset
+</cell>
+<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+\begin_layout Plain Layout
+\lang english
+0,743102
\end_layout
\end_inset
@@ -274,7 +372,7 @@ status open
\begin_layout Plain Layout
\lang english
-0
+0,3
\end_layout
\end_inset
@@ -285,7 +383,7 @@ status open
\begin_layout Plain Layout
\lang english
-0,23
+0,025308
\end_layout
\end_inset
@@ -296,29 +394,31 @@ status open
\begin_layout Plain Layout
\lang english
-0,075
+5,718391
\end_layout
\end_inset
</cell>
-<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
+<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
\lang english
-0,155
+0,91011
\end_layout
\end_inset
</cell>
+</row>
+<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
\lang english
-6,451613
+0,35
\end_layout
\end_inset
@@ -329,7 +429,7 @@ status open
\begin_layout Plain Layout
\lang english
-13,333333
+0,019885
\end_layout
\end_inset
@@ -340,7 +440,7 @@ status open
\begin_layout Plain Layout
\lang english
-0,050543
+5,294202
\end_layout
\end_inset
@@ -351,7 +451,7 @@ status open
\begin_layout Plain Layout
\lang english
-0,0006
+0,842598
\end_layout
\end_inset
@@ -364,7 +464,7 @@ status open
\begin_layout Plain Layout
\lang english
-1
+0,25
\end_layout
\end_inset
@@ -375,18 +475,42 @@ status open
\begin_layout Plain Layout
\lang english
-0,25
+0,047
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\lang english
+6,264184
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\lang english
+0,996976
\end_layout
\end_inset
</cell>
+</row>
+<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
\lang english
-0,075
+0,24
\end_layout
\end_inset
@@ -397,7 +521,7 @@ status open
\begin_layout Plain Layout
\lang english
-0,175
+0,054231
\end_layout
\end_inset
@@ -408,18 +532,31 @@ status open
\begin_layout Plain Layout
\lang english
-5,714286
+6,393356
\end_layout
\end_inset
</cell>
+<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\lang english
+1,017534
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
\lang english
-13,333333
+0,23
\end_layout
\end_inset
@@ -430,7 +567,18 @@ status open
\begin_layout Plain Layout
\lang english
-0,0525
+0,054231
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\lang english
+6,530863
\end_layout
\end_inset
@@ -441,7 +589,7 @@ status open
\begin_layout Plain Layout
\lang english
-0,001356
+1,039419
\end_layout
\end_inset
@@ -454,18 +602,53 @@ status open
\begin_layout Plain Layout
\lang english
-2
+0,22
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\lang english
+0,054231
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\lang english
+6,677642
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\lang english
+1,06278
\end_layout
\end_inset
</cell>
+</row>
+<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
\lang english
-0,27
+0,21
\end_layout
\end_inset
@@ -476,7 +659,7 @@ status open
\begin_layout Plain Layout
\lang english
-0,068
+0,056038
\end_layout
\end_inset
@@ -487,18 +670,31 @@ status open
\begin_layout Plain Layout
\lang english
-0,202
+6,834785
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\lang english
+1,08779
\end_layout
\end_inset
</cell>
+</row>
+<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
\lang english
-4,950495
+0,2
\end_layout
\end_inset
@@ -509,7 +705,7 @@ status open
\begin_layout Plain Layout
\lang english
-14,705882
+0,047
\end_layout
\end_inset
@@ -520,7 +716,7 @@ status open
\begin_layout Plain Layout
\lang english
-0,050874
+7,003571
\end_layout
\end_inset
@@ -531,7 +727,7 @@ status open
\begin_layout Plain Layout
\lang english
-0,00027
+1,114653
\end_layout
\end_inset
@@ -544,18 +740,53 @@ status open
\begin_layout Plain Layout
\lang english
-3
+0,19
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\lang english
+0,043385
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\lang english
+7,185512
\end_layout
\end_inset
</cell>
+<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\lang english
+1,14361
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
\lang english
-0,29
+0,18
\end_layout
\end_inset
@@ -566,7 +797,7 @@ status open
\begin_layout Plain Layout
\lang english
-0,065
+0,043385
\end_layout
\end_inset
@@ -577,18 +808,31 @@ status open
\begin_layout Plain Layout
\lang english
-0,225
+7,382412
\end_layout
\end_inset
</cell>
+<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\lang english
+1,174947
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
\lang english
-4,444444
+0,17
\end_layout
\end_inset
@@ -599,7 +843,7 @@ status open
\begin_layout Plain Layout
\lang english
-15,384615
+0,036154
\end_layout
\end_inset
@@ -610,7 +854,7 @@ status open
\begin_layout Plain Layout
\lang english
-0,050431
+7,596439
\end_layout
\end_inset
@@ -621,64 +865,66 @@ status open
\begin_layout Plain Layout
\lang english
-0,000713
+1,209011
\end_layout
\end_inset
</cell>
</row>
<row>
-<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
\lang english
-4
+0,16
\end_layout
\end_inset
</cell>
-<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
\lang english
-0,31
+0,032538
\end_layout
\end_inset
</cell>
-<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
\lang english
-0,065
+7,83023
\end_layout
\end_inset
</cell>
-<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
\lang english
-0,245
+1,24622
\end_layout
\end_inset
</cell>
+</row>
+<row>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
\lang english
-4,081633
+0,15
\end_layout
\end_inset
@@ -689,7 +935,7 @@ status open
\begin_layout Plain Layout
\lang english
-15,384615
+0,036154
\end_layout
\end_inset
@@ -700,7 +946,7 @@ status open
\begin_layout Plain Layout
\lang english
-0,051371
+8,087027
\end_layout
\end_inset
@@ -711,7 +957,7 @@ status open
\begin_layout Plain Layout
\lang english
-0,000227
+1,28709
\end_layout
\end_inset
@@ -722,12 +968,14 @@ status open
\end_inset
-\lang slovene
+\end_layout
+\begin_layout Plain Layout
+\align center
\begin_inset Caption Standard
\begin_layout Plain Layout
-Meritve tenkega upornika
+Izmerjeni in izračunani podatki
\end_layout
\end_inset
@@ -762,8 +1010,15 @@ begin{tikzpicture}
\backslash
begin{axis}[width=0.75
\backslash
-textwidth, scale only axis, ylabel=$b$, domain=0:.4, ytick pos=left, samples=256,
- xlabel=$a$, xtick pos=bottom, xmin=0, xmax=.4, ymin=-.1, ymax=.2, %grid=both
+textwidth, scale only axis, ylabel=$s_0$, domain=0:12, ytick pos=left, samples=2
+56, xlabel=$
+\backslash
+omega$, xtick pos=bottom, xmin=0, xmax=12, ymin=0, ymax=.06,
+\end_layout
+
+\begin_layout Plain Layout
+
+%grid=both
\end_layout
\begin_layout Plain Layout
@@ -775,7 +1030,7 @@ textwidth, scale only axis, ylabel=$b$, domain=0:.4, ytick pos=left, samples=256
\backslash
-addplot[only marks] table [x=a, y=b, col sep=comma] {podatki.csv};
+addplot[only marks] table [x=omega, y=x, col sep=comma] {podatki.csv};
\end_layout
\begin_layout Plain Layout
@@ -789,14 +1044,14 @@ addlegendentry{meritve}
\backslash
-addplot[blue] (x, {1/(1/0.0511438-1/x)});
+addplot[blue] (x, {0.490752637*x/sqrt((x^2+6.6^2)^2+4*(-0.000179148908)^2*x^2)});
\end_layout
\begin_layout Plain Layout
\backslash
-addlegendentry{$b=(f^{-1}-a^{-1})^{-1}$}
+addlegendentry{Teoretični model}
\end_layout
\begin_layout Plain Layout
@@ -870,7 +1125,7 @@ end{axis}
\begin_layout Plain Layout
-
+%
\backslash
begin{axis}[width=0.75
\backslash
@@ -880,23 +1135,23 @@ textwidth, scale only axis, ylabel=$b^{-1}$, ytick pos=right, samples=256,
\begin_layout Plain Layout
-, xlabel near ticks, ylabel near ticks, major grid style={dashed,red},
+%, xlabel near ticks, ylabel near ticks, major grid style={dashed,red},
\end_layout
\begin_layout Plain Layout
-legend style={at={(0.975,0.325)}, anchor=south east}, domain=4:7, xmin=4,
+%legend style={at={(0.975,0.325)}, anchor=south east}, domain=4:7, xmin=4,
xmax=6.6, ymin=13, ymax=15.6
\end_layout
\begin_layout Plain Layout
-]
+%]
\end_layout
\begin_layout Plain Layout
-
+%
\backslash
addplot[mark=triangle*, red, only marks] table [x=1/a, y=1/b, col sep=comma]
{podatki.csv};
@@ -904,28 +1159,28 @@ addplot[mark=triangle*, red, only marks] table [x=1/a, y=1/b, col sep=comma]
\begin_layout Plain Layout
-
+%
\backslash
addlegendentry{meritve}
\end_layout
\begin_layout Plain Layout
-
+%
\backslash
addplot[red] (x, {1/0.0511438-x});
\end_layout
\begin_layout Plain Layout
-
+%
\backslash
addlegendentry{$b^{-1}=f^{-1}-a^{-1}$}
\end_layout
\begin_layout Plain Layout
-
+%
\backslash
end{axis}
\end_layout
@@ -953,11 +1208,7 @@ name "fig:graf-1"
\end_inset
-\begin_inset Formula $b(a)$
-\end_inset
-
- in
-\begin_inset Formula $b^{-1}(a^{-1})$
+\begin_inset Formula $s_{0}\left(\omega\right)$
\end_inset
@@ -974,21 +1225,7 @@ name "fig:graf-1"
\end_layout
\begin_layout Standard
-\begin_inset Formula $f$
-\end_inset
-
- je obratna vrednost neničelne komponente točke presečišča med bodisi ordinatno
- bodisi abscisno osjo in premico
-\begin_inset Formula $b^{-1}=f^{-1}-a^{-1}$
-\end_inset
-
-.
- Kakršno koli odčitavanje iz strojno generiranega grafa ni smiselno, saj
- je bila
-\begin_inset Formula $f^{-1}$
-\end_inset
-
- v osnovi uporabljena za konstruiranje premice.
+Meritve se ne ujemajo z napovedano vrednostjo.
\end_layout
\end_body
diff --git a/fiz/vaje/10/tab.py b/fiz/vaje/10/tab.py
index cb70e75..c5c24db 100755
--- a/fiz/vaje/10/tab.py
+++ b/fiz/vaje/10/tab.py
@@ -3,10 +3,12 @@ import pandas
import sys
from math import pi
l = 23.5
-b=pandas.read_csv("/dev/stdin", sep="\t")
-b.index.name = "idx"
-b["x"] = (b["y"]/13*l)
-b["omega"] = ((9.81/b["l"])**(1/2))
-b["f"] = (b["omega"]*0.5/pi)
-b = b.astype(float).round(6);
-b.to_csv("/dev/stdout", sep=sys.argv[1][0]);
+df = pandas.read_csv("podatki.tsv", sep="\t")
+df.index.name = "idx"
+df["x"] = (df["y"]/13*l)
+df["omega"] = ((9.81/df["l"])**(1/2))
+df["f"] = (df["omega"]*0.5/pi)
+df = df.astype(float).round(6);
+data = df.values
+if __name__ == "__main__":
+ df.to_csv("/dev/stdout", sep=",");