I am making a function that can extend the given Matrix which is MatrixXd type. I was trying to use conservativeResize to achieve that, but when i use Ref in the function statement, conservativeResize doesn't work with with the Ref object, but resize do. I am wondering why this problem happens. Thanks in advance.
I tried to use MatrixXd &var directly in function statement, and it does work, but I don't know why Ref doesn't.
void mat_extend(Ref<MatrixXd> mat)
{
int len = mat.rows();
mat.conservativeResize(len+2,NoChange);
}
```