User Tools

Site Tools


projects:needybarscode
#octave code
 
close all
clear all
 
 
time = 0:0.001:1;
norm = length(time);
TIM  = 6;
RUN  = 2;
 
cost1 = time.*(TIM+RUN);
cost2 = time.*(TIM+RUN) + time.^2.*((TIM+RUN)^2);
cost3 = time.*(TIM+RUN) + time.^2.*((TIM+RUN)^2) + time.^3.*((TIM+RUN)^3);;
 
 
grid on;
figure();
plot(time, cost1, "-r;1 Needy bar;", \
         time, cost2, "-b;2 Needy bars;", \
         time, cost3, "-g;3 Needy bars;");
 
 
ylabel("Cost")
xlabel("Time")
 
 
 
print -dpng "needyBars01.png";
projects/needybarscode.txt · Last modified: 2007/12/04 20:13 by buskefjomp