Student Support Forum: 'How to Append output to a list, then plot.' topicStudent Support Forum > General > Archives > "How to Append output to a list, then plot." |
|timothy s. kochanski|
after setting up my program the following bit of code produces the output below. The output demonstrates that with decreasing cost for firm 1 and constant costs for firm 2, over iterations firm 1's profits increase while firm 2's remain constant. What I want to do is capture in a plot the collection of data points produced (profits for firm 1 and firm 2) from x=1 to x=10. In other words the output below is f[x] data for firm 1 and f[x] data for firm 2. I want to combine this data with varying levels of x (a time variable) and plot profit for firm 1 and firm 2 over time.
For[i = 1, i < 5, i++, Print[CournotProfit1];
Cost1 = Cost1 - .1Cost1;
CournotProfit1 = Simplify[q1cournot*(Pcournot - Cost1)];
CournotProfit2 = Simplify[q2cournot*(Pcournot - Cost2)]]