        >>  Lectures >>  Matlab 6     Navigator      ## 6.2 Assignment - Lecture 6

### 6.2.1 Part A - Plotting

For Part A of this assignment, you will compute and graph the range of distance travelled at constant velocity of 20 km/h for a range of battery weights.

Knowing that a given battery supplies a certain amount of Energy, we can argue that two of the same batteries will supply twice as much Energy, which will double the range the Segway can travel. The relationship between battery weight and Energy stored is in fact linear due to laws of electricity. We would like to know what effect a larger number of batteries (linearly proportional to battery weight) has on the range the Segway can travel. You will evaluate a range of battery weights between 1kg and 3000kg. Even though 3 tons of batteries is unrealistic for the Segway, it is usually the case that extreme numbers have interesting results and can teach us something about the overall problem.

You will be reusing the variables from exercise_batterypower.m. To include those variables, call exercise_batterypower from your assignment file, e.g. assignment_plot.m. See Figure 6.33 Figure 6.33 Click image to enlarge, or click here to open
In addition to any variables from previous exercises, you will require the following for this assignment:
• mnew batteries = [1:3000] (range of total weight of batteries)

Hint: You may consider computing what Power a unit battery (1kg) supplies, and base the result for each value in the range of battery weights on this value.

### 6.2.2 Part B

For Part B of this assignment, you will compute and graph the range of distance travelled at varying velocity [1..100] km/h for a range of battery weights [1..3000].

In addition to any variables from previous exercises, you will require the following for this assignment:

• mnew batteries = [1:20:3000] (range of total weight of batteries in 20 kg increments)
• vvar = [1:2:100] (range of velocities in 2 km/h increments)

While you would be able to evaluate the vectors at unit increments ( 1:1:3000), it would take much more time to compute, while the additional precision in results may not add to our understanding of the solution.