(* Content-type: application/vnd.wolfram.cdf.text *) (*** Wolfram CDF File ***) (* http://www.wolfram.com/cdf *) (* CreatedBy='Mathematica 11.2' *) (***************************************************************************) (* *) (* *) (* Under the Wolfram FreeCDF terms of use, this file and its content are *) (* bound by the Creative Commons BY-SA Attribution-ShareAlike license. *) (* *) (* For additional information concerning CDF licensing, see: *) (* *) (* www.wolfram.com/cdf/adopting-cdf/licensing-options.html *) (* *) (* *) (***************************************************************************) (*CacheID: 234*) (* Internal cache information: NotebookFileLineBreakTest NotebookFileLineBreakTest NotebookDataPosition[ 1088, 20] NotebookDataLength[ 14621, 335] NotebookOptionsPosition[ 15101, 331] NotebookOutlinePosition[ 15449, 346] CellTagsIndexPosition[ 15406, 343] WindowFrame->Normal*) (* Beginning of Notebook Content *) Notebook[{ Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"\[IndentingNewLine]", RowBox[{"Manipulate", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"xf", "=", "1"}], ";", RowBox[{"(*", RowBox[{"x", "-", RowBox[{ "ov\[AAcute]", " ", "sou\[RHacek]adnice", " ", "\"\\"", " ", "druh\[EAcute]ho", " ", RowBox[{"grafu", "."}]}]}], "*)"}], "\[IndentingNewLine]", RowBox[{"xfmin", "=", "0"}], ";", "\[IndentingNewLine]", RowBox[{"xfmax", "=", "2"}], ";", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"n0", "=", "1"}], ";", "\[IndentingNewLine]", RowBox[{"nmin", "=", "1"}], ";", "\[IndentingNewLine]", RowBox[{"nmax", "=", "20"}], ";", "\[IndentingNewLine]", RowBox[{"deltan", "=", "1"}], ";", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"p0", "=", "1"}], ";", "\[IndentingNewLine]", RowBox[{"pmin", "=", "0.1"}], ";", "\[IndentingNewLine]", RowBox[{"pmax", "=", "1"}], ";", "\[IndentingNewLine]", RowBox[{"deltap", "=", "0.1"}], ";", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"barva", "=", "Black"}], ";", "\[IndentingNewLine]", RowBox[{"barva1", "=", "Blue"}], ";", "\[IndentingNewLine]", RowBox[{"barva2", "=", "Green"}], ";", "\[IndentingNewLine]", RowBox[{"barva3", "=", "Red"}], ";", "\[IndentingNewLine]", RowBox[{"barvaf", "=", "Black"}], ";", "\[IndentingNewLine]", RowBox[{"tloustka", "=", "0.003"}], ";", "\[IndentingNewLine]", RowBox[{"velikostpisma", "=", "20"}], ";", "\[IndentingNewLine]", RowBox[{"velikostbodu", "=", "0.05"}], ";", "\[IndentingNewLine]", RowBox[{"velikostobrazku", "=", "500"}], ";", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"frekvence", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"{", RowBox[{"xf", ",", RowBox[{"i", " ", "p"}]}], "}"}], ",", RowBox[{"{", RowBox[{"i", ",", "nmin", ",", "nzadane", ",", "1"}], "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"Grid", "[", RowBox[{"{", RowBox[{"{", "\[IndentingNewLine]", RowBox[{ RowBox[{"Plot", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{ FractionBox["1", "nzadane"], RowBox[{"Sum", "[", RowBox[{ RowBox[{"Cos", "[", RowBox[{"n", " ", "p", " ", "x"}], "]"}], ",", RowBox[{"{", RowBox[{"n", ",", "1", ",", "nzadane"}], "}"}]}], "]"}]}], ",", RowBox[{ FractionBox["1", "nzadane"], RowBox[{"Sum", "[", RowBox[{ RowBox[{"Sin", "[", RowBox[{"n", " ", "p", " ", "x"}], "]"}], ",", RowBox[{"{", RowBox[{"n", ",", "1", ",", "nzadane"}], "}"}]}], "]"}]}], ",", RowBox[{ FractionBox["1", SuperscriptBox["nzadane", "2"]], RowBox[{"(", RowBox[{ SuperscriptBox[ RowBox[{"Sum", "[", RowBox[{ RowBox[{"Cos", "[", RowBox[{"n", " ", "p", " ", "x"}], "]"}], ",", RowBox[{"{", RowBox[{"n", ",", "1", ",", "nzadane"}], "}"}]}], "]"}], "2"], "+", SuperscriptBox[ RowBox[{"Sum", "[", RowBox[{ RowBox[{"Sin", "[", RowBox[{"n", " ", "p", " ", "x"}], "]"}], ",", RowBox[{"{", RowBox[{"n", ",", "1", ",", "nzadane"}], "}"}]}], "]"}], "2"]}], ")"}]}]}], "}"}], ",", RowBox[{"{", RowBox[{"x", ",", RowBox[{"-", "20"}], ",", "20"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"barva1", ",", RowBox[{"Thickness", "[", "tloustka", "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{"barva2", ",", RowBox[{"Thickness", "[", "tloustka", "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{"barva3", ",", RowBox[{"Thickness", "[", "tloustka", "]"}]}], "}"}]}], "}"}]}], ",", "\[IndentingNewLine]", RowBox[{"AxesLabel", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"Style", "[", RowBox[{ "\"\<\!\(\*StyleBox[\"x\",FontSlant->\"Italic\"]\)\>\"", ",", "velikostpisma", ",", "barva"}], "]"}], ",", RowBox[{"Style", "[", RowBox[{ "\"\\"", ",", "velikostpisma", ",", "barva"}], "]"}]}], "}"}]}], ",", "\[IndentingNewLine]", RowBox[{"PlotRange", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"-", "1"}], ",", "1"}], "}"}]}], ",", "\[IndentingNewLine]", RowBox[{"ImageSize", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"1.5", " ", "velikostobrazku"}], ",", "velikostobrazku"}], "}"}]}]}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"ListPlot", "[", RowBox[{"frekvence", ",", "\[IndentingNewLine]", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"Directive", "[", RowBox[{"barvaf", ",", RowBox[{"PointSize", "[", "velikostbodu", "]"}]}], "]"}]}], ",", "\[IndentingNewLine]", RowBox[{"AxesLabel", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"Style", "[", RowBox[{"\"\\"", ",", "velikostpisma", ",", "barva"}], "]"}], ",", RowBox[{"Style", "[", RowBox[{"\"\\"", ",", "velikostpisma", ",", "barva"}], "]"}]}], "}"}]}], ",", "\[IndentingNewLine]", RowBox[{"AspectRatio", "\[Rule]", "2"}], ",", "\[IndentingNewLine]", RowBox[{"PlotRange", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"xfmin", ",", "xfmax"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", RowBox[{"nmax", "+", "1"}]}], "}"}]}], "}"}]}], ",", "\[IndentingNewLine]", RowBox[{"ImageSize", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"0.5", " ", "velikostobrazku"}], ",", "velikostobrazku"}], "}"}]}]}], "]"}]}], "\[IndentingNewLine]", "}"}], "}"}], "]"}]}], ",", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"nzadane", ",", "n0", ",", RowBox[{"Style", "[", RowBox[{ "\"\<\!\(\*StyleBox[\"n\",FontSlant->\"Italic\"]\)\>\"", ",", "velikostpisma", ",", "barva", ",", RowBox[{"FontFamily", "\[Rule]", "Times"}]}], "]"}]}], "}"}], ",", "nmin", ",", "nmax", ",", "deltan"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"p", ",", "p0", ",", RowBox[{"Style", "[", RowBox[{ "\"\<\!\(\*StyleBox[\"p\",FontSlant->\"Italic\"]\)\>\"", ",", "velikostpisma", ",", "barva", ",", RowBox[{"FontFamily", "\[Rule]", "Times"}]}], "]"}]}], "}"}], ",", "pmin", ",", "pmax", ",", "deltap"}], "}"}]}], "]"}]}]], "Input", CellOpen->False, CellChangeTimes->CompressedData[" 1:eJxTTMoPSmViYGAQBmIQvYpR4eqy068dv6wTugWilzkevA+irV6EPATRHeul n4PoBf58/0F0mrEc83IgLVZnxweiV/+ZIwWib82S0QHRLv96DUB0gvlSIxCt KW7iAqLvrjvhB6Jf6B6OBtE2H6vKQDTLysZaEF1Ucg9Md3150gSiv81i6ATR x5hv7Qabz7DyGojOSs24A6L1Pl/6CqLnRh78DaJXZWkxrQDShxZKs4FoYSk9 MD19ZVz5IyAdVfu8DkT7+2U2g2ijvzlguoGlrAdEq8uvBtNeKXOngWj7yXFz QLSW05a9H4H0hf2u+0A0AMIvsTE= "],ExpressionUUID->"c1299892-1532-4752-b2c3-cf4bd2d2cca2"], Cell[BoxData[ TagBox[ StyleBox[ DynamicModuleBox[{$CellContext`nzadane$$ = 1, $CellContext`p$$ = 1, Typeset`show$$ = True, Typeset`bookmarkList$$ = {}, Typeset`bookmarkMode$$ = "Menu", Typeset`animator$$, Typeset`animvar$$ = 1, Typeset`name$$ = "\"untitled\"", Typeset`specs$$ = {{{ Hold[$CellContext`nzadane$$], 1, Style["\!\(\*StyleBox[\"n\",FontSlant->\"Italic\"]\)", 20, GrayLevel[0], FontFamily -> Times]}, 1, 20, 1}, {{ Hold[$CellContext`p$$], 1, Style["\!\(\*StyleBox[\"p\",FontSlant->\"Italic\"]\)", 20, GrayLevel[0], FontFamily -> Times]}, 0.1, 1, 0.1}}, Typeset`size$$ = { 1009., {247., 253.}}, Typeset`update$$ = 0, Typeset`initDone$$, Typeset`skipInitDone$$ = True, $CellContext`nzadane$194264$$ = 0, $CellContext`p$194265$$ = 0}, DynamicBox[Manipulate`ManipulateBoxes[ 1, StandardForm, "Variables" :> {$CellContext`nzadane$$ = 1, $CellContext`p$$ = 1}, "ControllerVariables" :> { Hold[$CellContext`nzadane$$, $CellContext`nzadane$194264$$, 0], Hold[$CellContext`p$$, $CellContext`p$194265$$, 0]}, "OtherVariables" :> { Typeset`show$$, Typeset`bookmarkList$$, Typeset`bookmarkMode$$, Typeset`animator$$, Typeset`animvar$$, Typeset`name$$, Typeset`specs$$, Typeset`size$$, Typeset`update$$, Typeset`initDone$$, Typeset`skipInitDone$$}, "Body" :> ($CellContext`xf = 1; $CellContext`xfmin = 0; $CellContext`xfmax = 2; $CellContext`n0 = 1; $CellContext`nmin = 1; $CellContext`nmax = 20; $CellContext`deltan = 1; $CellContext`p0 = 1; $CellContext`pmin = 0.1; $CellContext`pmax = 1; $CellContext`deltap = 0.1; $CellContext`barva = Black; $CellContext`barva1 = Blue; $CellContext`barva2 = Green; $CellContext`barva3 = Red; $CellContext`barvaf = Black; $CellContext`tloustka = 0.003; $CellContext`velikostpisma = 20; $CellContext`velikostbodu = 0.05; $CellContext`velikostobrazku = 500; $CellContext`frekvence = Table[{$CellContext`xf, $CellContext`i $CellContext`p$$}, \ {$CellContext`i, $CellContext`nmin, $CellContext`nzadane$$, 1}]; Grid[{{ Plot[{(1/$CellContext`nzadane$$) Sum[ Cos[$CellContext`n $CellContext`p$$ $CellContext`x], \ {$CellContext`n, 1, $CellContext`nzadane$$}], (1/$CellContext`nzadane$$) Sum[ Sin[$CellContext`n $CellContext`p$$ $CellContext`x], \ {$CellContext`n, 1, $CellContext`nzadane$$}], (1/$CellContext`nzadane$$^2) ( Sum[ Cos[$CellContext`n $CellContext`p$$ $CellContext`x], \ {$CellContext`n, 1, $CellContext`nzadane$$}]^2 + Sum[ Sin[$CellContext`n $CellContext`p$$ $CellContext`x], \ {$CellContext`n, 1, $CellContext`nzadane$$}]^2)}, {$CellContext`x, -20, 20}, PlotStyle -> {{$CellContext`barva1, Thickness[$CellContext`tloustka]}, {$CellContext`barva2, Thickness[$CellContext`tloustka]}, {$CellContext`barva3, Thickness[$CellContext`tloustka]}}, AxesLabel -> { Style[ "\!\(\*StyleBox[\"x\",FontSlant->\"Italic\"]\)", \ $CellContext`velikostpisma, $CellContext`barva], Style[ "Re \[Psi], Im \[Psi], \[Rho]", $CellContext`velikostpisma, \ $CellContext`barva]}, PlotRange -> {-1, 1}, ImageSize -> { 1.5 $CellContext`velikostobrazku, $CellContext`velikostobrazku}], ListPlot[$CellContext`frekvence, PlotStyle -> Directive[$CellContext`barvaf, PointSize[$CellContext`velikostbodu]], AxesLabel -> { Style["c(p)", $CellContext`velikostpisma, $CellContext`barva], Style["p", $CellContext`velikostpisma, $CellContext`barva]}, AspectRatio -> 2, PlotRange -> {{$CellContext`xfmin, $CellContext`xfmax}, { 0, $CellContext`nmax + 1}}, ImageSize -> { 0.5 $CellContext`velikostobrazku, \ $CellContext`velikostobrazku}]}}]), "Specifications" :> {{{$CellContext`nzadane$$, 1, Style["\!\(\*StyleBox[\"n\",FontSlant->\"Italic\"]\)", 20, GrayLevel[0], FontFamily -> Times]}, 1, 20, 1}, {{$CellContext`p$$, 1, Style["\!\(\*StyleBox[\"p\",FontSlant->\"Italic\"]\)", 20, GrayLevel[0], FontFamily -> Times]}, 0.1, 1, 0.1}}, "Options" :> {}, "DefaultOptions" :> {}], ImageSizeCache->{1060., {308., 314.}}, SingleEvaluation->True], Deinitialization:>None, DynamicModuleValues:>{}, SynchronousInitialization->True, UndoTrackedVariables:>{Typeset`show$$, Typeset`bookmarkMode$$}, UnsavedVariables:>{Typeset`initDone$$}, UntrackedVariables:>{Typeset`size$$}], "Manipulate", Deployed->True, StripOnInput->False], Manipulate`InterpretManipulate[1]]], "Output", CellChangeTimes->{3.730653360337313*^9, 3.7307729868653355`*^9, 3.730773022002557*^9, 3.7307730945624037`*^9, 3.7307731889021125`*^9, 3.730773219999952*^9, 3.7308042374821663`*^9, 3.7308042925264983`*^9},ExpressionUUID->"36c80369-606f-49fd-a6a7-\ 4c113cb530ee"] }, Open ]] }, WindowSize->{1600, 817}, WindowMargins->{{-8, Automatic}, {Automatic, -8}}, FrontEndVersion->"11.2 for Microsoft Windows (64-bit) (September 10, 2017)", StyleDefinitions->"Default.nb" ] (* End of Notebook Content *) (* Internal cache information *) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[CellGroupData[{ Cell[1510, 35, 8312, 192, 19, "Input",ExpressionUUID->"c1299892-1532-4752-b2c3-cf4bd2d2cca2", CellOpen->False], Cell[9825, 229, 5260, 99, 641, "Output",ExpressionUUID->"36c80369-606f-49fd-a6a7-4c113cb530ee"] }, Open ]] } ] *) (* End of internal cache information *) (* NotebookSignature huTRkCM6t0GL0CK2TmtVFsvJ *)