c++ - How to construct eigen matrix of size 1000* 1000 -


i trying construct matrix of size 1000*1000 in eigen library. tried documentation still confused. have basic knowledge of cpp.

i tried following. know not right nice if complete code below

  int size = 1000;   matrixxd a(size);   matrixxd b(size);    (int = 2; < size; i++ ){             a(i) = (rand()%10+1) +  ((double) rand() / (rand_max));             b(i) = (rand()%10+1) +  ((double) rand() / (rand_max));   } 

a static matrix 1000 rows , 1000 columns: eigen::matrix<double, 1000, 1000> thematrix;

matrixxd dynamic variant, 1 can change number of rows and/or columns @ runtime. dynamic matrix use:

eigen::matrixxd thematrix(1000,1000);


Comments

Popular posts from this blog

wordpress - (T_ENDFOREACH) php error -

Export Excel workseet into txt file using vba - (text and numbers with formulas) -

Using django-mptt to get only the categories that have items -