Question: mathlab 1. Suppose you have a vector (a) of arbitrary length N. You want to find the sum of each set of 3 consecutive numbers
mathlab
1. Suppose you have a vector (a) of arbitrary length N. You want to find the sum of each set of 3 consecutive numbers in your vector, and call that vector b. For example, if your vector is a = [1 3 5 4 6 2 7 9 12] Then your result is b = [9 12 15 12 15 18 28] Pay special attention to the number of elements of each vector how long should b be? 2. Suppose you have vectors (x) and (y) of arbitrary length N. You want to calculate the derivative of y(x). For example, if your vector x = [0 1 2 3 4] and y = [1 11 19 33 4] Manually calculate the derivative (dy/dx) at each point, using a forward difference method. Again, pay attention to the number of elements of each vector how long should (dy/dx) be
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
