<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/">
	<channel>
		<title>The Wave Matrix Module Function Code</title>
		<link>https://blogs.lotterypost.com/jadelottery/2025/5/the_wave_matrix_module_function_code.htm</link>
		<atom:link href="https://www.lotterypost.com/rss/blogcomments/191041" rel="self" type="application/rss+xml" />
		<description>JADELottery's Blog: The Wave Matrix Module Function Code</description>
		<dc:language>en-us</dc:language>
		<generator>Lottery Post RSS Generator</generator>
		<item>
			<title>Comment #1</title>
			<link>https://blogs.lotterypost.com/jadelottery/2025/5/the_wave_matrix_module_function_code.htm#c276451</link>
			<guid isPermaLink="true">https://blogs.lotterypost.com/jadelottery/2025/5/the_wave_matrix_module_function_code.htm#c276451</guid>
			<pubDate>Thu, 08 May 2025 13:39:54 GMT</pubDate>
			<dc:creator>JADELottery</dc:creator>
			<description><![CDATA[<p>I&#x27;ll post a &#x22;How To...&#x22; either tonight or tomorrow.&#x3c;br /&#x3e;Keep in mind, I will not be running an Excel 101 Class.&#x3c;br /&#x3e;I&#x27;ll expect you to know how to use Excel reasonably well and how to navigate the spreadsheet and using functions therein.</p>]]></description>
			<category>JADELottery</category>
		</item>
		<item>
			<title>Original Blog Entry: The Wave Matrix Module Function Code</title>
			<link>https://blogs.lotterypost.com/jadelottery/2025/5/the_wave_matrix_module_function_code.htm</link>
			<guid isPermaLink="true">https://blogs.lotterypost.com/jadelottery/2025/5/the_wave_matrix_module_function_code.htm</guid>
			<pubDate>Wed, 07 May 2025 03:02:41 GMT</pubDate>
			<dc:creator>JADELottery</dc:creator>
			<description><![CDATA[<p>It&#x27;s late...<br /><br />I&#x27;ll be traveling to IA early tomorrow.<br /><br />Below is the code and a link to a text file of the code.<br /><br />I will get more in to it later.<br /><br />For now, you can examine.<br /><br />If you know what to do, do it.<br /><br />https://member.lotterypost.com/jadelottery/images/TheWaveMatrixModuleFunctionCode-00.txt<br /><br />____________________________________________________________<br /><br />Function TheWaveMatrix(ByVal theRange As Range, _<br /><br />ByVal waves As Long, _<br /><br />ByVal iterations As Integer, _<br /><br />ByVal precision As Integer) As Variant()<br /><br />On Error GoTo ExitFunction<br /><br />Dim Er(0) As Variant: Er(0) = Error<br /><br />Dim i, j, k, items, mn, mx As Long: items = theRange.Rows.Count<br /><br />Dim arry() As Double: ReDim arry(1 To items): For i = 1 To items: arry(i) = theRange.Cells(i, 1): Next i<br /><br />Dim matrix() As Variant: ReDim matrix(1 To items, 1 To (waves + 2))<br /><br />Dim a, b, degree, sum_y, sum_xy, avg_x, avg_y, avg_xx, avg_xy As Double<br /><br />Dim amplitude_degree, amplitude_degree_precision As Double<br /><br />Dim frequency_degree, frequency_degree_precision As Double<br /><br />Dim degree_precision As Double: degree_precision = 1<br /><br />Dim optimal_found, optimal, last_optimal_state, arry_zeroed As Boolean<br /><br />Dim arry_up() As Double: ReDim arry_up(1 To items)<br /><br />Dim arry_down() As Double: ReDim arry_down(1 To items)<br /><br />Dim arry_average() As Double: ReDim arry_average(1 To items)<br /><br />Dim arry_sqr_sum, BMA_arry_sqr_sum, RMS_arry, RMS_BMA_arry As Double<br /><br />Dim frequency() As Long: ReDim frequency(1 To items)<br /><br />Dim diff_frequency() As Long: ReDim diff_frequency(1 To items - 1)<br /><br />Dim diff_diff_frequency() As Long: ReDim diff_diff_frequency(1 To items - 2)<br /><br />Dim frequency_set(1 To 3) As Long<br /><br />If (theRange.Columns.Count 1) Then Er(0) = Too Many Columns Selected : GoTo ExitFunction<br /><br />If (waves 1) Then Er(0) = # of Waves 1 : GoTo ExitFunction<br /><br />If (iterations 1) Then Er(0) = # of Iterations 1 : GoTo ExitFunction<br /><br />If (precision 1) Or (precision 8) Then Er(0) = Precision = {1, 2, 3, 4, 5, 6, 7, 8} : GoTo ExitFunction<br /><br />For i = 1 To precision<br /><br />degree_precision = degree_precision / 10<br /><br />Next i<br /><br />sum_y = 0<br /><br />sum_xy = 0<br /><br />For i = 1 To items<br /><br />sum_y = sum_y + arry(i)<br /><br />sum_xy = sum_xy + i * arry(i)<br /><br />Next i<br /><br />avg_y = sum_y / items<br /><br />avg_xy = sum_xy / items<br /><br />avg_x = (items + 1) / 2<br /><br />avg_xx = (items + 1) * (2 * items + 1) / 6<br /><br />b = (avg_xy - avg_x * avg_y) / (avg_xx - avg_x * avg_x)<br /><br />a = avg_y - (b * avg_x)<br /><br />For i = 1 To items<br /><br />matrix(i, 1) = a + (b * i)<br /><br />arry(i) = arry(i) - matrix(i, 1)<br /><br />Next i<br /><br />arry_zeroed = False<br /><br />For k = 1 To waves<br /><br />sum_y = 0<br /><br />For i = 1 To items<br /><br />sum_y = sum_y + Abs(arry(i))<br /><br />Next i<br /><br />If (sum_y = 0) Then arry_zeroed = True<br /><br />If arry_zeroed Then<br /><br />For i = 1 To items<br /><br />matrix(i, k + 1) = arry(i)<br /><br />Next i<br /><br />Else<br /><br />amplitude_degree = 0<br /><br />amplitude_degree_precision = 1<br /><br />optimal_found = False<br /><br />For i = 1 To items<br /><br />arry_average(i) = arry(i)<br /><br />Next i<br /><br />For j = 1 To iterations<br /><br />arry_up(1) = arry_average(1)<br /><br />For i = 2 To items<br /><br />arry_up(i) = (arry_up(i - 1) + Exp(amplitude_degree) * arry_average(i)) / (1 + Exp(amplitude_degree))<br /><br />Next i<br /><br />arry_down(items) = arry_average(items)<br /><br />For i = (items - 1) To 1 Step -1<br /><br />arry_down(i) = (arry_down(i + 1) + Exp(amplitude_degree) * arry_average(i)) / (1 + Exp(amplitude_degree))<br /><br />Next i<br /><br />For i = 1 To items<br /><br />arry_average(i) = (arry_up(i) + arry_down(i)) / 2<br /><br />Next i<br /><br />Next j<br /><br />arry_sqr_sum = 0<br /><br />BMA_arry_sqr_sum = 0<br /><br />RMS_arry = 0<br /><br />RMS_BMA_arry = 0<br /><br />For i = 1 To items<br /><br />arry_sqr_sum = arry_sqr_sum + arry(i) * arry(i)<br /><br />BMA_arry_sqr_sum = BMA_arry_sqr_sum + arry_average(i) * arry_average(i)<br /><br />Next i<br /><br />RMS_arry = Sqr(arry_sqr_sum / items)<br /><br />RMS_BMA_arry = Sqr(BMA_arry_sqr_sum / items)<br /><br />If ((RMS_arry / RMS_BMA_arry) 2) Then<br /><br />optimal = True<br /><br />Else<br /><br />optimal = False<br /><br />End If<br /><br />last_optimal_state = optimal<br /><br />Do<br /><br />For i = 1 To items<br /><br />arry_average(i) = arry(i)<br /><br />Next i<br /><br />For j = 1 To iterations<br /><br />arry_up(1) = arry_average(1)<br /><br />For i = 2 To items<br /><br />arry_up(i) = (arry_up(i - 1) + Exp(amplitude_degree) * arry_average(i)) / (1 + Exp(amplitude_degree))<br /><br />Next i<br /><br />arry_down(items) = arry_average(items)<br /><br />For i = (items - 1) To 1 Step -1<br /><br />arry_down(i) = (arry_down(i + 1) + Exp(amplitude_degree) * arry_average(i)) / (1 + Exp(amplitude_degree))<br /><br />Next i<br /><br />For i = 1 To items<br /><br />arry_average(i) = (arry_up(i) + arry_down(i)) / 2<br /><br />Next i<br /><br />Next j<br /><br />arry_sqr_sum = 0<br /><br />BMA_arry_sqr_sum = 0<br /><br />RMS_arry = 0<br /><br />RMS_BMA_arry = 0<br /><br />For i = 1 To items<br /><br />arry_sqr_sum = arry_sqr_sum + arry(i) * arry(i)<br /><br />BMA_arry_sqr_sum = BMA_arry_sqr_sum + arry_average(i) * arry_average(i)<br /><br />Next i<br /><br />RMS_arry = Sqr(arry_sqr_sum / items)<br /><br />RMS_BMA_arry = Sqr(BMA_arry_sqr_sum / items)<br /><br />If ((RMS_arry / RMS_BMA_arry) 2) Then<br /><br />optimal = True<br /><br />Else<br /><br />optimal = False<br /><br />End If<br /><br />If (Not optimal) And (Not last_optimal_state) Then<br /><br />amplitude_degree = amplitude_degree - amplitude_degree_precision<br /><br />ElseIf (Not optimal) And (last_optimal_state) Then<br /><br />amplitude_degree = amplitude_degree - amplitude_degree_precision<br /><br />amplitude_degree_precision = amplitude_degree_precision / 10<br /><br />ElseIf (optimal) And (last_optimal_state) Then<br /><br />amplitude_degree = amplitude_degree + amplitude_degree_precision<br /><br />ElseIf (optimal) And (Not last_optimal_state) Then<br /><br />amplitude_degree = amplitude_degree + amplitude_degree_precision<br /><br />amplitude_degree_precision = amplitude_degree_precision / 10<br /><br />End If<br /><br />If (optimal) And (amplitude_degree_precision = degree_precision) Then optimal_found = True<br /><br />If (Abs(amplitude_degree) = 100) Then optimal_found = True<br /><br />last_optimal_state = optimal<br /><br />Loop Until optimal_found<br /><br />frequency_degree = 0<br /><br />frequency_degree_precision = 1<br /><br />optimal_found = False<br /><br />For i = 1 To items<br /><br />arry_average(i) = arry(i)<br /><br />Next i<br /><br />For j = 1 To iterations<br /><br />arry_up(1) = arry_average(1)<br /><br />For i = 2 To items<br /><br />arry_up(i) = (arry_up(i - 1) + Exp(frequency_degree) * arry_average(i)) / (1 + Exp(frequency_degree))<br /><br />Next i<br /><br />arry_down(items) = arry_average(items)<br /><br />For i = (items - 1) To 1 Step -1<br /><br />arry_down(i) = (arry_down(i + 1) + Exp(frequency_degree) * arry_average(i)) / (1 + Exp(frequency_degree))<br /><br />Next i<br /><br />For i = 1 To items<br /><br />arry_average(i) = (arry_up(i) + arry_down(i)) / 2<br /><br />Next i<br /><br />Next j<br /><br />frequency_set(1) = 0<br /><br />frequency_set(2) = 0<br /><br />frequency_set(3) = 0<br /><br />For i = 1 To items<br /><br />If (arry_average(i) 0) Then<br /><br />frequency(i) = 1<br /><br />Else<br /><br />frequency(i) = 0<br /><br />End If<br /><br />Next i<br /><br />For i = 1 To items - 1<br /><br />If ((arry_average(i + 1) - arry_average(i)) 0) Then<br /><br />diff_frequency(i) = 1<br /><br />Else<br /><br />diff_frequency(i) = 0<br /><br />End If<br /><br />Next i<br /><br />For i = 1 To items - 2<br /><br />If ((arry_average(i + 2) - 2 * arry_average(i + 1) + arry_average(i)) 0) Then<br /><br />diff_diff_frequency(i) = 1<br /><br />Else<br /><br />diff_diff_frequency(i) = 0<br /><br />End If<br /><br />Next i<br /><br />For i = 1 To items - 1<br /><br />frequency_set(1) = frequency_set(1) + Abs(frequency(i + 1) - frequency(i))<br /><br />Next i<br /><br />For i = 1 To items - 2<br /><br />frequency_set(2) = frequency_set(2) + Abs(diff_frequency(i + 1) - diff_frequency(i))<br /><br />Next i<br /><br />For i = 1 To items - 3<br /><br />frequency_set(3) = frequency_set(3) + Abs(diff_diff_frequency(i + 1) - diff_diff_frequency(i))<br /><br />Next i<br /><br />mn = frequency_set(1)<br /><br />mx = frequency_set(1)<br /><br />If frequency_set(2) mn Then mn = frequency_set(2)<br /><br />If frequency_set(2) mx Then mx = frequency_set(2)<br /><br />If frequency_set(3) mn Then mn = frequency_set(3)<br /><br />If frequency_set(3) mx Then mx = frequency_set(3)<br /><br />If ((mx - mn) 3) Then<br /><br />optimal = False<br /><br />Else<br /><br />optimal = True<br /><br />End If<br /><br />last_optimal_state = optimal<br /><br />Do<br /><br />For i = 1 To items<br /><br />arry_average(i) = arry(i)<br /><br />Next i<br /><br />For j = 1 To iterations<br /><br />arry_up(1) = arry_average(1)<br /><br />For i = 2 To items<br /><br />arry_up(i) = (arry_up(i - 1) + Exp(frequency_degree) * arry_average(i)) / (1 + Exp(frequency_degree))<br /><br />Next i<br /><br />arry_down(items) = arry_average(items)<br /><br />For i = (items - 1) To 1 Step -1<br /><br />arry_down(i) = (arry_down(i + 1) + Exp(frequency_degree) * arry_average(i)) / (1 + Exp(frequency_degree))<br /><br />Next i<br /><br />For i = 1 To items<br /><br />arry_average(i) = (arry_up(i) + arry_down(i)) / 2<br /><br />Next i<br /><br />Next j<br /><br />frequency_set(1) = 0<br /><br />frequency_set(2) = 0<br /><br />frequency_set(3) = 0<br /><br />For i = 1 To items<br /><br />If (arry_average(i) 0) Then<br /><br />frequency(i) = 1<br /><br />Else<br /><br />frequency(i) = 0<br /><br />End If<br /><br />Next i<br /><br />For i = 1 To items - 1<br /><br />If ((arry_average(i + 1) - arry_average(i)) 0) Then<br /><br />diff_frequency(i) = 1<br /><br />Else<br /><br />diff_frequency(i) = 0<br /><br />End If<br /><br />Next i<br /><br />For i = 1 To items - 2<br /><br />If ((arry_average(i + 2) - 2 * arry_average(i + 1) + arry_average(i)) 0) Then<br /><br />diff_diff_frequency(i) = 1<br /><br />Else<br /><br />diff_diff_frequency(i) = 0<br /><br />End If<br /><br />Next i<br /><br />For i = 1 To items - 1<br /><br />frequency_set(1) = frequency_set(1) + Abs(frequency(i + 1) - frequency(i))<br /><br />Next i<br /><br />For i = 1 To items - 2<br /><br />frequency_set(2) = frequency_set(2) + Abs(diff_frequency(i + 1) - diff_frequency(i))<br /><br />Next i<br /><br />For i = 1 To items - 3<br /><br />frequency_set(3) = frequency_set(3) + Abs(diff_diff_frequency(i + 1) - diff_diff_frequency(i))<br /><br />Next i<br /><br />mn = frequency_set(1)<br /><br />mx = frequency_set(1)<br /><br />If frequency_set(2) mn Then mn = frequency_set(2)<br /><br />If frequency_set(2) mx Then mx = frequency_set(2)<br /><br />If frequency_set(3) mn Then mn = frequency_set(3)<br /><br />If frequency_set(3) mx Then mx = frequency_set(3)<br /><br />If ((mx - mn) 3) Then<br /><br />optimal = False<br /><br />Else<br /><br />optimal = True<br /><br />End If<br /><br />If (Not optimal) And (Not last_optimal_state) Then<br /><br />frequency_degree = frequency_degree - frequency_degree_precision<br /><br />ElseIf (Not optimal) And (last_optimal_state) Then<br /><br />frequency_degree = frequency_degree - frequency_degree_precision<br /><br />frequency_degree_precision = frequency_degree_precision / 10<br /><br />ElseIf (optimal) And (Not last_optimal_state) Then<br /><br />frequency_degree = frequency_degree + frequency_degree_precision<br /><br />frequency_degree_precision = frequency_degree_precision / 10<br /><br />ElseIf (optimal) And (last_optimal_state) Then<br /><br />frequency_degree = frequency_degree + frequency_degree_precision<br /><br />End If<br /><br />If (optimal) And (frequency_degree_precision = degree_precision) Then optimal_found = True<br /><br />If (Abs(frequency_degree) = 100) Then optimal_found = True<br /><br />last_optimal_state = optimal<br /><br />Loop Until optimal_found<br /><br />degree = (amplitude_degree + frequency_degree) / 2<br /><br />For i = 1 To items<br /><br />arry_average(i) = arry(i)<br /><br />Next i<br /><br />For j = 1 To iterations<br /><br />arry_up(1) = arry_average(1)<br /><br />For i = 2 To items<br /><br />arry_up(i) = (arry_up(i - 1) + Exp(degree) * arry_average(i)) / (1 + Exp(degree))<br /><br />Next i<br /><br />arry_down(items) = arry_average(items)<br /><br />For i = (items - 1) To 1 Step -1<br /><br />arry_down(i) = (arry_down(i + 1) + Exp(degree) * arry_average(i)) / (1 + Exp(degree))<br /><br />Next i<br /><br />For i = 1 To items<br /><br />arry_average(i) = (arry_up(i) + arry_down(i)) / 2<br /><br />Next i<br /><br />Next j<br /><br />For i = 1 To items<br /><br />matrix(i, k + 1) = arry_average(i)<br /><br />arry(i) = arry(i) - matrix(i, k + 1)<br /><br />Next i<br /><br />End If<br /><br />Next k<br /><br />For i = 1 To items<br /><br />matrix(i, waves + 2) = arry(i)<br /><br />Next i<br /><br />TheWaveMatrix = matrix()<br /><br />Exit Function<br /><br />ExitFunction:<br /><br />If Er(0) = Error Then Er(0) = Error - err.Number , err.Description<br /><br />TheWaveMatrix = Er()<br /><br />End Function... &#x5b;&#xa0;<a href="https://blogs.lotterypost.com/jadelottery/2025/5/the_wave_matrix_module_function_code.htm">More</a>&#xa0;&#x5d;</p>]]></description>
			<category>Blog Entry</category>
			<category>JADELottery</category>
			<wfw:comment>https://www.lotterypost.com/blogentry/191041</wfw:comment>
		</item>
	</channel>
</rss>

