I have a std::vector of doubles and I need to pass this data to Matlab (to plot). How can I convert the vector into a Matlab readable vector?
You can use .data()
to access the underlying block of memory. Combined with .size()
, you can get access to a C-like array, which you then pass to MATLAB.