Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

create matrix cpp

typedef std::vector<std::vector<double> > Matrix;
//with initialization
Matrix matrix1 = { {0.1,1.1,.2},
                 {.4,.5,.6}, 
                 {.8,.9,.10}
                };
//just initiation (3x3)
Matrix matrix2(3, std::vector<double>(3) );
 
PREVIOUS NEXT
Tagged: #create #matrix #cpp
ADD COMMENT
Topic
Name
2+3 =