MATLAB Introduction
As an introduction to the MATLAB language, Professor Banzaert gave us a few exercises to finish out of the first four chapters of the Physical Modeling in MATLAB textbook.
Exercise 2.1: Fibonacci I
Exercise 2.1: Fibonacci I |
Using the given percentage values of cars transferred between Boston and Albany and initial values of 150 at each location, the script updates the number of cars at each site from one week to the next.
Exercise 3.1: Car Loop script
Runs the car update script from one week to the next (for 52 weeks or a year), and plots the values for each location over the time.
Exercise 2.3 |
Exercise 3.2 |
Exercise 3.5: Fibonacci II Sequence script
Uses a for loop to compute the first 10 elements of this Fibonacci sequence and prints the 10th element.
Exercise 4.6: Plotting Fibonacci Ratios
Exercise 3.5 |
Expanded code designed to determine at what angle the horizontal distance of a baseball's trajectory is maximized.
- (Left) Printed Values for each angle set.
- (Right) Graph of the trajectory of the ball for each angle set. Maximum horizontal distance curve is pink.
(L to R) Part I: gathering basics of the problem; Part II: applying more detailed elements and equations to find best angle; and Part III: adding the details for plotting
Comments
Post a Comment