function irsignal(t) % t - Raw codes (time codes) % For example: % t = [ % 4496 % 1536 % 2448 % 1536 % 2512 % 2992 % 1472 % 2544 % 1504 % 2480 % 1520 % 2512 % 2512 % 1504 % 2496 % 1504 % 2512 % 2512 % 2512 % 1488 % 2512 % 1504 % 2512 % 1504]; SZ = length(t); x = zeros(1, SZ); x(1) = t(1); for i=2:SZ x(i) = x(i-1) + t(i); end y = 1*mod(1:SZ, 2); stairs(x, y); ylim([0 1.2]);