﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>Bluebit Software Support Forum / Technical Support and Help / Matrix ActiveX Component  / Inconsistent results from ReOrderRows - URGENT / Latest Posts</title><generator>InstantForum.NET v4.1.4</generator><description>Bluebit Software Support Forum</description><link>http://www.bluebit.gr/forum/</link><webMaster>support@bluebit.gr</webMaster><lastBuildDate>Thu, 17 May 2012 06:42:38 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Inconsistent results from ReOrderRows - URGENT</title><link>http://www.bluebit.gr/forum/Topic145-1-1.aspx</link><description>Replace this statement&lt;BR&gt;Dim perm(5) As Integer&lt;BR&gt;with this&lt;BR&gt;Dim perm(5) As Long&lt;BR&gt;&lt;BR&gt;in order to get the same results as the example set perm() as follows&lt;P&gt;[code]perm(0) = 3&lt;BR&gt;perm(1) = 5&lt;BR&gt;perm(2) = 2&lt;BR&gt;perm(3) = 0&lt;BR&gt;perm(4) = 1&lt;BR&gt;perm(5) = 4[/code]</description><pubDate>Wed, 29 Nov 2006 10:17:46 GMT</pubDate><dc:creator>Trifon</dc:creator></item><item><title>Inconsistent results from ReOrderRows - URGENT</title><link>http://www.bluebit.gr/forum/Topic145-1-1.aspx</link><description>I have been having problems with re-ordering the columns of a matrix. To try help things, i have made a simple example using the reOrderRows method (based on the example in the help file distributed with the ActiveX DLL). The code i have used is shown below:&lt;BR&gt;&lt;BR&gt;&lt;FONT color=navy&gt;[code]Private Sub Command1_Click()&lt;BR&gt;Dim A As New Matrix, B As Matrix&lt;BR&gt;Dim perm(5) As Integer&lt;BR&gt;Dim PI As Variant&lt;BR&gt;'Set A = New Matrix&lt;BR&gt;'A.Size 6, 6&lt;BR&gt;'A.FillRandom&lt;BR&gt;&lt;BR&gt;Set B = New Matrix&lt;BR&gt;B.Size 6, 1&lt;BR&gt;'B.FillRandom&lt;BR&gt;B(0, 0) = 5&lt;BR&gt;B(1, 0) = 3&lt;BR&gt;B(2, 0) = 9&lt;BR&gt;B(3, 0) = 7&lt;BR&gt;B(4, 0) = 10&lt;BR&gt;B(5, 0) = 9&lt;BR&gt;&lt;BR&gt;'Debug.Print "A = "&lt;BR&gt;'Debug.Print A.GetString&lt;BR&gt;&lt;BR&gt;Debug.Print "B = "&lt;BR&gt;Debug.Print B.GetString&lt;BR&gt;&lt;BR&gt;&lt;BR&gt;perm(0) = 4&lt;BR&gt;perm(1) = 5&lt;BR&gt;perm(2) = 3&lt;BR&gt;perm(3) = 1&lt;BR&gt;perm(4) = 6&lt;BR&gt;perm(5) = 2&lt;BR&gt;&lt;BR&gt;PI = perm()&lt;BR&gt;B.ReorderRows PI&lt;BR&gt;&lt;BR&gt;Debug.Print "B reordered"&lt;BR&gt;Debug.Print B.GetString&lt;BR&gt;End Sub[/code]&lt;/FONT&gt;&lt;BR&gt;I thought i would make the help file example easier by not using the sort rows method and also by having a constant matrix for B each time. The permutation index stored in perm() is also constant each time. After copying this to the variant PI and then calling the ReorderRows method, i would expect the same output for the reordered B matrix as in the example in the help file.&lt;BR&gt;&lt;BR&gt;However, i do not get the same output each time. The rows are not reordered. Also the value of the first row of the reordered matrix changes with different executions of the above code. This is nearly identical to the problem that i have when i try to reorder columns in my program.&lt;BR&gt;&lt;BR&gt;The output from different executions of the above code is shown below:&lt;BR&gt;&lt;BR&gt;&lt;FONT color=navy&gt;[code]B = &lt;BR&gt;| 5.000 |&lt;BR&gt;| 3.000 |&lt;BR&gt;| 9.000 |&lt;BR&gt;| 7.000 |&lt;BR&gt;| 10.000 |&lt;BR&gt;| 9.000 |&lt;BR&gt;&lt;BR&gt;B reordered&lt;BR&gt;| 9.000 |&lt;BR&gt;| 3.000 |&lt;BR&gt;| 9.000 |&lt;BR&gt;| 7.000 |&lt;BR&gt;| 10.000 |&lt;BR&gt;| 9.000 |&lt;BR&gt;------------------------&lt;BR&gt;B = &lt;BR&gt;| 5.000 |&lt;BR&gt;| 3.000 |&lt;BR&gt;| 9.000 |&lt;BR&gt;| 7.000 |&lt;BR&gt;| 10.000 |&lt;BR&gt;| 9.000 |&lt;BR&gt;&lt;BR&gt;B reordered&lt;BR&gt;| 5.000 |&lt;BR&gt;| 3.000 |&lt;BR&gt;| 9.000 |&lt;BR&gt;| 7.000 |&lt;BR&gt;| 10.000 |&lt;BR&gt;| 9.000 |&lt;BR&gt;------------------------&lt;BR&gt;B = &lt;BR&gt;| 5.000 |&lt;BR&gt;| 3.000 |&lt;BR&gt;| 9.000 |&lt;BR&gt;| 7.000 |&lt;BR&gt;| 10.000 |&lt;BR&gt;| 9.000 |&lt;BR&gt;&lt;BR&gt;B reordered&lt;BR&gt;| 5.000 |&lt;BR&gt;| 3.000 |&lt;BR&gt;| 9.000 |&lt;BR&gt;| 7.000 |&lt;BR&gt;| 10.000 |&lt;BR&gt;| 9.000 |&lt;BR&gt;------------------------&lt;BR&gt;B = &lt;BR&gt;| 5.000 |&lt;BR&gt;| 3.000 |&lt;BR&gt;| 9.000 |&lt;BR&gt;| 7.000 |&lt;BR&gt;| 10.000 |&lt;BR&gt;| 9.000 |&lt;BR&gt;&lt;BR&gt;B reordered&lt;BR&gt;| 7.000 |&lt;BR&gt;| 3.000 |&lt;BR&gt;| 9.000 |&lt;BR&gt;| 7.000 |&lt;BR&gt;| 10.000 |&lt;BR&gt;| 9.000 |[/code]&lt;/FONT&gt;&lt;BR&gt;&lt;BR&gt;The results that i expect (which are the same results from the help example) are shown below:&lt;BR&gt;&lt;BR&gt;&lt;FONT color=navy&gt;[code]&lt;BR&gt;B = &lt;BR&gt;| 5.000 |&lt;BR&gt;| 3.000 |&lt;BR&gt;| 9.000 |&lt;BR&gt;| 7.000 |&lt;BR&gt;| 10.000 |&lt;BR&gt;| 9.000 |&lt;BR&gt;&lt;BR&gt;B reordered&lt;BR&gt;| 7.000 |&lt;BR&gt;| 10.000 |&lt;BR&gt;| 9.000 |&lt;BR&gt;| 5.000 |&lt;BR&gt;| 9.000 |&lt;BR&gt;| 3.000 |[/code]&lt;/FONT&gt;&lt;BR&gt;&lt;BR&gt;Can you please help me with what is going wrong as i am completely stuck?</description><pubDate>Wed, 29 Nov 2006 06:31:15 GMT</pubDate><dc:creator>zicon</dc:creator></item></channel></rss>
