﻿<?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  / Wrapping methods of MaXC together / 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:43:08 GMT</lastBuildDate><ttl>20</ttl><item><title /><link>http://www.bluebit.gr/forum/Topic54-1-1.aspx</link><description>Did you try this: [code]Set RESULT = W1.Times(A).Times(W2)[/code]Also I cannot see why W1.Times(A.Times(W2)) is not working for you.I have created the following code and all 3 methods return the same result. Please try it in your machine.[code]Private Sub Test()    Dim W1 As Matrix, A As Matrix, W2 As Matrix, RESULT As Matrix    Dim temp_matrix As Matrix    Set W1 = New Matrix    W1.Size 1, 4    W1.FillRandom    Set A = New Matrix    A.Size 4, 4    A.FillRandom    Set W2 = New Matrix    W2.Size 4, 1    W2.FillRandom    ' 1st method (suggested)    Set RESULT = W1.Times(A).Times(W2)    Debug.Print RESULT.GetString    ' 2nd        Set RESULT = W1.Times(A.Times(W2))        Debug.Print RESULT.GetString        ' 3rd    Set temp_matrix = A.Times(W2)    Set RESULT = W1.Times(temp_matrix)    Debug.Print RESULT.GetStringEnd Sub[/code] I suspect that you have used a variable declaration like this:[code]Dim W1, A As Matrix[/code]In the above declaration variable A is declared as Matrix and variable W1 as Variant.</description><pubDate>Wed, 06 Apr 2005 13:16:51 GMT</pubDate><dc:creator>Trifon</dc:creator></item><item><title>Wrapping methods of MaXC together</title><link>http://www.bluebit.gr/forum/Topic54-1-1.aspx</link><description>Hello, I have been wondering if there is a way to wrap together, or nest, several methods of MaXC together, to simplify some work I'm doing. As an example, let's say I have three matrices: matrix W1 is a row vector with 4 elements, matrix A is a 4 x 4 square matrix, and matrix W2 is a column vector with 4 elements. I want to premultiply A by W1 and postmultiply it by W2, with the result then being a single number (call it RESULT). What I tried first was something like: [code]Set RESULT = W1.Times(A.Times(W2))[/code]This did not work. I found that I had to first create an intermediate result for the portion of the above represented by A.Times(W2), with: [code]Set temp_matrix = A.Times(W2)[/code] and then do something like: [code]Set RESULT = W1.Times(temp_matrix)[/code] This means that I also had to dimension, instantiate, and size the matrix "temp_matrix", which is three additional lines of code that it would be nice not to have to worry about. Is there some way to nest the functions together?Thanks! </description><pubDate>Tue, 05 Apr 2005 12:04:24 GMT</pubDate><dc:creator>anonymous</dc:creator></item></channel></rss>
