axis([-5 5 .5 5]) grid on [qref_data,tref] = readamrdata(1,Frame,'./qref/'); if (abs(tref - t) > 1e-8) error('Reference data time and current time are not compatible'); end; hold on; [qref,xref,p] = plotframe1ez(qref_data,mq,'b-'); % Get handle to line plot(s) created by claw graphics. h = getlegendinfo; str1 = sprintf('Computed solution (mx = %d)',mx); str2 = sprintf('Reference solution (mx = %d)',length(xref)); pos = 2; % Position of legend. legend([h,p],str1,str2,pos); hold off; clear afterframe;