Sorry to restore the old question, but I'm currently working on an open source C ++ library that answers this question exactly:
KeyCpp is an open source C ++ library that provides the MATLAB / Octave syntax as several useful numerical methods, as well as some graphing functions. Currently there are functions for eig , ode45 , fft , linsolve , svd , interp1 , plot and many other common MATLAB functions.
Although there are other (very good) libraries that provide many of these functions (such as Armadillo, Eigen, etc.), most of them are not complete numerical libraries, and most of their syntax is incompatible with MATLAB syntax. Although KeyCpp is also not a complete numerical library (but it is improving all the time!), The syntax is close to MATLAB, as C ++ allows.
In KeyCpp, we use the following syntax to construct the t and y vectors: (Go here for a more extensive example)
#include <iostream> #include <keycpp/keycpp.h> using namespace keycpp; int main(int argc, char** argv) { // Lets create some data: y = sin(t) std::vector<double> t = linspace(-pi,pi,100); std::vector<double> y = sin(t); Figure h; h.plot(t,y,"-b"); h.grid_on(); h.legend({"Series 1"}); h.title("Example Plot"); h.xlabel("time"); h.ylabel("y"); return 0; }

The KeyCpp library functionality takes advantage of LAPACK, Gnuplot, and odeint (from Boost). The following open source projects have been included in this library: Kiss FFT, Gnuplot-cpp.
Doxygen documentation for most features is here.