Toto je starší verze dokumentu!
Kdyby nekdo chtel vykreslovat ganttuv diagram jako maji v pdfku, tak muzete pouzit tuto funkci:
function gantt( s, p, r, Cmax ) %GANTT Summary of this function goes here % Detailed explanation goes here x = r(s(1)); y = 0; height = 2; hold on; colors = ['r' 'g' 'b' 'y' 'm' 'c']; axis([x-1, Cmax+1, y, height + 1]); % create boxes for i=1:length(p) rectx = [x, x, x+p(s(i)), x+p(s(i)), x]; recty = [y, height, height, y, y]; fill(rectx, recty, colors(mod(i, length(colors)))); text(x + p(s(i))/2, y + height/2, ['\bf T_' num2str(s(i))], 'color', 'k'); x = x+p(s(i)); end; hold off; end