(************** Content-type: application/mathematica ************** CreatedBy='Mathematica 5.1' Mathematica-Compatible Notebook This notebook can be used with any Mathematica-compatible application, such as Mathematica, MathReader or Publicon. The data for the notebook starts with the line containing stars above. To get the notebook into a Mathematica-compatible application, do one of the following: * Save the data starting with the line of stars above into a file with a name ending in .nb, then open the file inside the application; * Copy the data starting with the line of stars above to the clipboard, then use the Paste menu command inside the application. Data for notebooks contains only printable 7-bit ASCII and can be sent directly in email or through ftp in text mode. Newlines can be CR, LF or CRLF (Unix, Macintosh or MS-DOS style). NOTE: If you modify the data for this notebook not in a Mathematica- compatible application, you must delete the line below containing the word CacheID, otherwise Mathematica-compatible applications may try to use invalid cache data. For more information on notebooks and Mathematica-compatible applications, contact Wolfram Research: web: http://www.wolfram.com email: info@wolfram.com phone: +1-217-398-0700 (U.S.) Notebook reader applications are available free of charge from Wolfram Research. *******************************************************************) (*CacheID: 232*) (*NotebookFileLineBreakTest NotebookFileLineBreakTest*) (*NotebookOptionsPosition[ 33560, 1041]*) (*NotebookOutlinePosition[ 34242, 1064]*) (* CellTagsIndexPosition[ 34198, 1060]*) (*WindowFrame->Normal*) Notebook[{ Cell["Plot Discretization Results", "Title"], Cell["\<\ John McGee Virginia Tech 23-May-2005\ \>", "Subsubtitle"], Cell[TextData[{ "This is a ", StyleBox["Mathematica", FontSlant->"Italic"], " notebook to plot the results of discretization for several time series." }], "Text", FontSize->14], Cell[CellGroupData[{ Cell["Import Data", "Subsection"], Cell["\<\ Import a table of original (continuous) time series. Each column contains the time series for one variable.\ \>", "Text", FontColor->RGBColor[0, 0, 1]], Cell[BoxData[ \(\(d0 = Import["\", \ "\"];\)\)], "Input"], Cell[CellGroupData[{ Cell[BoxData[ \(TableForm[d0]\)], "Input"], Cell[BoxData[ TagBox[GridBox[{ {"3.2185710377470755`", "3.2185710377470755`", \(-0.001647374853474741`\)}, {"2.578856652174989`", "2.578856652174989`", \(-0.0005838353213798433`\)}, {"2.252993554768716`", "2.252993554768716`", \(-0.0001958074187537289`\)}, {"2.1032649423594543`", "2.1032649423594543`", \(-0.000056197791256863725`\)}, {"2.0378573990797895`", "2.0378573990797895`", \(-5.06141704481992`*^-6\)}, {"2.009781163915104`", "2.009781163915104`", "0.000013962720917306831`"}, {"1.9979436406936046`", "1.9979436406936046`", "0.000020967783852639085`"}, {"1.992941828704291`", "1.992941828704291`", "0.00002364704946903226`"}, {"1.9913615846144574`", "1.9913615846144574`", "0.000024286012479213278`"}, {"1.9905653816762108`", "1.9905653816762108`", "0.000024626899577237192`"} }, RowSpacings->1, ColumnSpacings->3, RowAlignments->Baseline, ColumnAlignments->{Left}], Function[ BoxForm`e$, TableForm[ BoxForm`e$]]]], "Output"] }, Open ]], Cell["Import the corresponding table of discretized values", "Text", FontColor->RGBColor[0, 0, 1]], Cell[BoxData[ \(\(d1 = Import["\", \ "\"];\)\)], "Input"], Cell[CellGroupData[{ Cell[BoxData[ \(TableForm[d1]\)], "Input"], Cell[BoxData[ TagBox[GridBox[{ {"2", "2", "0"}, {"1", "1", "1"}, {"1", "1", "1"}, {"0", "0", "2"}, {"0", "0", "2"}, {"0", "0", "2"}, {"0", "0", "2"}, {"0", "0", "2"}, {"0", "0", "2"}, {"0", "0", "2"} }, RowSpacings->1, ColumnSpacings->3, RowAlignments->Baseline, ColumnAlignments->{Left}], Function[ BoxForm`e$, TableForm[ BoxForm`e$]]]], "Output"] }, Open ]], Cell[BoxData[ \(\(PlotDiscretizationResults[d0_, d1_] := Module[{d0min, d0max, d1min, d1max, d2, plt0, plt1}, \[IndentingNewLine]d0min = Min[d0]; \[IndentingNewLine]d0max = Max[d0]; \[IndentingNewLine]d1min = Min[d1]; \[IndentingNewLine]d1max = Max[d1]; \[IndentingNewLine]d2 = \((d1max - d1min)\)*\((d0 - d0min)\)/\((d0max - d0min)\); \[IndentingNewLine]plt0 = ListPlot[d2, PlotJoined \[Rule] True, PlotStyle \[Rule] RGBColor[1, 0, 0], AxesOrigin \[Rule] {1, 0}, PlotRange \[Rule] All, DisplayFunction \[Rule] Identity]; \[IndentingNewLine]plt1 = ListPlot[d1, PlotStyle \[Rule] {PointSize[0.025], RGBColor[0, 0, 1]}, AxesOrigin \[Rule] {0, 0}, PlotRange \[Rule] All, DisplayFunction \[Rule] Identity]; \[IndentingNewLine]Show[ plt0, plt1, DisplayFunction \[Rule] $DisplayFunction, AxesLabel \[Rule] {"\