For the Cake Lab section of the HW, I'm having a little trouble trying to figure out how to output graphs for the eatcake() function that are fixed at either a single time period or a specific wage, especially with the pre-written code that we are told to put within the function's definition (that given code chunk is below for reference): the outputted colorful 3D graphs look great, but I'm not sure how to fix them at a point and convert them to 2D. Any tips or helpful resources on how to go about that?
Also, since the arrays for the value function and policy function from eatcake()'s output are quite large, is it fine if we truncate how much of the arrays are shown in our output?
Hi @jonhelium . Your array V should have the the value function (as a function of w) for each time period t. So, fixing time or w should be a matter of slicing the array in one dimension or the other.
For the Cake Lab section of the HW, I'm having a little trouble trying to figure out how to output graphs for the
eatcake()
function that are fixed at either a single time period or a specific wage, especially with the pre-written code that we are told to put within the function's definition (that given code chunk is below for reference): the outputted colorful 3D graphs look great, but I'm not sure how to fix them at a point and convert them to 2D. Any tips or helpful resources on how to go about that?Also, since the arrays for the value function and policy function from
eatcake()
's output are quite large, is it fine if we truncate how much of the arrays are shown in our output?Code chunk for plotting given in lab:![Screenshot_1](https://user-images.githubusercontent.com/28125099/58379523-1067a680-7f6a-11e9-8047-1e36b0fa096d.jpg)