[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] Re: Two-dimensional arrays (matrices) and their inverse....



PureBytes Links

Trading Reference Links

Luc,

I'm in your camp, in that I've requested native afl-matrix functions to 
made available, in particular the inverted matrix (see Feedback Centre, 
request # 872):

http://www.amibroker.com/feedback/view_bug.php?bug_id=872

If you & others add their names to the request, we might be able to 
convince TJ to create them.

For the time being, other matrix functions are easier to create via 
VarSet/Get, for example:

////////////////////////////////////////////////////////////////////////
////
// Matrix Functions via VarSet/VarGet

function SetMatrix( Mname, x, y, value )// x, y can be any dimension
{
VarSet( Mname + StrFormat("%05.0f%05.0f", x, y ), value );
}

function GetMatrix( Mname, x, y )
{
return VarGet( Mname + StrFormat("%05.0f%05.0f", x, y ) );
}

function SetIDMatrix( Mname, Range)// Square Matrix
{
	for (x=0; x<Range; x++)
	{
		for (y=0; y<Range; y++) 
		{
			if (x==y) VarSet( Mname + StrFormat("%05.0f%
05.0f", x, y ), 1 );
			else VarSet( Mname + StrFormat("%05.0f%05.0f", 
x, y ), 0 );
		}
	}
}

PS

--- In amibroker@xxxxxxxxxxxxxxx, "luchetta" <twohorses4us@xxx> wrote:
>
> Hi,
> 
> I am new to AFL, and I am trying to figure out how to use matrices in 
> Amibroker. In particular, could anyone point me to a code for 
inverting 
> a matrix?
> 
> Thank you very much!
> 
> Luc
>




Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to 
SUPPORT {at} amibroker.com

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html
 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/