The undershoot you are seeing is due to two reasons:
1. Mismatch between plant and controller initial conditions.
2. Controller is tuned in such a way that even with initial conditions matching, it would produce a significant overshoot for a step response.
Unless initial conditions are matched, you will have some overshoot. You can improve controller design to help with issue 2 though.
I am pasting the code below where I did the following:
a. Changed the scaling factor on output variable to make the problem better conditioned numerically. You can determine that scaling needs to be done if you do review(mpcobj) on your controller - you will see the advice to change the scaling factor.
b. I tweaked the weights, including adding a weight on mv.rate
c. I initialized controller IC to match plant IC. You can comment this line out if you want to keep controller IC mismatched to plant IC.
clear all; clc;
A=[1 1;0 1];
mpcobj.OV(1).ScaleFactor = 100;
beta = 0.26714;
mpcobj.Weights.MV = 1*beta;
mpcobj.Weights.MVRate = 0.1/beta;
mpcobj.Weights.OV = 100*beta;
mpcobj.Weights.ECR = 1000000;