makeWaltz - Eric Young CS 100 M function dat = makeWaltz...

Info icon This preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
% Eric Young % CS 100 M function dat = makeWaltz % The waltz has two parts: a minuet (16 measures); a trio (16 measures). % dat is a structure array where each structure has fields z, rate, and % meas: % dat(k).z is the k-th measure in the waltz, a vector returned by % function wavread % dat(k).rate is the sampling rate of the k-th measure of the waltz % dat(k).meas is the measure identifying number (found in the rule % tables) for the k-th measure in the waltz % Use RuleTable1 to determine which minuet measure comes next.. RuleTable1 = [96 22 141 41 105 122 11 30 70 121 26 9 112 49 109 14;... 32 6 128 63 146 46 134 81 117 39 126 56 174 18 116 83;... 69 95 158 13 153 55 110 24 66 139 15 132 73 58 145 79;... 40 17 113 85 161 2 159 100 90 176 7 34 67 160 52 170;... 148 74 163 45 80 97 36 107 25 143 64 125 76 136 1 93;... 104 157 27 167 154 68 118 91 138 71 150 29 101 162 23 151;... 152 60 171 53 99 133 21 127 16 155 57 175 43 168 89 172;... 119 84 114 50 140 86 169 94 120 88 48 166 51 115 72 111;... 98 142 42 156 75 129 62 123 65 77 19 82 137 38 149 8;... 3 87 165 61 135 47 147 33 102 4 31 164 144 59 173 78;... 54 130 10 103 28 37 106 5 35 20 108 92 12 124 44 131]; % Use RuleTable2 to determine which trio measure comes next.. RuleTable2 = [72 6 59 25 81 41 89 13 36 5 46 79 30 95 19 66;... 56 82 42 74 14 7 26 71 76 20 64 84 8 35 47 88;...
Image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern