itload('../pmsm.it') figure(1); plot(xthM(1,:)') set(gca,'YLim',[0,0.4]) hold on plot([0,10000],0.1*[1,1],'--') legend('\hat{q}_t using EKF-PF','simulated value') legend('expected value of q_t using EKF-PF','simulated value') xlabel('time index') %set(gcf,'PaperPositionMode','auto'); %print -deps2 ekf figure(2); subplot(2,1,1) plot(xth(3,:)','--') hold on plot(xthE(3,:)',':') plot(xthM(5,:)') legend('Simulated \omega','Estimated \omega using EKF ', 'Estimated \omega using EKF-MPF '); xlabel('time index') %set(gca,'XLim',[2300,3000]); subplot(2,1,2) hold off plot(xth(4,:)','--') hold on plot(xthE(4,:)',':') plot(xthM(6,:)') legend('Simulated \upsilon','Estimated \upsilon using EKF ', 'Estimated \upsilon using EKF-MPF '); xlabel('time index') %set(gca,'XLim',[2300,3000]);