Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- N = 250;
- x = floor(datenum(now))-100+(1:N)/10; % 10 mælingar á dag
- xd = datestr(x,'dddd');
- y = 20+10*cosd(360*x) + randi(10,1,N);
- xx = mod(x,1); % skiljum aukastafina eftir
- timabil = [12,13]; % 12:00-13:00
- dagur = 3; % þriðjudagur
- ind1 = xx >= timabil(1)/24 & xx <= timabil(2)/24;
- ind2 = weekday(x) == dagur;
- ind3 = ind1 & ind2;
- plot(x,y);
- hold on
- plot(x(ind3),y(ind3),'o');
- ygaur = mean(y(ind3));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement