Umut, take a look at the assignment operator:
http://svn.boost.org/svn/boost/trunk/libs/numeric/ublas/doc/samples/assignment_examples.cpp http://svn.boost.org/svn/boost/trunk/libs/numeric/ublas/test/test_assignment.cpp