i'm not sure if this is in the right place but i need help with this code:
Code:
format bank % two decimal placeswn=8000; % initial weight of grapes
num=input('enter the number of days: ');
disp('  day          weight(kg)                price')
for wn=0:8000;
w=8000-((0.98*(num-1))-(250.*(num-1)./num));
p=1.5*w;
end
disp([num w p])
when i run it and put in 20 as the number of days, matlab returns this:
Code:
enter the number of days: 20  day          weight(kg)                price
         20.00       8218.88      12328.32
could someone show me where im going wrong?
thanks