1
00:00:00,210 --> 00:00:01,440
So now it is your turn.

2
00:00:01,890 --> 00:00:07,950
Have talked a lot about derivatives and about different methods on how we can implement these derivatives.

3
00:00:08,400 --> 00:00:13,530
We have learned about the forwhat differences, central differences, methods and about the Richardson

4
00:00:13,530 --> 00:00:15,240
methods and also others.

5
00:00:15,930 --> 00:00:18,420
And now is the time to practice this.

6
00:00:19,020 --> 00:00:22,890
But you you're not supposed to just repeat this for different function.

7
00:00:23,250 --> 00:00:25,890
But instead, we will now deal with data files.

8
00:00:26,550 --> 00:00:33,510
So here you see in this template file, I have loaded already a file that you can download in the course

9
00:00:33,510 --> 00:00:38,220
and it is called exercise velocity acceleration data file.

10
00:00:38,700 --> 00:00:44,370
And you see, this is how you can load it and how you can store this in the variable called data when

11
00:00:44,370 --> 00:00:45,520
you call data.

12
00:00:45,540 --> 00:00:52,890
Then you see it's an array with data points and the first column goes from zero to 100 in steps of 0.1.

13
00:00:53,430 --> 00:01:01,710
This will correspond to the time in seconds, and the second column will go here from one to fifteen

14
00:01:01,710 --> 00:01:02,460
point four.

15
00:01:03,210 --> 00:01:06,100
But it is really long, monotonous in between.

16
00:01:06,120 --> 00:01:12,510
And this describes the position of some car, for example, and it's a position in meters.

17
00:01:13,560 --> 00:01:19,380
And when we clocked this, you see, it looks like this we have here at a time in seconds, coordinates

18
00:01:19,590 --> 00:01:23,910
x and meters and you see increases, decreases and so on.

19
00:01:24,360 --> 00:01:32,430
So your task is now to to calculate the velocity, which is of course, the first on a time derivative

20
00:01:32,430 --> 00:01:38,220
of the position and the acceleration, which is the second all the time derivative for the load of data

21
00:01:38,220 --> 00:01:41,490
set that describes the set of points, Ti and X.

22
00:01:41,490 --> 00:01:48,510
As you see here in the plot and you see we have 1000 points which describe to time from zero to 100

23
00:01:48,510 --> 00:01:55,230
and you're supposed to calculate the and I'm using the forward differences, central differences and

24
00:01:55,230 --> 00:02:02,040
the Richardson methods and then the bonus task, which is pretty short, but maybe you don't really

25
00:02:02,040 --> 00:02:02,760
know how to do it.

26
00:02:02,760 --> 00:02:07,230
So maybe you have to google some of the commands of Nampai how you can accomplish this.

27
00:02:07,620 --> 00:02:14,910
You're supposed to find then the maximum value of the acceleration A.I. and the corresponding point

28
00:02:14,910 --> 00:02:16,110
of time I.

29
00:02:17,010 --> 00:02:20,960
So here, just one more hint you have to be very careful here.

30
00:02:20,970 --> 00:02:23,610
So at first, you may think this is pretty easy.

31
00:02:23,610 --> 00:02:30,300
You just use the functions that we have programmed in the previous lectures and then you can apply this.

32
00:02:30,480 --> 00:02:36,030
But the problem is now we do not know the function f of X that describes this curve.

33
00:02:36,120 --> 00:02:40,950
We only have two data points, so you can only work with the data points.

34
00:02:40,950 --> 00:02:47,490
And this means you may have to program the routines that we have previously programmed a bit differently.

35
00:02:47,790 --> 00:02:52,440
So you really have to work with data and so on your functions.

36
00:02:53,070 --> 00:02:55,650
The only input parameter will be data.

37
00:02:56,070 --> 00:03:01,500
There will be no step size, no h because this is all determined by the data itself.

38
00:03:01,560 --> 00:03:07,830
So, for example, h in this case will always be zero point one, so please give it a try.

39
00:03:07,980 --> 00:03:10,620
But if you don't succeed, it's not a big deal.

40
00:03:10,620 --> 00:03:11,280
No problem.

41
00:03:11,580 --> 00:03:14,970
I will provide you the solution in the following lecture.

42
00:03:15,780 --> 00:03:17,580
So now click to the next lecture.

43
00:03:17,580 --> 00:03:21,210
There, you can download the template file and also the data file.

44
00:03:21,750 --> 00:03:25,200
So good luck and have fun, and I see you soon with the solution you.

