\[Tau][l_]:=Sqrt[2*l/(3*9.81)] findphi[\[Phi]0_,\[CapitalDelta]t_,l_]:=Module[{\[Phi]=\[Phi]0,\[Omega],a=0,\[Omega]0=0,phi0=\[Phi]0,list={{0,\[Phi]0}}}, While[\[Phi] {"Zeit t","Winkel \[Phi](t)"},PlotLabel->Style["Bewegung des kippenden Besenstiels",Bold,Red,Underlined], AxesStyle -> Arrowheads[{0.0, 0.02}]]] fallzeit[l_,\[CapitalDelta]t_]:=Module[{start,tab}, tab=Table[{N[start],First[Last[findphi[start,\[CapitalDelta]t,l]]]},{start,Pi/30,Pi/2,Pi/300}]; ListPlot[tab,PlotStyle->PointSize[Small],AxesLabel-> {"\!\(\*SubscriptBox[\(\[Phi]\), \(0\)]\) in rad","Fallzeit(\!\(\*SubscriptBox[\(\[Phi]\), \(0\)]\))"},PlotLabel->Style["Abhängigkeit der Fallzeit vom Startwinkel \!\(\*SubscriptBox[\(\[Phi]\), \(0\)]\)",Bold,Red,Underlined], AxesStyle -> Arrowheads[{0.0, 0.02}],PlotLegends->"Expressions"]] (*Test von findphi.*) h = findphi[0.25, 0.01, 1.45] findphiPlot[0.25, 0.01, 1.45] (*Vergleich von NDSolve mit unserer Numerischen Berechnung.*) g = NDSolve[{\[Phi]''[t] == Sin[\[Phi][t]]*(3*9.81)/(2*1.45), \[Phi][0] == 0.25, \[Phi]'[0] == 0}, \[Phi][t], {t, 0, First[Last[h]]}]; Plot[Evaluate[\[Phi][t] /. g], {t, 0, First[Last[h]]}, Epilog -> {PointSize[Small], Red, Point[h]}, AxesLabel -> {"Zeit t", "Winkel \[Phi](t)"}, PlotLabel -> Style["Bewegung des kippenden Besenstiels", Bold, Red, Underlined], AxesStyle -> Arrowheads[{0.0, 0.02}]] (*Test von Fallzeit.*) fallzeit[1.45, 0.001] (*Periodisch:*) findphi2[\[Phi]0_,\[CapitalDelta]t_,l_,time_]:=Module[{\[Phi]=\[Phi]0,\[Omega],a=0,\[Omega]0=0,phi0=\[Phi]0,list={{0,\[Phi]0}}}, While[a<= time, \[Omega]=\[Omega]0+\[CapitalDelta]t*Sin[phi0]/\[Tau][l]^2; \[Phi]=phi0+\[CapitalDelta]t*\[Omega]; a=a+\[CapitalDelta]t; list=Append[list,{a,\[Phi]}]; \[Omega]0=\[Omega]; phi0=\[Phi]]; list ]; ListPlot[findphi2[0.25, 0.01, 1.45, 8]] fallzeit2[l_,\[CapitalDelta]t_]:=Module[{start,tab,list={}}, tab=Table[Table[{N[start],First[Last[findphi[start,\[CapitalDelta]t,laenge]]]},{start,Pi/30,Pi/2,Pi/300}],{laenge,l}]; ListPlot[tab,PlotStyle->PointSize[Small],AxesLabel-> {"\!\(\*SubscriptBox[\(\[Phi]\), \(0\)]\) in rad","Fallzeit(\!\(\*SubscriptBox[\(\[Phi]\), \(0\)]\))"},PlotLabel->Style["Abhängigkeit der Fallzeit vom Startwinkel \!\(\*SubscriptBox[\(\[Phi]\), \(0\)]\)",Bold,Red,Underlined], AxesStyle -> Arrowheads[{0.0, 0.02}],PlotLegends->Placed[PointLegend[Automatic,{"197.4cm","150.3cm"},LegendFunction->"Frame"],{0.8,0.75}],PlotLegends->Placed[PointLegend[{Red,Blue,Orange},{"197.4cm","150.3cm"},LegendFunction->"Frame"],{0.9,0.75}]]] (*fallzeit2[Range[0.01,4.1,0.1],0.001]*) fallzeit2[{1.974, 1.503}, 0.001] (*Importieren der experimentell bestimmten Werte von den aus QTI exportierten Tabellen.*) dir = NotebookDirectory[]; data1 = Import[FileNameJoin[{dir, "Tab_197cm.csv"}], "TextDelimiter" -> ","]; cleanData1 = Table[data1[[i, {4, 11}]], {i, 1, Length[data1]}] data2 = Import[FileNameJoin[{dir, "Tab_150cm.csv"}], "TextDelimiter" -> ","]; cleanData2 = Table[data2[[i, {4, 11}]], {i, 1, Length[data2]}] data3 = Import[FileNameJoin[{dir, "Tab_197cmSP.csv"}], "TextDelimiter" -> ","]; cleanData3 = Table[data3[[i, {4, 11}]], {i, 1, Length[data3]}] fallzeit3[l_, \[CapitalDelta]t_] := Module[{start, tab, list = {}}, tab = Table[ Table[{N[start], First[Last[findphi[start, \[CapitalDelta]t, laenge]]]}, {start, Pi/30, Pi/2, Pi/300}], {laenge, l}]; tab = Append[Append[Append[tab, cleanData1], cleanData2], cleanData3]; ListPlot[tab, PlotStyle -> {PointSize[Small], PointSize[Small], PointSize[Medium], PointSize[Medium], PointSize[Medium]}, AxesLabel -> {"\!\(\*SubscriptBox[\(\[Phi]\), \(0\)]\) in rad", "Fallzeit(\!\(\*SubscriptBox[\(\[Phi]\), \(0\)]\))"}, PlotLabel -> Style["Abhängigkeit der Fallzeit vom Startwinkel \!\(\*SubscriptBox[\(\ \[Phi]\), \(0\)]\)", Bold, Red, Underlined], AxesStyle -> Arrowheads[{0.0, 0.02}], PlotLegends -> Placed[PointLegend[ Automatic, {"Num.: 197.4cm", "Num.: 150.3cm", "Messung 1", "Messung 2", "Messung 3"}, LegendFunction -> "Frame"], {0.8, 0.75}], ImageSize -> Large]] fallzeit3[{1.974, 1.503}, 0.001] Export[FileNameJoin[{dir, "VergleichTheorieundPraxisMathematica.png"}], %] data4 = Import[FileNameJoin[{dir, "Tab_140cmPappe.csv"}], "TextDelimiter" -> ","]; cleanData4 = Table[data4[[i, {4, 11}]], {i, 1, Length[data4]}] fallzeit4[l_, \[CapitalDelta]t_] := Module[{start, tab, list = {}}, tab = Table[ Table[{N[start], First[Last[findphi[start, \[CapitalDelta]t, laenge]]]}, {start, Pi/30, Pi/2, Pi/300}], {laenge, l}]; tab = Append[tab, cleanData4]; ListPlot[tab, PlotStyle -> {PointSize[Small], PointSize[Medium]}, AxesLabel -> {"\!\(\*SubscriptBox[\(\[Phi]\), \(0\)]\) in rad", "Fallzeit(\!\(\*SubscriptBox[\(\[Phi]\), \(0\)]\))"}, PlotLabel -> Style["Abhängigkeit der Fallzeit vom Startwinkel \!\(\*SubscriptBox[\(\ \[Phi]\), \(0\)]\)", Bold, Red, Underlined], AxesStyle -> Arrowheads[{0.0, 0.02}], PlotLegends -> Placed[PointLegend[Automatic, {"Num.: 140cm", "Messung 4"}, LegendFunction -> "Frame"], {0.8, 0.75}], ImageSize -> Large]] fallzeit4[{1.40}, 0.001] (*Export[FileNameJoin[{dir,"VergleichTheorieundPraxisMathematica140.png"}],%]*) (* genaue Ausgabe der theoretische Werte fuer die experimentell verwendeten \ Winkel *) Table[{cleanData1[[i]], First[Last[findphi[cleanData1[[i, 1]], 0.001, 1.974]]]}, {i, 1, Length[cleanData1]}] Table[{cleanData2[[i]], First[Last[findphi[cleanData2[[i, 1]], 0.001, 1.503]]]}, {i, 1, Length[cleanData2]}] Table[{cleanData3[[i]], First[Last[findphi[cleanData3[[i, 1]], 0.001, 1.974]]]}, {i, 1, Length[cleanData3]}] Table[{cleanData4[[i]], First[Last[findphi[cleanData4[[i, 1]], 0.001, 1.400]]]}, {i, 1, Length[cleanData4]}] Export[FileNameJoin[{dir, "TheorieWerte197.csv"}], Table[{N[start], First[Last[findphi[start, 0.001, 1.197]]]}, {start, Pi/30, Pi/2, Pi/300}], "TextDelimiter" -> ";"]; Export[FileNameJoin[{dir, "TheorieWerte150.csv"}], Table[{N[start], First[Last[findphi[start, 0.001, 1.530]]]}, {start, Pi/30, Pi/2, Pi/300}], "TextDelimiter" -> ";"]; Export[FileNameJoin[{dir, "TheorieWerte140.csv"}], Table[{N[start], First[Last[findphi[start, 0.001, 1.400]]]}, {start, Pi/30, Pi/2, Pi/300}], "TextDelimiter" -> ";"];