Lee Sai Mun
Lee Sai Mun

Reputation: 310

How do i convert a vector into armadillo matrix?

I have a vector that contains a list of integers. How do i convert that vector into an armadillo matrix with only 1 column and the number or rows as the length of the vector?

16080
16086
16245
16253
16260
16900
200000

Like this for example.

Upvotes: 2

Views: 3750

Answers (1)

Amit Rotem
Amit Rotem

Reputation: 66

I think you can use:

mat A = conv_to<mat>::from(your_vector)

if your vector is an std vector.

Upvotes: 5

Related Questions