diff --git a/programming/exercises/plotsinewave.m b/programming/exercises/plotsinewave.m index f2960da..25667a3 100644 --- a/programming/exercises/plotsinewave.m +++ b/programming/exercises/plotsinewave.m @@ -2,12 +2,12 @@ function plotsinewave(time, sine) % plot precomputed sinewave % time: vector with timepoints % sine: corresponding vector with sinewave -if time(end)-time(1) <= 1.0 - plot(1000.0*time, sine); +if time(end) - time(1) <= 1.0 + plot(1000.0 * time, sine); xlabel('Time [ms]'); else plot(time, sine); xlabel('Time [s]'); end -ylim([1.2*min(sine) 1.2*max(sine)]); +ylim([1.2 * min(sine) 1.2 * max(sine)]); ylabel('Sinewave');