Author: Copyright � 2008, MetaQuotes Software Corp.
Matrix1
0 Views
0 Downloads
0 Favorites
Matrix1
//+------------------------------------------------------------------+
//|                                                      Matrix1.mq4 |
//|                      Copyright © 2008, MetaQuotes Software Corp. |
//|                                        http://www.metaquotes.net |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2008, MetaQuotes Software Corp."
#property link      "http://www.metaquotes.net"

double M[2][3];   
                  
//+------------------------------------------------------------------+
//| script program start function                                    |
//+------------------------------------------------------------------+
int start()
  {
//----
  M[0][0]=0.1;   
  M[0][1]=0.2;   
  M[0][2]=0.3;      

  M[1][0]=0.4;      
  M[1][1]=0.5;      
  M[1][2]=0.6;      

  PrintMatrix(M);  
//----
   return(0);
  }
//+------------------------------------------------------------------+

void PrintMatrix(double Matrix[][])
{
	int Line = ArrayRange(Matrix,0);
	int Col = ArrayRange(Matrix,1);
	string m1="";
	for (int i=0;i<Line;i++)
	{
	  for (int j=0;j<Col;j++)
	   m1=m1+Matrix[i][j]+",";
	  
	  m1=m1+"\n"; 
	}   
   Comment(m1);	
}	

Comments