M=pmsm_estim_mex('Mz_mx.cfg');

figure(1)
subplot(2,1,1);
plot(M.x(:,3));

subplot(2,1,2);
hold off
plot(M.crbz(:,4));
hold on
plot(M.crb(:,4),'r');