(************** Content-type: application/mathematica ************** 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[ 23891, 845]*) (*NotebookOutlinePosition[ 24781, 873]*) (* CellTagsIndexPosition[ 24737, 869]*) (*WindowFrame->Normal*) Notebook[{ Cell[CellGroupData[{ Cell["Piecewise functions", "Section"], Cell[BoxData[ \(<< Piecewise.m\)], "Input"], Cell["\<\ Piecewise.m is a package for manipulating functions that are \ defined piecewise. (This package is still in the development stage. Please \ send bug reports, comments and suggestions to Doug Hardin, email: \ hardin@math.vanderbilt.edu)\ \>", "Text"], Cell["\<\ f= PW[var,{f1[var],...,fn[var]},{a0,a1,...,an}] represents a \ function that is equal to f1 on the interval (a0,a1), f2 on (a1,a2), etc. \ The function is defined to be zero outside of [a0,an]. Here we define the \ continuous piecewise linear B-spline (a.k.a the \"hat\" function).\ \>", \ "Text"], Cell[BoxData[ \(\(hat = PW[x, {1 + x, 1 - x}, {\(-1\), 0, 1}];\)\)], "Input"], Cell["\<\ The graphs of PW functions can be plotted using ``plot''. Usual \ Plot Options can be used. Note: the name is likely to be changed to PlotPW \ at some point in the near future.\ \>", "Text"], Cell[BoxData[ \(plot[hat]\)], "Input"], Cell["\<\ Here we define a piecewise quadratic function supported on [0,1]. \ The plot function also will plot a list of PW functions.\ \>", "Text"], Cell[BoxData[{ \(\(q = PW[x, {4 x \((1 - x)\)}, {0, 1}];\)\), "\n", \(plot[{hat, q}]\)}], "Input"], Cell["You can add and multiply PW functions:", "Text"], Cell[BoxData[ \(\(plot[hat*hat + q];\)\)], "Input"], Cell["\<\ Some useful operations on PW functions: trans[b][f] is composition of f with x->x-b. dilate[a][f] is composition of f with x->ax. f[a,b] or aff[a,b][pwf] is the composition of f with x->ax-b. Here we form a linear combination of the integer translates of hat:\ \>", \ "Text"], Cell[BoxData[{ \(\(vals = {1, 3, \(-1\), 2, 2};\)\), "\n", \(\(f = vals . Table[\(trans[n]\)[hat], {n, 1, Length[vals]}];\)\), "\n", \(plot[f]\)}], "Input"], Cell["\<\ The plot function also has the same Options as Plot. Here are two \ examples:\ \>", "Text"], Cell[BoxData[ \(plot[f, PlotRange -> {{1, 5}, {\(-2\), 4}}]\)], "Input"], Cell[BoxData[ \(plot[f, Epilog -> {RGBColor[1, 0, 0], PointSize[ .02], \n Table[Point[{n, vals[\([n]\)]}], {n, 1, Length[vals]}]}]\)], "Input"] }, Closed]], Cell[CellGroupData[{ Cell["Spline Examples", "Section"], Cell[BoxData[{ \(\(f[x_] = Sin[x];\)\), "\[IndentingNewLine]", \(g1 = Plot[f[x], {x, 0, 10}]\)}], "Input"], Cell[BoxData[{ \(\(c[n_] = f[n];\)\), "\[IndentingNewLine]", \(\(p1 = Sum[\(trans[n]\)[hat] c[n], {n, 0, 10}];\)\), "\[IndentingNewLine]", \(Show[plot[p1], g1]\)}], "Input"], Cell[CellGroupData[{ Cell["S_r,2 r= -1,0,1", "Subsubsection"], Cell[BoxData[ \(\(psi = {PW[x, {1}, {0, 1}], PW[x, {x}, {0, 1}], PW[x, {x^2}, {0, 1}]};\)\)], "Input"], Cell[BoxData[{ \(u[\(-1\)] = {{0, 0}, {1, 0}, {0, 0}}; u[0] = {{1, 0}, {\(-1\), 1}, {0, \(-1\)}};\), "\n", \(phi1 = Sum[\(trans[n]\)[psi] . u[n], {n, \(-1\), 0}]\)}], "Input"], Cell[BoxData[ \(plot[phi1]\)], "Input"], Cell["Interpolating basis:", "Text"], Cell[BoxData[ \(\(pint = {phi[\([1]\)] - 2 phi[\([2]\)] - 2 \( trans[\(-1\)]\)[phi[\([2]\)]], 4 phi[\([2]\)]};\)\)], "Input"], Cell[BoxData[ \(plot[pint]\)], "Input"], Cell[BoxData[{ \(\(c[n_] = {f[n], f[n + 1/2]};\)\), "\[IndentingNewLine]", \(\(p2 = Sum[\(trans[n]\)[pint] . c[n], {n, 0, 10}];\)\), "\[IndentingNewLine]", \(Show[plot[p2], g1]\)}], "Input"], Cell[BoxData[{ \(\(u[0] = {0, 0, 1/2};\)\), "\[IndentingNewLine]", \(\(u[1] = {1/2, 1, \(-1\)};\)\), "\[IndentingNewLine]", \(\(u[2] = {1/2, \(-1\), 1/2};\)\), "\[IndentingNewLine]", \(phi2 = Sum[\(trans[n]\)[psi] . u[n], {n, 0, 2}]\)}], "Input"], Cell[BoxData[ \(plot[phi2]\)], "Input"], Cell[BoxData[{ \(\(phi2 = \(trans[\(-1\)]\)[phi2];\)\), "\[IndentingNewLine]", \(plot[phi2]\)}], "Input"], Cell[BoxData[{ \(\(f[x_] = 1;\)\), "\[IndentingNewLine]", \(q = Sum[f[n + 1/2] \(trans[n]\)[phi2], {n, \(-4\), 3}] // Simplify\), "\[IndentingNewLine]", \(plot[q]\)}], "Input"], Cell[BoxData[{ \(\(f[x_] = Sin[x];\)\), "\[IndentingNewLine]", \(\(q = Sum[f[n + 1/2] \(trans[n]\)[phi2], {n, \(-1\), 10}];\)\), "\[IndentingNewLine]", \(plot[q]\)}], "Input"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell["Refinement Equation (Cascade Algorithm)", "Section"], Cell["\<\ Here is a refinement equation for a scaling function \[Phi]. Note \ that this is a functional equation for \[Phi]. \ \>", "Text"], Cell[BoxData[ \(TextForm \`\[Phi] \((x)\) = \(\@2\) \(\[Sum]\+n\( h\_n\) \[Phi] \((2 x - n)\)\)\)], "DisplayFormula", TextAlignment->-0.5, FontSize->14], Cell["\<\ A refinement equation must usually be solved in some iterative \ manner. For example, we can use the \"cascade algorithm\":\ \>", "Text"], Cell[BoxData[ \(TextForm \`\(\[Phi]\_\(m + 1\)\) \((x)\) = \(H \((\[Phi]\_m)\) := \(\@2\) \(\[Sum]\+n\( h\_n\) \(\[Phi]\_m\) \((2 x - n)\)\)\)\)], "DisplayFormula", TextAlignment->-0.5, FontSize->14], Cell[TextData[ "Once \[Phi] is found, the wavelet \[Psi] can be found in terms of \[Phi]:"], "Text"], Cell[BoxData[ \(TextForm \`\[Psi] \((x)\) = \(\@2\) \(\[Sum]\+n\( g\_n\) \[Phi] \((2 x - n)\)\)\)], "DisplayFormula", TextAlignment->-0.5, FontSize->14], Cell[BoxData[{ \(H[f_] := \n\t Sqrt[2] Sum[h[\([n]\)] f[2, n - 1], {n, 1, Length[h]}] // Simplify\), "\n", \(G[f_] := Sqrt[2]\ Sum[g[\([n]\)] f[2, n - 1], {n, 1, Length[g]}] // Simplify\)}], "Input"], Cell[CellGroupData[{ Cell["D4 ", "Subsubsection"], Cell[BoxData[{ \(\(h = N[{1 + \@3, 3 + \@3, 3 - \@3, 1 - \@3}\/\(4\ \@2\)];\)\), "\n", \(\(g = N[{\(1 - \@3\)\/\(4\ \@2\), \(-\(\(3 - \@3\)\/\(4\ \@2\)\)\), \(3 + \ \@3\)\/\(4\ \@2\), \(-\(\(1 + \@3\)\/\(4\ \@2\)\)\)}];\)\)}], "Input"], Cell[TextData[ "We find an approximation to \[Phi] by iterating H a few times. We then apply \ G one time to get\nan approximation to \[Psi]:"], "Text"], Cell[BoxData[{ \(\(d4 = \(trans[1]\)[hat];\)\), "\n", \(\(Do[d4 = H[d4], {4}];\)\n\), "\n", \(plot[H[d4]]\), "\n", \(plot[G[d4]]\)}], "Input"] }, Open ]], Cell[CellGroupData[{ Cell["Haar", "Subsubsection"], Cell[BoxData[{ \(\(h = N[\(1\/\@2\) {1, 1}];\)\), "\n", \(\(g = N[\(1\/\@2\) {1, \(-1\)}];\)\)}], "Input"], Cell[BoxData[{ \(\(h2 = hat;\)\), "\n", \(\(Do[h2 = H[h2], {4}];\)\n\), "\n", \(plot[H[h2]]\), "\n", \(plot[G[h2]]\)}], "Input"] }, Open ]], Cell[CellGroupData[{ Cell["Observation", "Subsubsection"], Cell["\<\ Observe that the artifacts that were observed in the compression \ and denoising sections in Part 1 correspond to properties of the underlying \ scaling functions. Why do you think this is?\ \>", "Text"] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell["Multiwavelets", "Section"], Cell[TextData[{ "A scaling vector \[CapitalPhi] = (", Cell[BoxData[ \(TraditionalForm\`\(\(\[Phi]\_1, \[Ellipsis], \ \[Phi]\_r\)\()\)\)\^T\)]], " is a vector of functions in ", Cell[BoxData[ \(TraditionalForm\`\(L\_2\)(\[DoubleStruckCapitalR])\)]], " that satisfies a refinement equation with ", StyleBox["r x r", "InlineFormula", FontSlant->"Italic"], " matrix coefficients ", Cell[BoxData[ \(TraditionalForm\`H\_n\)]], ":" }], "Text"], Cell[BoxData[ \(TextForm\`\[CapitalPhi] \((x)\) = \(\@2\) \(\[Sum]\+n\( H\_n\) \[CapitalPhi] \((2 x - n)\)\)\)], "DisplayFormula", TextAlignment->-0.5, FontSize->14], Cell[TextData[{ "A scaling vector is said to be ", StyleBox["orthogonal ", FontWeight->"Bold"], "if the collection" }], "Text"], Cell[BoxData[ \({\(\[Phi]\_j\) \((\[FilledVerySmallSquare] - n)\) | \ 1 \[LessEqual] j \[LessEqual] r, \ n \[Element] \[DoubleStruckCapitalZ]}\)], "DisplayFormula", TextAlignment->-0.5], Cell[TextData[{ "is an orthogonal system. We illustrate a method for constructing \ orthogonal scaling vectors developed by George Donovan, Jeff Geronimo and \ Doug Hardin [SIAM Journ. Math. Analysis, ", StyleBox["27", FontWeight->"Bold"], ":6, 1791--1815 (1996)]\n\nThere are two basic ideas to the construction. \ First is a method for constructing orthogonal\nbases consisting of the \ integer translates of a finite collection of functions ", Cell[BoxData[ \(TraditionalForm\`\(\(\[Phi]\_1\)\(,\)\(\[Ellipsis]\)\(,\)\(\(\[Phi]\_\ r\)\(.\)\)\(\ \)\)\)]], "This method works in the more general setting of FSI spaces. A space that \ is the closed span of the integer translates of a finite collection of \ functions ", Cell[BoxData[ \(TraditionalForm\`\(\(\ \)\(\[Phi]\_1, \[Ellipsis], \[Phi]\_\(\(r\)\(\ \ \)\)\)\)\)]], "in ", Cell[BoxData[ \(TraditionalForm\`\(L\_2\)(\[DoubleStruckCapitalR])\)]], " is called a ", StyleBox["finitely generated shift invariant (FSI)", FontWeight->"Bold"], " ", StyleBox["space", FontWeight->"Bold"], ". We illustrate the orthogonality method with the following (not \ refinable) example. " }], "Text"], Cell[CellGroupData[{ Cell["Example 1: Non-refinable orthogonal generator", "Subsubsection"], Cell[TextData[{ "ip[f,g], defined in Piecewise.m, gives the ", Cell[BoxData[ \(TraditionalForm\`\(L\_2\)(\[DoubleStruckCapitalR])\)]], "-inner product of two piecewise functions, that is, it is the integral of \ the product of f and g. Here we define the projection of f onto the space \ spanned by either a single function or an orthogonal collection of functions \ V={", Cell[BoxData[ \(TraditionalForm\`v\_1, \[Ellipsis], v\_k\)]], "}." }], "Text"], Cell[BoxData[{ \(\(proj[f_]\)[v_] := \((ip[f, v]/ip[v, v])\) v\), "\n", \(\(proj[f_]\)[V_List] := Sum[\(proj[f]\)[V[\([i]\)]], {i, 1, Length[V]}]\), "\n", \(norm[f_] := Sqrt[ip[f, f]]\)}], "Input"], Cell[TextData[{ "Suppose ", StyleBox["w", "DisplayFormula", FontSlant->"Italic"], " is a function in ", Cell[BoxData[ \(TraditionalForm\`\(L\_2\)(\[DoubleStruckCapitalR])\)]], " whose support is contained in [0,1]. In the case of this example we \ choose ", StyleBox["w", "DisplayFormula", FontSlant->"Italic"], " to be an arbitrary linear combination of ", StyleBox["q", "DisplayFormula", FontSlant->"Italic"], " and ", Cell[BoxData[ \(TraditionalForm\`q\^2\)]], "." }], "Text"], Cell[BoxData[ \(w = q + a*q*q\)], "Input"], Cell[TextData[{ "Let V be the FSI space generated by ", StyleBox["w", "DisplayFormula", FontSlant->"Italic"], " and the function ", StyleBox["hat. ", FontSlant->"Italic"], " Let", Cell[BoxData[ FormBox[ RowBox[{" ", RowBox[{"phi1", "=", RowBox[{ RowBox[{\((I - proj\_{w, w(\[FilledVerySmallSquare] + 1)})\), "hat", StyleBox[" ", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"Underline"->False, "Outline"->False, "Shadow"->False}], StyleBox["and", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"Underline"->False, "Outline"->False, "Shadow"->False}], StyleBox[" ", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"Underline"->False, "Outline"->False, "Shadow"->False}], StyleBox["phi2", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"Underline"->False, "Outline"->False, "Shadow"->False}]}], StyleBox[" ", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"Underline"->False, "Outline"->False, "Shadow"->False}], StyleBox["=", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"Underline"->False, "Outline"->False, "Shadow"->False}], StyleBox[" ", FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontVariations->{"Underline"->False, "Outline"->False, "Shadow"->False}], RowBox[{ StyleBox["w", "DisplayFormula", FontWeight->"Plain", FontSlant->"Italic", FontTracking->"Plain", FontVariations->{"Underline"->False, "Outline"->False, "Shadow"->False}], "."}]}]}]}], TraditionalForm]]] }], "Text"], Cell[BoxData[ \(\(phi1 = hat - \(proj[hat]\)[{w, w[1, \(-1\)]}] // Simplify;\)\)], "Input"], Cell["Here is an example of phi1 when a=.5.", "Text"], Cell[BoxData[ \(phi1\)], "Input"], Cell[BoxData[ \(plot[phi1 /. a -> .5]\)], "Input"], Cell["\<\ Then phi1 and phi2 also generate V. Observe that phi2 is \ orthogonal to phi1(\[FilledVerySmallSquare]-n) for all integers n and that \ phi2 is orthogonal to phi2(\[FilledVerySmallSquare]-n) for all non-zero \ integers n. Then phi1 and phi2 will generate an orthogonal basis iff phi1 and phi1(\ \[FilledVerySmallSquare]-1) are orthogonal:\ \>", "Text"], Cell[BoxData[ \(ip[phi1, phi1[1, 1]] // Simplify\)], "Input"], Cell["This leads to the quadratic equation", "Text"], Cell[BoxData[ \(sol = Solve[105 + 120\ a + 16\ a\^2 == 0]\)], "Input"], Cell["\<\ Choose one of the two values of a and replace to find phi1 and \ phi2.\ \>", "Text"], Cell[BoxData[{ \(\(phi1 = Simplify[phi1 /. sol[\([1]\)]];\)\), "\n", \(\(phi2 = Simplify[w /. sol[\([1]\)]];\)\)}], "Input"], Cell["\<\ Normalize to find phi1 and phi2 that generate an orthonormal basis:\ \ \>", "Text"], Cell[BoxData[{ \(\(phi1 = phi1/norm[phi1];\)\), "\n", \(\(phi2 = \(-phi2\)/norm[phi2];\)\)}], "Input"], Cell[BoxData[ \(plot[{phi1, phi2}]\)], "Input"], Cell["\<\ Here we check that (phi1,phi2) does indeed generate an orthogonal \ basis:\ \>", "Text"], Cell[BoxData[{ \(ip[phi1, phi2] // Simplify\), "\n", \(ip[phi1, phi1[1, 1]] // Simplify\)}], "Input"], Cell["Note that (phi1,phi2) is not a scaling vector. ", "Text"] }, Closed]], Cell[CellGroupData[{ Cell["Example 2: An orthogonal scaling vector.", "Subsubsection"], Cell[TextData[{ "Here we use the intertwining trick from the previously referenced paper. \ We start with the multiresolution analysis ", Cell[BoxData[ \(TraditionalForm\`\((V\_n)\)\_n\[Epsilon]\[DoubleStruckCapitalZ]\)]], " generated by hat and ", StyleBox["q", "DisplayFormula", FontSlant->"Italic"], ". Then ", Cell[BoxData[ \(TraditionalForm\`V\_0\)]], " is the space of continuous piecewise quadratic functions with integer \ knots that are also in ", Cell[BoxData[ \(TraditionalForm\`\(L\_2\)(\[DoubleStruckCapitalR])\)]], ". The idea is that we choose ", StyleBox["w", "DisplayFormula", FontSlant->"Italic"], " from ", Cell[BoxData[ \(TraditionalForm\`V\_1\)]], " and then the space ", Cell[BoxData[ \(TraditionalForm\`V\_0'\)]], " generated by hat, ", StyleBox["q", "DisplayFormula", FontSlant->"Italic"], "\nand ", StyleBox["w", "DisplayFormula", FontSlant->"Italic"], " satisfies " }], "Text"], Cell[BoxData[ \(TraditionalForm\`V\_0 \[Subset] V\_0' \[Subset] V\_1\)], "DisplayFormula", TextAlignment->-0.5, FormatType->StandardForm], Cell["and hence", "Text"], Cell[BoxData[ \(TraditionalForm\`V\_1 \[Subset] V\_1' \[Subset] V\_2\)], "DisplayFormula", TextAlignment->-0.5, FormatType->StandardForm], Cell["from which follows ", "Text"], Cell[BoxData[ \(TraditionalForm\`V\_0' \[Subset] \(\(V\_1'\)\(.\)\)\)], "DisplayFormula",\ TextAlignment->-0.5, FormatType->StandardForm], Cell[TextData[{ "Then ", Cell[BoxData[ \(TraditionalForm\`V\_0'\)]], " is refinable and so (hat, ", StyleBox["q", "DisplayFormula", FontSlant->"Italic"], ", ", StyleBox["w", "DisplayFormula", FontSlant->"Italic"], ") is a scaling vector. As in the previous example we choose\n", StyleBox["w", "DisplayFormula", FontSlant->"Italic"], " so that its support is contained in [0,1]. Then ", StyleBox["w", "DisplayFormula", FontSlant->"Italic"], " must be in the span ", StyleBox["A ", FontSlant->"Italic"], "of hat(2\[EmptyVerySmallSquare]-1), ", StyleBox["q", "DisplayFormula", FontSlant->"Italic"], "(2\[EmptyVerySmallSquare]), and ", StyleBox["q", "DisplayFormula", FontSlant->"Italic"], "(2\[EmptyVerySmallSquare]-1). " }], "Text"], Cell[BoxData[ \(plot[{hat[2, 1], q[2, 0], q[2, 1]}]\)], "Input"], Cell[TextData[{ "Note that ", StyleBox["q ", "DisplayFormula", FontSlant->"Italic"], StyleBox["is in the span of these three as well. We further require ", "DisplayFormula"], StyleBox["w", "DisplayFormula", FontSlant->"Italic"], StyleBox[" to be orthogonal to ", "DisplayFormula"], StyleBox["q. ", "DisplayFormula", FontSlant->"Italic"], StyleBox[" The following functions form an orthogonal basis for the \ 2-dimensional orthogonal complement of ", "DisplayFormula"], StyleBox["q ", "DisplayFormula", FontSlant->"Italic"], StyleBox[" in the 3-dimensional space ", "DisplayFormula"], StyleBox["A", FontSlant->"Italic"], StyleBox[".", "DisplayFormula"] }], "Text"], Cell[BoxData[{ \(\(w1 = q[2, 0] - q[2, 1];\)\), "\n", \(\(w2 = q[2, 0] + q[2, 1] - \((ip[q, q[2, 0] + q[2, 1]]/ip[q, hat[2, 1]])\) hat[2, 1];\)\)}], "Input"], Cell[BoxData[ \(plot[{q, w1, w2}]\)], "Input"], Cell[BoxData[ \(ip[q, w2]\)], "Input"], Cell[TextData[{ "We choose ", StyleBox["w", FontSlant->"Italic"], " to be in the span of these two functions. " }], "Text"], Cell[BoxData[ \(\(w = w1 + a*w2;\)\)], "Input"], Cell[TextData[{ "We are going to construct an orthogonal scaling vector consisting of \ phi1=", StyleBox["(I-", FontSlant->"Italic"], Cell[BoxData[ \(TraditionalForm\`\(\(P\_\(S(q, w)\)\)\()\)\)\)], FontSlant->"Italic"], "hat, phi2=", StyleBox["q,", FontSlant->"Italic"], " phi3=", StyleBox["w, ", FontSlant->"Italic"], " where ", StyleBox["S(q,w) ", FontSlant->"Italic"], " is the FSI space generated by ", StyleBox["q ", FontSlant->"Italic"], "and ", StyleBox["w.", FontSlant->"Italic"] }], "Text"], Cell[BoxData[ \(\(phi1 = hat - \(proj[hat]\)[{w, q, w[1, \(-1\)], q[1, \(-1\)]}] // Simplify;\)\)], "Input"], Cell[TextData[{ "Here is an example when ", StyleBox["a=", FontSlant->"Italic"], ".5. " }], "Text"], Cell[BoxData[ \(plot[{phi1, \ w, \ q} /. a -> .5]\)], "Input"], Cell[TextData[{ "This will be an orthogonal scaling vector iff phi1 is orthogonal to its \ shift phi1(\[EmptyVerySmallSquare]-1), which is not the case for a=.5. We \ next solve for ", StyleBox["a", FontSlant->"Italic"], " which will make this true. " }], "Text"], Cell[BoxData[ \(sol = Solve[ip[phi1, phi1[1, 1]] == 0]\)], "Input"], Cell[TextData[{ "Here is one example (the other solution gives ", StyleBox["w", FontSlant->"Italic"], " that is just the reflection of this one about the line ", StyleBox["x=", FontSlant->"Italic"], ".5. " }], "Text"], Cell[BoxData[ \(\({phi1, phi2, phi3} = \(({phi1, q, w} /. sol[\([1]\)])\) // Simplify;\)\)], "Input"], Cell[BoxData[{ \(\(phi1 = phi1/norm[phi1];\)\), "\n", \(\(phi2 = phi2/norm[phi2];\)\), "\n", \(\(phi3 = phi3/norm[phi3];\)\)}], "Input"], Cell[BoxData[ \(\(Phi = {phi1, phi2, phi3};\)\)], "Input"], Cell[BoxData[ \(plot[Phi]\)], "Input"], Cell[TextData[{ "Then Phi is an orthonormal scaling vector. The matrix coefficients ", Cell[BoxData[ \(TraditionalForm\`H\_n\)]], "can be calculated as follows." }], "Text"], Cell[BoxData[{ \(Clear[H]\), "\n", \(H[k_] := \(H[k] = Table[ip[Phi[\([i]\)], Sqrt[2] \(Phi[\([j]\)]\)[2, k]], {i, 1, Length[Phi]}, {j, 1, Length[Phi]}] // Simplify\)\)}], "Input"], Cell[TextData[{ "In this case there are 4 nonzero terms ", Cell[BoxData[ \(TraditionalForm\`H\_\(-2\), H\_\(-1\), \ H\_0, H\_1\)]], ":" }], "Text"], Cell[BoxData[ \(H[\(-2\)]\)], "Input"], Cell[BoxData[ \(H[\(-1\)]\)], "Input"], Cell[BoxData[ \(H[0]\)], "Input"], Cell[BoxData[ \(H[1]\)], "Input"], Cell[TextData[{ "Just to check that ", Cell[BoxData[ FormBox[ FormBox[\(H\_n\), "TraditionalForm"], TraditionalForm]]], "is zero for ", StyleBox["n", FontSlant->"Italic"], "=-3 and 2." }], "Text"], Cell[BoxData[{ \(H[\(-3\)]\), "\n", \(H[2]\)}], "Input"], Cell["\<\ The following gives Phi(2\[EmptyVerySmallSquare]-1). This will be \ built in to the next version of Piecewise.m\ \>", "Text"], Cell[BoxData[ \(Map[aff[2, 1], Phi]\)], "Input"], Cell[TextData[{ "The following gives a verification that Phi satisfies the refinement \ equation with the coefficients ", Cell[BoxData[ \(TraditionalForm\`H\_n\)]], "." }], "Text"], Cell[BoxData[ \(Simplify[ Phi - Sqrt[2] Sum[H[n] . Map[aff[2, n], Phi], {n, \(-2\), 1}]]\)], "Input"], Cell["\<\ I'm afraid the construction of the wavelets for this example must \ wait till the part 3.\ \>", "Text"] }, Closed]] }, Closed]] }, FrontEndVersion->"4.1 for Macintosh", ScreenRectangle->{{0, 1024}, {0, 748}}, WindowSize->{613, 527}, WindowMargins->{{Automatic, 182}, {Automatic, 35}}, PrintingCopies->1, PrintingPageRange->{1, Automatic}, MacintoshSystemPageSetup->"\<\ 00<0004/0B`000002mT8o?mooh<" ] (******************************************************************* Cached data follows. If you edit this Notebook file directly, not using Mathematica, you must remove the line containing CacheID at the top of the file. The cache data will then be recreated when you save this file from within Mathematica. *******************************************************************) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[CellGroupData[{ Cell[1727, 52, 38, 0, 56, "Section"], Cell[1768, 54, 47, 1, 27, "Input"], Cell[1818, 57, 259, 5, 46, "Text"], Cell[2080, 64, 308, 6, 62, "Text"], Cell[2391, 72, 81, 1, 27, "Input"], Cell[2475, 75, 202, 4, 46, "Text"], Cell[2680, 81, 42, 1, 27, "Input"], Cell[2725, 84, 148, 4, 46, "Text"], Cell[2876, 90, 108, 2, 43, "Input"], Cell[2987, 94, 54, 0, 30, "Text"], Cell[3044, 96, 55, 1, 27, "Input"], Cell[3102, 99, 285, 7, 94, "Text"], Cell[3390, 108, 179, 4, 59, "Input"], Cell[3572, 114, 101, 3, 30, "Text"], Cell[3676, 119, 76, 1, 27, "Input"], Cell[3755, 122, 164, 3, 43, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[3956, 130, 34, 0, 36, "Section"], Cell[3993, 132, 115, 2, 43, "Input"], Cell[4111, 136, 196, 4, 59, "Input"], Cell[CellGroupData[{ Cell[4332, 144, 42, 0, 42, "Subsubsection"], Cell[4377, 146, 117, 2, 27, "Input"], Cell[4497, 150, 189, 3, 43, "Input"], Cell[4689, 155, 43, 1, 27, "Input"], Cell[4735, 158, 36, 0, 30, "Text"], Cell[4774, 160, 155, 3, 27, "Input"], Cell[4932, 165, 43, 1, 27, "Input"], Cell[4978, 168, 226, 5, 59, "Input"], Cell[5207, 175, 265, 4, 75, "Input"], Cell[5475, 181, 43, 1, 27, "Input"], Cell[5521, 184, 114, 2, 43, "Input"], Cell[5638, 188, 206, 5, 59, "Input"], Cell[5847, 195, 211, 5, 59, "Input"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell[6107, 206, 58, 0, 36, "Section"], Cell[6168, 208, 140, 3, 30, "Text"], Cell[6311, 213, 175, 6, 47, "DisplayFormula"], Cell[6489, 221, 147, 3, 46, "Text"], Cell[6639, 226, 231, 7, 47, "DisplayFormula"], Cell[6873, 235, 103, 2, 30, "Text"], Cell[6979, 239, 175, 6, 47, "DisplayFormula"], Cell[7157, 247, 239, 6, 59, "Input"], Cell[CellGroupData[{ Cell[7421, 257, 28, 0, 42, "Subsubsection"], Cell[7452, 259, 253, 4, 103, "Input"], Cell[7708, 265, 152, 2, 46, "Text"], Cell[7863, 269, 161, 4, 91, "Input"] }, Open ]], Cell[CellGroupData[{ Cell[8061, 278, 29, 0, 42, "Subsubsection"], Cell[8093, 280, 115, 2, 88, "Input"], Cell[8211, 284, 147, 4, 91, "Input"] }, Open ]], Cell[CellGroupData[{ Cell[8395, 293, 36, 0, 42, "Subsubsection"], Cell[8434, 295, 214, 4, 46, "Text"] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell[8697, 305, 32, 0, 36, "Section"], Cell[8732, 307, 476, 15, 48, "Text"], Cell[9211, 324, 191, 4, 47, "DisplayFormula"], Cell[9405, 330, 137, 5, 32, "Text"], Cell[9545, 337, 207, 4, 24, "DisplayFormula"], Cell[9755, 343, 1195, 29, 146, "Text"], Cell[CellGroupData[{ Cell[10975, 376, 70, 0, 42, "Subsubsection"], Cell[11048, 378, 474, 11, 62, "Text"], Cell[11525, 391, 218, 4, 59, "Input"], Cell[11746, 397, 525, 18, 50, "Text"], Cell[12274, 417, 46, 1, 27, "Input"], Cell[12323, 420, 2705, 74, 33, "Text"], Cell[15031, 496, 104, 2, 27, "Input"], Cell[15138, 500, 53, 0, 30, "Text"], Cell[15194, 502, 37, 1, 27, "Input"], Cell[15234, 505, 55, 1, 27, "Input"], Cell[15292, 508, 365, 7, 62, "Text"], Cell[15660, 517, 65, 1, 27, "Input"], Cell[15728, 520, 52, 0, 30, "Text"], Cell[15783, 522, 74, 1, 31, "Input"], Cell[15860, 525, 94, 3, 30, "Text"], Cell[15957, 530, 133, 2, 43, "Input"], Cell[16093, 534, 93, 3, 30, "Text"], Cell[16189, 539, 111, 2, 43, "Input"], Cell[16303, 543, 51, 1, 27, "Input"], Cell[16357, 546, 101, 3, 30, "Text"], Cell[16461, 551, 110, 2, 43, "Input"], Cell[16574, 555, 63, 0, 30, "Text"] }, Closed]], Cell[CellGroupData[{ Cell[16674, 560, 66, 0, 28, "Subsubsection"], Cell[16743, 562, 995, 31, 84, "Text"], Cell[17741, 595, 152, 4, 22, "DisplayFormula"], Cell[17896, 601, 25, 0, 30, "Text"], Cell[17924, 603, 152, 4, 22, "DisplayFormula"], Cell[18079, 609, 35, 0, 30, "Text"], Cell[18117, 611, 146, 4, 22, "DisplayFormula"], Cell[18266, 617, 801, 26, 50, "Text"], Cell[19070, 645, 68, 1, 27, "Input"], Cell[19141, 648, 710, 19, 50, "Text"], Cell[19854, 669, 199, 5, 59, "Input"], Cell[20056, 676, 50, 1, 27, "Input"], Cell[20109, 679, 42, 1, 27, "Input"], Cell[20154, 682, 133, 5, 32, "Text"], Cell[20290, 689, 51, 1, 27, "Input"], Cell[20344, 692, 562, 23, 50, "Text"], Cell[20909, 717, 132, 3, 27, "Input"], Cell[21044, 722, 109, 5, 32, "Text"], Cell[21156, 729, 67, 1, 27, "Input"], Cell[21226, 732, 273, 7, 48, "Text"], Cell[21502, 741, 71, 1, 27, "Input"], Cell[21576, 744, 235, 8, 32, "Text"], Cell[21814, 754, 116, 2, 27, "Input"], Cell[21933, 758, 150, 3, 59, "Input"], Cell[22086, 763, 62, 1, 27, "Input"], Cell[22151, 766, 42, 1, 27, "Input"], Cell[22196, 769, 185, 5, 30, "Text"], Cell[22384, 776, 213, 4, 75, "Input"], Cell[22600, 782, 159, 5, 30, "Text"], Cell[22762, 789, 42, 1, 27, "Input"], Cell[22807, 792, 42, 1, 27, "Input"], Cell[22852, 795, 37, 1, 27, "Input"], Cell[22892, 798, 37, 1, 27, "Input"], Cell[22932, 801, 234, 10, 32, "Text"], Cell[23169, 813, 65, 2, 43, "Input"], Cell[23237, 817, 135, 3, 30, "Text"], Cell[23375, 822, 52, 1, 27, "Input"], Cell[23430, 825, 192, 6, 30, "Text"], Cell[23625, 833, 122, 3, 27, "Input"], Cell[23750, 838, 113, 3, 30, "Text"] }, Closed]] }, Closed]] } ] *) (******************************************************************* End of Mathematica Notebook file. *******************************************************************)