We are have reached the Matlab portion of the class! Amy assigned us several problems to complete over this week, so here they are:
Reading from Allen Downey's book, Physical Modeling, we completed exercise problems.1) fibonacci1 script - calculate the 10th Fibonacci number
2) car_update script - update the # of cars at each location, a and b
3) car_loop script - use a for loop to update the number of cars at each location, a and b, displaying the amount for each update
4) car_loop script with plotting (initial values: a=150, b =150) - use a for loop to update the number of cars at each location, plotting the updated number of cars at a & b against their respective loop values
5) car_loop script with plotting (initial values: a = 10000, b = 10000) - same as above, except changing the initial car values at each location to be 10000
As you can see, the same is similar, and because we didn't clear the first graph, it also shows up at the farthest left side. Comparatively, since the new graph stretches out over a larger amount of values, the width of the first graph looks very narrow.
6) fibonacci2 sequence script
a) first 10 elements in Fibonacci sequence - calculate the first 10 elements of the Fibonacci sequence
b) generalize using n - calculate the first n (of your choosing) elements of the Fibonacci sequence
7) plotting fibonacci ratios - divide consecutive Fibonacci numbers to calculate the number at which they converge
- n = 1000



.png)







No comments:
Post a Comment