This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: disp('The net increase in the worth of the portfolio is:') Sheet1 Page 2 %declare price variable %condition for buying shares: price is less than 20 %calculate price of bought shares disp(spent) %condition for selling shares: price is greater than 20 %calculate price of sold shares disp(recieved) %total shares = original # of shares - shares bought - shares sold disp(total_shares) %net increase is defined as the total value of shares owned at end of 12th day disp(net_increase)...
View Full Document
- Spring '06