I have a Matlab code which I should convert to c++. In one file there are a lot of matrices and I want to convert them to arrays(or vectors). I need efficient way of converting those matrices.
f = [ -.000212080863 .000358589677 .002178236305 ...
-.004159358782 -.010131117538 .023408156762 ...
.028168029062 -.091920010549 -.052043163216 ...
.421566206729 .774289603740 .437991626228 ...
-.062035963906 -.105574208706 .041289208741 ...
.032683574283 -.019761779012 -.009164231153 ...
.006764185419 .002433373209 -.001662863769 ...
-.000638131296 .000302259520 .000140541149 ...
-.000041340484 -.000021315014 .000003734597 ...
.000002063806 -.000000167408 -.000000095158 ];
I tried things like this but all my trials give some errors.
int* first;
first = new int[5];
first = {1,2,3,4,5};
Note: I can put commas and change [ to { manually.
Thanks,