function createfigure(Y1, Y2, YMatrix1) %CREATEFIGURE(Y1,Y2,YMATRIX1) % Y1: vector of y data % Y2: vector of y data % YMATRIX1: matrix of y data % Auto-generated by MATLAB on 12-Sep-2008 17:31:30 % Create figure figure1 = figure('XVisual',... '0x24 (TrueColor, depth 24, RGB mask 0xff0000 0xff00 0x00ff)'); % Create subplot subplot1 = subplot(3,1,1,'Parent',figure1,'FontSize',12); box('on'); grid('on'); hold('all'); % Create plot plot(Y1,'Parent',subplot1,'Marker','.','LineStyle','none'); % Create title title('error in translation (m)','FontSize',14); % Create subplot subplot2 = subplot(3,1,2,'Parent',figure1,'FontSize',12); box('on'); grid('on'); hold('all'); % Create plot plot(Y2,'Parent',subplot2,'Marker','.','LineStyle','none'); % Create title title('error in rotation (degrees)','FontSize',14); % Create subplot subplot3 = subplot(3,1,3,'Parent',figure1,'FontSize',12); grid('on'); hold('all'); % Create multiple lines using matrix input to plot plot1 = plot(YMatrix1,'Parent',subplot3,'LineStyle','none'); set(plot1(1),'Marker','.','Color',[1 0 0],'DisplayName','estimated'); set(plot1(2),'Marker','+','DisplayName','true','Color',[0 0 0]); % Create title title('absolute rotations','FontSize',14); % Create legend legend1 = legend(subplot3,'show'); set(legend1,'Position',[0.1582 0.2507 0.07792 0.05427]);