From: Mart Lubbers Date: Fri, 2 Oct 2015 08:20:03 +0000 (+0200) Subject: plots script works for both X-Git-Url: https://git.martlubbers.net/?a=commitdiff_plain;h=15bb6f8eee41f2ca3e8ba7fedc4929bcdfc539e7;p=des2015.git plots script works for both --- diff --git a/mart/ex10/ex10ab.m b/mart/ex10/ex10ab.m deleted file mode 100644 index f1af50a..0000000 --- a/mart/ex10/ex10ab.m +++ /dev/null @@ -1,15 +0,0 @@ -d = csvread("ex10a.csv")(:,2) ./ 1000; -dmax = max(d); -dmin = min(d); -davg = mean(d); -ddev = std(d); -plot(d, '@k'); -title("Measurements on jitter"); -xlabel("Number of the measurement"); -ylabel("Time till next measurement in microseconds"); -stepsize = (dmax+dmin)/25; -text(100, dmax-stepsize, sprintf("Min: %d", dmin)); -text(100, dmax-stepsize*2, sprintf("Mean: %.2f", davg)); -text(100, dmax-stepsize*3, sprintf("Std: %.2f", ddev)); -text(100, dmax-stepsize*4, sprintf("Max: %d", dmax)); -print -dpng "-S1200,1200" ex10ab.png diff --git a/mart/ex10/plots.m b/mart/ex10/plots.m new file mode 100644 index 0000000..062657e --- /dev/null +++ b/mart/ex10/plots.m @@ -0,0 +1,33 @@ +d = csvread("ex10ab.csv")(:,2) ./ 1000; +dmax = max(d); +dmin = min(d); +davg = mean(d); +ddev = std(d); +figure; +plot(d, '@k'); +title("Measurements on jitter"); +xlabel("Number of the measurement"); +ylabel("Time till next measurement in microseconds"); +stepsize = (dmax+dmin)/25; +text(100, dmax-stepsize, sprintf("Min: %d", dmin)); +text(100, dmax-stepsize*2, sprintf("Mean: %.2f", davg)); +text(100, dmax-stepsize*3, sprintf("Std: %.2f", ddev)); +text(100, dmax-stepsize*4, sprintf("Max: %d", dmax)); +print -dpng "-S1200,1200" ex10ab.png + +d = csvread("ex10d.csv")(:,2); +dmax = max(d); +dmin = min(d); +davg = mean(d); +ddev = std(d); +figure; +plot(d, '@k'); +title("Measurements on interrupt latency via LPT1"); +xlabel("Number of the measurement"); +ylabel("Time till next measurement in nanoseconds"); +stepsize = (dmax+dmin)/25; +text(100, dmax-stepsize, sprintf("Min: %d", dmin)); +text(100, dmax-stepsize*2, sprintf("Mean: %.2f", davg)); +text(100, dmax-stepsize*3, sprintf("Std: %.2f", ddev)); +text(100, dmax-stepsize*4, sprintf("Max: %d", dmax)); +print -dpng "-S1200,1200" ex10ab.png